Students follow wired circuits row by row, then build circuits to match truth tables, including NOT and OR from NAND gates alone and XOR from AND, OR and NOT (AC9TDI8K04 node 3, extended; the kit names adder circuits as going further).
From gates to a processor · Building with gates · about 45 minutes · Open the student lesson
Classroom resources
Load these into Waypoints Prepare: choose Load URL and paste the copied address, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.
SlidesDownload Present from the browser, or export to PowerPoint or PDF.
WorksheetDownload Print the student copy; the Teacher edition has the answers.
Students will be able to
I can work out a circuit's output, gate by gate.
I can build a circuit to match a truth table.
I can explain why NAND gates can build anything.
Timing
Predict and Try 6 min · Worked example 10 min · Vary 15 min · Practise and Make 14 min
Before class
Try the boards yourself; wire by clicking a ● (from) then a pin (to), and click a wired pin to unplug it.
The one idea: each gate uses only what arrives on its own wires. Data representation's Why binary: logic gates is assumed (AND, OR, NOT, truth tables); start with a two-minute recap if the class hasn't done it recently.
This course is an extension (Years 9–10). Its lessons are tagged AC9TDI8K04 node 3 (why binary: circuits and logic gates), which the kit says adder circuits go further from.
Unplugged first works well: students as gates holding cards, passing 0s and 1s along strings.
Running the lesson
Predict: students who said off are reading the switches, not the OR gate's output.
Try: ask what one word describes this circuit (NOR, not-OR).
Worked example: model the order: a gate can only be worked out once everything wired into it is known.
Vary: after NOT from NAND, ask what A NAND A means in words.
Make: compare circuits: did anyone use fewer gates?
The hard part (on purpose)
Wiring is fiddly at first and the first circuits don't match. Let the wanted column's crosses do the telling: students change one wire and watch which rows turn green.
When students get stuck
What you will see
A question to ask
The fix
A student feeds the switches into every gate in their head (Sam's mistake).
Follow gate 3's wire back. Where does it start?
Each gate uses its own wires only.
A student can't start building.
Which rows need a 1? What do those rows have in common?
Build the gate for that pattern, then fix the rows that are wrong.
Answers to the checks
OR, then NOT: A and B go into an OR gate. The OR gate's output goes into a NOT gate, which lights the lamp. Both switches are off. Is the lamp on? On. OR of 0 and 0 is 0; the NOT gate gets that 0 and flips it to 1.
Try: follow the wires: Flip the switches to try all four rows. When is the lamp on?
Only when both are off: OR then NOT is the opposite of OR. It has its own name, NOR.
Gate by gate (A = 1, B = 1): In the four-gate circuit (OR, AND, NOT, AND), A = 0 and B = 1. What does gate 3, the NOT gate, output? 1 Gate 2: 0 AND 1 = 0. Gate 3 flips that: 1.
Find the mistake: Sam works out the four-gate circuit. Click the line where it first goes wrong. line 4 Line 4: gate 3 is wired from gate 2, which gave 0, so NOT 0 = 1. Then gate 4 is 1 AND 1 = 1, and Q = 1.
Name it: The four-gate circuit gives 1 when exactly one switch is on. Which gate does that on its own? XOR XOR (exclusive or): one or the other, not both. Here it is built from OR, AND and NOT.
NAND: Add gates and wire them so every row matches the wanted column (NAND: not both). Click a ● to wire from, then a pin to wire to.
AND, then NOT: the opposite of AND.
A and not B: Now the lamp should light only when A is on and B is off.
NOT B, then AND it with A.
NOT from NAND: Only NAND gates this time, and one switch. Make a NOT. (Hint: both inputs can come from A.)
A NAND A is NOT A: if both inputs are the same, "not both" is just "not".
OR from NAND: Only NAND gates. Make OR.
NOT A and NOT B (each a NAND with itself), then NAND them together: three NANDs make OR. NAND can build every gate, which is why chips are made of them.
NOT then AND: A goes into a NOT gate. Its output and B go into an AND gate. A = 0, B = 1. What is the output? 1 NOT 0 = 1; 1 AND 1 = 1.
NAND then NOT: A and B go into a NAND gate; its output goes into a NOT gate. Which single gate is that the same as? AND NOT (NOT (A AND B)) = A AND B: two flips cancel.
Review: rows: Review: a circuit has 3 switches. How many rows does its truth table have? 8 2 × 2 × 2 = 8 patterns of three bits.
build XOR: Build XOR (exactly one switch on) from AND, OR and NOT gates.
You built a circuit from a truth table. Adders are next: XOR turns out to be half of adding.
Solutions
One possible solution for each task. Other correct programs are fine.
Vary: build to a table › NAND
Open task: any program that does what the step asks.
Vary: build to a table › A and not B
Open task: any program that does what the step asks.
Vary: build to a table › NOT from NAND
Open task: any program that does what the step asks.
Vary: build to a table › OR from NAND
Open task: any program that does what the step asks.
build XOR
Open task: any program that does what the step asks.
Stretch and support
Stretch: Build XOR from four NAND gates. Then: why would a chip factory rather make one kind of gate?
Support: Truth table cards for AND, OR, NOT and NAND to keep on the desk.
Exit ticket
A and B go into an AND gate; its output goes into a NOT gate. What is the output for A = 1, B = 1, and what is this circuit called?
1 AND 1 = 1, NOT 1 = 0. It is NAND (not both).
What each step is for
OR, then NOT: Committing to the output of a two-gate circuit tests the new move: the second gate uses what the first gate gives it.
Try: follow the wires: Trying all four rows on the wired circuit settles the prediction and shows the new move: each gate works on what reaches it.
Worked example: row by row: Working a four-gate circuit one gate at a time models the new move. Sam feeds a switch into a gate that is wired to another gate, the misconception planted after the method.
Vary: build to a table: Each task changes one thing about the target: NAND from AND and NOT, A AND NOT B, then NOT and OR from NAND gates alone (a gate input may take the same wire twice).
read the circuit: Reading circuits without the board is the same move in mixed forms, plus a review of how many rows a truth table has.
build XOR: Building XOR from its truth table reverses the process: start from the wanted outputs and choose and wire the gates.
Where it leads
Next: Adding with gates (half and full adders).
Links: Data representation › Why binary: logic gates (the introduction). For keen students and teachers, the free course From NAND to Tetris (nand2tetris.org) builds a whole computer from NAND gates.