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.