Meet the NOT gate
The little circle on the tip of the triangle is the giveaway for a NOT gate. Whatever goes in, the opposite comes out.
The AND gate
The flat back and rounded front (a D shape) is the AND gate. Its truth table has a single 1, on the bottom row, where both inputs are 1.
The OR gate
The curved back and pointed front is the OR gate. Its truth table has a single 0, on the top row, where both inputs are 0.
Complete the truth tables
Name that gate
The NAND gate
Compare this table with the AND gate: every output is flipped. The AND shape with a bubble on the tip is the NAND gate.
The NOR gate
Compare this table with the OR gate: every output is flipped. The OR shape with a bubble on the tip is the NOR gate.
The XOR gate
Notice the pattern: 0 and 0 gives 0, 1 and 1 gives 0, but a mismatch gives 1. The double line on the back of an OR shape is the XOR gate.
Complete the truth tables
Same inputs. Different outputs.
Choose an input pair to see what each gate does with the same signals. Try 1, 1 to see where OR and XOR disagree.
- AND
- NAND
- OR
- NOR
- XOR
Read each pair together. NAND flips AND. NOR flips OR. XOR gives 1 only when the inputs differ.
Name that gate
Every combination, in order
Building up with a working column
Where the NOT sits matters
Two to finish yourself
One with two gates
Reading a logic circuit
Work a circuit the same way every time: start at the inputs, find the output of each gate in turn, and carry those values forward until you reach X.
A circuit with a NOT
Deal with the NOT as you reach it: invert the value on its input wire, then carry that result into the next gate.
From circuit to truth table
A circuit with two branches
One to finish
From circuit to expression
A AND B, and the OR joins that with C.Read the circuit backwards
Start at X. Follow its wire back to the final gate, then find where each input to that gate comes from.
1 · Find the final gate
X comes from OR. Its inputs are the wire labelled P and the wire from C. Write X = P OR C.
2 · Trace the wire P
Follow P back to the AND gate. A and B are its inputs, so P = A AND B.
3 · Put the expression together
Replace P with the entire AND expression. The brackets keep those two inputs together as one input to OR.
X = (A AND B) OR C
Write the expression yourself
A circuit with two branches
From a problem in words
A greenhouse fan output F switches on when the temperature is high (H = 1) and the window is closed (that is, NOT W), or when the manual override V is on.
One more from words
A door unlocks (output X) when the correct card C is present and either the PIN P is entered or the manager key M is used.
Warm-up: all six gates
The boiler: circuit to truth table
The boiler: write the expression
A new problem in words
A washing machine starts (output S) when the door is closed (D) and the start button is pressed (P), but not while it is in a fault state (F).
Exam-style challenge · Cold-room alarm
The alarm X sounds if the temperature is too high, or if the door is open while maintenance mode is off. X is 1 when the alarm sounds and 0 otherwise.
- H
- 1 when the temperature is too high, 0 otherwise
- D
- 1 when the door is open, 0 when closed
- M
- 1 when maintenance mode is on, 0 when off
Try each task on paper, in any order. Open its worked answer when you’re ready to compare.
1 · Write the Boolean expression
Maintenance must be off for the open-door condition, so use NOT M. Join it to D with AND. High temperature is a separate trigger, joined with OR.
X = H OR (D AND (NOT M))
2 · Draw the logic circuit using standard gate symbols
Send M through NOT. Feed its output and D into AND. Feed the AND output and H into OR, then label the final wire X.
3 · Complete the truth table for all eight input combinations
Work out NOT M first, then D AND (NOT M). When H is 1, the final OR outputs 1 even if maintenance mode is on.
| H | D | M | NOT M | D AND (NOT M) | X |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 0 | 0 | 1 |
The written finish
Quick Reference
Everything Topic 10 covers, in one place. Use it to revise before the exam or as a quick reference while you work through circuits.