Logic gates and decisions
Answers are for parents and teachers.
1
Complete the output for an AND gate and an OR gate when A = 1 and B = 0.
| A | B | A AND B | A OR B |
|---|---|---|---|
| 1 | 0 | ? | ? |
AND: 1 AND 0 = 0. OR: 1 OR 0 = 1.
2
A shop alarm sounds if the back window is open (A) OR the side door is open (B). Make a truth table for it.
| A | B | Z |
|---|---|---|
| 0 | 0 | ? |
| 0 | 1 | ? |
| 1 | 0 | ? |
| 1 | 1 | ? |
Z = 0 for 0, 0. Z = 1 for 0, 1. Z = 1 for 1, 0. Z = 1 for 1, 1.
3
A NOT gate has the inputs 0 and 1. Write the outputs, and give one real example where the opposite is useful.
NOT 0 = 1 and NOT 1 = 0. For example: a lamp must be off when the room is bright (1) and on when it is dark (0).
4
Work out Z = (A AND B) OR C for A = 1, B = 0, C = 0 and then A = 0, B = 0, C = 1.
First case: 1 AND 0 = 0, then 0 OR 0 = 0, Z = 0. Second case: 0 AND 0 = 0, then 0 OR 1 = 1, Z = 1.
5
Design a circuit for a fridge reminder that beeps if the fridge door is open (O = 1) AND NOT someone is standing in front of it (P = 1 means someone is there). Write the plan Z = O AND (NOT P), the truth table and a test plan with two tests.
Truth table: O = 0, P = 0 gives 0. O = 0, P = 1 gives 0. O = 1, P = 0 gives 1 (beeps). O = 1, P = 1 gives 0. Two tests, for example: O = 1, P = 0 expected beeps; O = 1, P = 1 expected quiet. Any correct plan is accepted.