Design a hall light circuit to the following specification. There is a
switch at each end of a hall that controls a single light. If the light is
off, changing the position of either switch causes the light to turn on.
Similarly, if the light is on, changing the position of either switch
causes the light to turn off. Write your assumptions, derive a truth
table, and implement the circuit in AND, OR, and NOT gates.
- 0 means switch (S1 or S2) is down and 1 means it's up.
- 0 means light is off and 1 means it's on.
- If both switches are down, the light is off. Therefore, if one
switch is down and the other up the light is on, and if both switches are
up the light is again off.
Note: this is the truth table for an exclusive-or.