QlarIITy

PhysicsJEE Main 2021 · 16 MarchInteger

In the logic circuit shown in the figure, if input AA and BB are 0 and 1 respectively, the output at YY would be xx. The value of xx is ______.

A logic circuit with inputs A and B. A goes directly to the upper input of a NOR gate; a tap from A passes down through a NOT gate to the upper input of a NAND gate. B passes through a NOT gate to the lower input of the NAND gate; a tap taken after this NOT gate passes up through a second NOT gate to the lower input of the NOR gate, crossing the other tap without touching it. The outputs of the NOR gate and the NAND gate feed an AND gate, whose output is Y.
Try it before you look.The full solution is on this page, below the answer box, the moment you check. No sign-in needed.

Solution

Core idea. Write the logic level on every wire, gate by gate, from the inputs to the output.

Concept refresher. A NOT gate inverts its input, and two NOT gates in a row give back the original signal:

B‾‾=B\overline{\overline{B}} = B

A NOR gate gives P+Q‾\overline{P + Q}, a NAND gate gives P⋅Q‾\overline{P \cdot Q} and an AND gate gives P⋅QP \cdot Q, which is high only when both of its inputs are high.

Picture the situation. Put the levels on the wires. A is 0 and B is 1. The NOR gate sees A and, after two inversions, B again; with a 1 at one input it gives 0. That 0 goes to the last AND gate, and an AND gate with a 0 at either input gives 0.

A table of the levels on the wires for A = 0 and B = 1: not A is 1, not B is 0, B inverted twice is 1, the NOR gate gives 0, the NAND gate gives 1, and Y is 0.

Approach. Write the level at each gate input for the given A and B, and work through to Y.

  1. Step 1: Levels after the NOT gates

    With A=0A = 0 and B=1B = 1, the NOT gate on the tap from A gives A‾=1\overline{A} = 1 and the NOT gate after B gives B‾=0\overline{B} = 0. The second NOT gate, on the line going up, inverts B‾\overline{B} again and gives back B=1B = 1.

  2. Step 2: The NOR gate

    It receives A=0A = 0 and B=1B = 1, so its output is

    A+B‾=0+1‾=0\overline{A + B} = \overline{0 + 1} = 0
  3. Step 3: The NAND gate

    It receives A‾=1\overline{A} = 1 and B‾=0\overline{B} = 0, so its output is

    A‾⋅B‾‾=1⋅0‾=1\overline{\overline{A} \cdot \overline{B}} = \overline{1 \cdot 0} = 1
  4. Step 4: The AND gate

    Its two inputs are 0 and 1, so the output is Y=0⋅1=0Y = 0 \cdot 1 = 0. Hence x=0x = 0.

Answer. 0

Sanity check. In general the two middle gates give A+B‾\overline{A + B} and A+BA + B, a signal and its inverse, so the AND gate gives 0 for every pair of inputs.

Common wrong answers

  • 1: 1 comes from missing the second NOT gate: the NOR gate would then receive 0 and 0 and give 1, and the AND gate, with 1 and 1, would give 1.

Key takeaway

The trap. Two NOT gates on one path cancel; count every inverter along a wire before using its signal.

How toppers think. They notice that the two middle gates give a signal and its inverse, so the AND output is 0 for any inputs.

Remember. X⋅X‾=0X \cdot \overline{X} = 0.

More on Semiconductors