MCQMediumJEE 2026Logic Gates

JEE Physics 2026 Question with Solution

For the given logic gate circuit, which of the following is the correct truth table ?

Logic gate circuit with inputs n and m, one lower gate combining inputs, final gate producing output z, with interconnections shown between the three gates.
  • A
    Truth table with columns n, m, z and rows 0 0 gives 0, 0 1 gives 1, 1 1 gives 0, 1 0 gives 1.
  • B
    Truth table with columns n, m, z and rows 0 0 gives 1, 0 1 gives 1, 1 1 gives 0, 1 0 gives 0.
  • C
    Truth table with columns n, m, z and rows 0 0 gives 1, 0 1 gives 0, 1 1 gives 1, 1 0 gives 0.
  • D
    Truth table with columns n, m, z and rows 0 0 gives 1, 0 1 gives 0, 1 1 gives 0, 1 0 gives 0.

Answer

Correct answer:B

Step-by-step solution

Standard Method

Given: A logic gate circuit with inputs nn and mm is shown.

Find: The correct truth table for the output zz.

From the circuit working given in the solution:

  • Gate 1 (Top) is NAND, so
X=nmX = \overline{nm}
  • Gate 2 (Bottom) is OR, so
Y=n+mY = n + m
  • Gate 3 (End) is AND, so
z=XYz = X \cdot Y

Therefore,

z=(nm)(n+m)z = (\overline{nm})(n+m)

Using De Morgan's law,

z=(nˉ+mˉ)(n+m)z = (\bar{n} + \bar{m})(n+m)

Expanding,

z=nˉn+nˉm+mˉn+mˉmz = \bar{n}n + \bar{n}m + \bar{m}n + \bar{m}m

So,

z=0+nˉm+nmˉ+0z = 0 + \bar{n}m + n\bar{m} + 0

Hence,

z=nˉm+nmˉz = \bar{n}m + n\bar{m}

This is the XOR function.

The truth table of XOR is:

  • n=0,m=0z=0n=0, m=0 \Rightarrow z=0
  • n=0,m=1z=1n=0, m=1 \Rightarrow z=1
  • n=1,m=0z=1n=1, m=0 \Rightarrow z=1
  • n=1,m=1z=0n=1, m=1 \Rightarrow z=0

Therefore, the circuit represents XOR, and the correct option is B.

Using gate identification

Given: The circuit contains three gates connected in sequence.

Find: Which option matches the output truth table.

The hint states that XOR gate output is 11 only when the two inputs are different.

From the solution explanation, the combined output becomes

z=nˉm+nmˉz = \bar{n}m + n\bar{m}

This is exactly the Boolean expression of XOR.

So the required truth table must have output 11 for input pairs 0101 and 1010, and output 00 for input pairs 0000 and 1111.

Hence the matching truth table is the one corresponding to Option B.

Common mistakes

  • Mistake: Treating the top gate as an AND gate instead of a NAND gate. Why it is wrong: the inversion at the output changes nmnm to nm\overline{nm}. What to do instead: identify the small bubble at the output carefully before writing the Boolean expression.

  • Mistake: Assuming the final output is obtained from only one intermediate gate. Why it is wrong: both intermediate outputs feed the last gate, so the final expression must include both XX and YY. What to do instead: write the output of each gate separately and then combine them in the final stage.

  • Mistake: Matching the XOR pattern in the wrong row order. Why it is wrong: truth tables may list rows in different orders such as 00,01,11,1000, 01, 11, 10 or 00,01,10,1100, 01, 10, 11. What to do instead: compare row by row using the exact input ordering shown in each option.

Practice more Logic Gates questions

Get unlimited AI-adaptive practice, mastery tracking, and an AI tutor that explains every step — free to start.

Related questions