I am trying to construct the truth table for a combinational circuit with the following conditions :
A) Room with 4 doors , 1 light, a switch near each door that controls the light (4 in total)
B) If the position of one switch is changed, state of the light will change
Example : If the light is ON, it will go OFF and if it is OFF it will go ON
C) If all switches are closed, the light is ON
My steps:
1) A, B, C, D represent the 4 switches
2) if A = T then the first switch is closed
3) if A = F then the first switch is open
4) if B = T then the second switch is closed
5) if B = F then the second switch is open
5) ....
6) F means the light is OFF / T means the light is ON
A | B | C | D | Result
T T T T T
I am not sure how to construct the rest of table based on the above conditions, can someone explain ?
Let $0$ represent a closed position of the switch. Also let $0$ represent an OFF light. From $C$ we know that $$ 0000 \to 1$$
From $B$ we know that changing one switch changes the light, that is $$0001\to0$$ $$0010\to0$$ $$0100\to0$$ $$1000\to0$$
Change one more switch, and $$0011\to1$$ Now you'd need to figure out the state of the light for the other 10 combinations of switches' states (16 altogether). Can you take it from here?