How to construct the truth table for a combinational circuit

1.7k Views Asked by At

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 ?

2

There are 2 best solutions below

2
On

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?

0
On

$$\begin{array}{c|c|c|c|c} A&B&C&D&\text{Result}\\ \hline T&T&T&T&T\\T&T&T&F&F\\T&T&F&T&F\\T&T&F&F&T\\T&F&T&T&F\\T&F&T&F&T\\T&F&F&T&T\\T&F&F&F&F\\F&T&T&T&F\\F&T&T&F&T\\F&T&F&T&T\\F&T&F&F&F\\F&F&T&T&T\\F&F&T&F&F\\F&F&F&T&F\\F&F&F&F&T \end{array}.$$ I believe this is what you are looking for. If all switches are closed, then the light is on. If only three switches are closed, then the light is off. If only two switched are closed, then the light is on. If one switch is closed, the light is off. If no switches are closed, then the light is on.