Correct : c
Let switch A = ground floor switch and switch B = first floor switch. Let 0 = switch down and 1 = switch up. The bulb is ON when the two switches are in opposite states (one up, one down) and OFF when both are in the same state (both up or both down).
Building the truth table:
A=0, B=0 → Bulb OFF (both down, same state) → Output = 0
A=0, B=1 → Bulb ON (opposite states) → Output = 1
A=1, B=0 → Bulb ON (opposite states) → Output = 1
A=1, B=1 → Bulb OFF (both up, same state) → Output = 0
This truth table — output is 1 only when inputs differ — is exactly the XOR gate (Exclusive OR). Toggling either switch always changes the bulb state regardless of the other switch, which is precisely what XOR does: flipping one input always flips the output.
AND gate gives 1 only when both inputs are 1 — does not match. OR gate gives 1 whenever either input is 1 — does not match (would never turn bulb OFF once either switch is ON). NAND gives 0 only when both are 1 — also doesn''t match. Only XOR matches perfectly.
Correct answer: C — XOR gate ✓
Similar Questions
Total Unique Visitors