Question:

A bulb in a staircase has two switches, one at the ground floor and one at the first floor. The bulb can be turned ON or OFF by either switch, regardless of the other switch’s state. The logic of this switching resembles _______.

Show Hint

When a device toggles based on a mismatch between two inputs, it's a typical XOR function.
Updated On: Jun 23, 2025
  • an AND gate
  • an OR gate
  • an XOR gate
  • a NAND gate
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

The staircase logic described is a classic case of XOR gate behavior:

Let switch A and B be at ground and first floor respectively.
If both switches are in the same state (ON-ON or OFF-OFF), the bulb is OFF.
If switches are in opposite states (ON-OFF or OFF-ON), the bulb is ON.

This matches the XOR truth table:
\[ \begin{array}{c|c|c} A & B & A \oplus B \\ \hline 0 & 0 & 0 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \\ \end{array} \]

Hence, the bulb logic = XOR operation.
Was this answer helpful?
0
0