Loading simulator…
From the behavioral table, Alarm Output = 1 whenever either Door Sensor or Motion Sensor is 1.
| Door Sensor | Motion Sensor | Alarm Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
So the required function is OR.
OR, NOR, and NOT gates are prohibited, so use the available AND and XOR gates.
Let:
A = Door Sensor
B = Motion Sensor
Use AND and XOR to generate two intermediate signals:
X = A · B
Z = A ⊕ B
Now check the required output using X and Z:
| A | B | X = A · B | Z = A ⊕ B | Y |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 1 |
From the table:
Y = X ⊕ Z
Substituting X and Z:
Y = (A · B) ⊕ (A ⊕ B)
Therefore:
Alarm Output =
(Door Sensor · Motion Sensor)
⊕
(Door Sensor ⊕ Motion Sensor)
Connect both sensor inputs to an AND gate and an XOR gate, then connect those two outputs to the final XOR gate to generate Alarm Output.