QlarIITy

PhysicsJEE Main 2021 · 17 MarchSingle correct

Which one of the following will be the output of the given circuit?

A logic circuit: inputs A and B feed an AND gate, whose output passes through a NOT gate. The same inputs feed an OR gate. The inverted AND output and the OR output are the two inputs of a second AND gate, whose output is Y.
  1. Option A: NOR Gate
  2. Option B: NAND Gate
  3. Option C: AND Gate
  4. Option D: XOR Gate
Try it before you look.The full solution is on this page, below the options, the moment you check. No sign-in needed.

Solution

Core idea. XOR is "OR but not AND": the OR of the inputs multiplied by the inverse of their AND.

Concept refresher. An AND gate gives ABAB, an OR gate gives A+BA + B and a NOT gate gives the inverse of its input. By De Morgan's theorem AB‾=A‾+B‾\overline{AB} = \overline{A} + \overline{B}. The exclusive OR is 1 when exactly one of the inputs is 1:

Y=AB‾+A‾BY = A\overline{B} + \overline{A}B

Picture the situation. The last AND gate needs both of its lines high. The lower line, from the OR gate, is high when at least one input is 1. The upper line, the inverted AND, is high unless both inputs are 1. Together: at least one input is 1, but not both. That is the exclusive OR.

A truth table with the columns A, B, inverted AND, OR and Y: for the inputs 00, 01, 10 and 11 the output Y is 0, 1, 1 and 0.

Approach. Write the output expression and simplify it, then confirm with the truth table.

  1. Step 1: The two lines

    The upper AND gate gives ABAB, and the NOT gate turns it into AB‾\overline{AB}. The OR gate gives A+BA + B.

  2. Step 2: The last AND gate

    It multiplies the two signals, and De Morgan's theorem opens the first bracket:

    Y=AB‾⋅(A+B)=(A‾+B‾)(A+B)\begin{aligned} Y &= \overline{AB} \cdot (A + B) \\[4pt] &= (\overline{A} + \overline{B})(A + B) \end{aligned}
  3. Step 3: Simplifying

    On multiplying out, the terms A‾A\overline{A}A and B‾B\overline{B}B are 0, which leaves

    Y=A‾B+AB‾Y = \overline{A}B + A\overline{B}

    the exclusive OR (XOR) operation.

Answer. (D) XOR Gate

Sanity check. The four outputs for inputs 00, 01, 10, 11 come out as 0, 1, 1, 0: high only when the inputs differ.

Why the other options are wrong

  • (A) A NOR gate gives 1 only for the inputs 00; this circuit gives 0 for 00 and 1 for 01 and 10.
  • (B) NAND is only the upper line of the circuit; the last gate also needs the OR line high, which fails for the inputs 00.
  • (C) An AND gate gives 1 for the inputs 11; here the inverted AND line is 0 for them, so the output is 0.

Key takeaway

The trap. Write each line into the last gate in full before multiplying the two.

How toppers think. They check the rows 00 and 11: an output of 0 for both, with 1 for the other two rows, marks an XOR.

Remember. AB‾⋅(A+B)=AB‾+A‾B\overline{AB} \cdot (A + B) = A\overline{B} + \overline{A}B.

More on Semiconductors