QlarIITy

PhysicsJEE Main 2025 · 7 AprilSingle correct

Consider the following logic circuit. The output is Y=0Y = 0 when :

A logic circuit: inputs A and B feed an AND gate. Input B is also taken to one input of an OR gate, and input A, through a NOT gate, to the other input of the OR gate. The outputs of the AND gate and the OR gate are the two inputs of a NAND gate, whose output is Y.
  1. Option A: A=1A = 1 and B=1B = 1
  2. Option B: A=0A = 0 and B=1B = 1
  3. Option C: A=1A = 1 and B=0B = 0
  4. Option D: A=0A = 0 and B=0B = 0
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. A NAND output is 0 only when all its inputs are 1; work backwards from that.

Concept refresher. A NAND gate gives the inverse of the AND of its inputs, Y=P⋅Q‾Y = \overline{P \cdot Q}, so its output is 0 only when P=1P = 1 and Q=1Q = 1 together. An AND gate gives 1 only when both its inputs are 1, an OR gate gives 1 when at least one input is 1, and a NOT gate inverts.

Picture the situation. The last gate is a NAND, and a NAND output goes low in one situation only: both of its inputs high. So both of the earlier gates must be giving 1. The upper one is an AND gate, which is very particular about when it gives 1, and that settles the inputs.

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

Approach. Require both inputs of the NAND gate to be 1 and find the inputs that achieve it.

  1. Step 1: What the two gates compute

    The upper gate is an AND gate with inputs AA and BB, giving A⋅BA \cdot B. The lower gate is an OR gate with inputs BB and A‾\overline{A}, giving A‾+B\overline{A} + B.

  2. Step 2: Condition for a low output

    The NAND gate gives Y=0Y = 0 only if both of these are 1. A⋅B=1A \cdot B = 1 needs A=1A = 1 and B=1B = 1; for these inputs A‾+B=0+1=1\overline{A} + B = 0 + 1 = 1 as well. So Y=0Y = 0 when A=1A = 1 and B=1B = 1.

Answer. (A) A=1A = 1 and B=1B = 1

Sanity check. For each of the other three input pairs the AND gate gives 0, which by itself makes the NAND output 1.

Why the other options are wrong

  • (B) For A=0A = 0, B=1B = 1 the AND gate gives 0, so the NAND output is 1.
  • (C) For A=1A = 1, B=0B = 0 both the AND gate and the OR gate give 0, so the NAND output is 1.
  • (D) For A=0A = 0, B=0B = 0 the AND gate gives 0 although the OR gate gives 1, so the NAND output is 1.

Key takeaway

The trap. One input of a NAND at 0 is enough to make its output 1.

How toppers think. They start from the last gate and let it dictate what the earlier gates must give.

Remember. NAND gives 0 only for inputs 1 and 1.

More on Semiconductors