Students try every combination of two switches in a circuit to build AND and OR truth tables, use NOT, then add two bits with a half adder, to explain why digital systems are built on binary (AC9TDI8K04 node 3).
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 give the output of AND, OR and NOT gates.
I can explain why computers use binary.
I can show how gates add two bits.
Timing
Predict and Try 7 min · Worked example 10 min · Vary 10 min · Practise and Make 13 min
Before class
Try the boards yourself. A torch, a battery and two real switches (or a breadboard) make the Try concrete in a minute.
The one idea (the kit's chain for this node): electronic components have two reliable states → those states are 0 and 1 → gates combine them → so binary is the foundation of all computing. The half adder in Make shows gates doing the binary addition students know from lesson 5.
Simplifications: real gates are made of transistors, not mechanical switches; the circuit view is an analogy that holds for AND and OR.
Running the lesson
Predict: students who chose "yes" picture parallel wiring. Ask them to trace the current.
Try: have students fill a paper truth table as the board's fills.
Worked example: before the OR line, ask what changes when the switches sit side by side.
Vary: ask why AND has only one row that gives 1.
Make: connect to 1 + 1 = 10 in binary and to carrying in base 10.
The hard part (on purpose)
Students read OR as everyday English (one or the other, not both). Point at the circuit: with both switches on, is there still a path for the current?
When students get stuck
What you will see
A question to ask
The fix
A student writes 1 OR 1 = 0 (Sam's mistake).
With both switches on side by side, can the current reach the lamp?
Yes: OR means at least one. One but not both is XOR.
A student thinks gates add (1 AND 1 = 2).
How many states can the output wire have?
One bit: 0 or 1. Adding takes several gates, as in the half adder.
Answers to the checks
two switches in a line: A battery, two switches and a lamp are wired in one loop, one switch after the other. Switch A is **on** and switch B is **off**. Does the lamp light? No. With the switches in a line, the current has to pass through both, so B being off breaks the loop. The lamp lights only when A AND B are on.
Try: every combination: Click the switches to try all four combinations of A and B. When does the lamp light?
Only when both switches are on: 1 AND 1 = 1. Every other row gives 0. That is an AND gate.
Truth tables: Two switches side by side (an **OR** gate). A = 1 and B = 0. What is the output? 1 OR gives 1 when A or B is 1 (or both). A is 1, so the output is 1.
Find the mistake: Sam fills in the OR gate's truth table. Click the line where it first goes wrong. line 5 Line 5: OR gives 1 when at least one input is 1, so 1 OR 1 = 1. "One or the other but not both" is a different gate, XOR.
Why binary?: Why are computers built on binary, not on ten levels for the digits 0 to 9? Switches have two states that are easy to tell apart, and gates can combine them to do any calculation Two states are reliable even with a noisy signal, and switches wired as gates (AND, OR, NOT) can be combined to add, compare and store anything.
OR with one on: Switch the gate to OR. Turn on only A. What is the output?
OR needs only one input on: 1 OR 0 = 1.
OR with both on: Keep OR and turn B on too.
1 OR 1 = 1: both on still counts as at least one.
NOT: Switch to NOT. Turn A off. What comes out?
NOT flips its one input: NOT 0 = 1.
AND's one row: Switch back to AND and make the output 1.
Only one row gives 1: A = 1 and B = 1.
Does B matter?: An AND gate has A = 0. Does it matter what B is? No: the output is 0 whatever B is AND needs both. With A = 0, the output is 0 for either B.
AND: What is **1 AND 0**? 0 AND gives 1 only when both are 1.
NOT: What is **NOT 1**? 0 NOT flips 1 to 0.
Alarm: A car alarm should sound if the door is opened **or** the window is broken. Which gate? OR Either input should set it off, so OR.
Machine guard: A machine should run only when the guard is closed **and** the start button is pressed. Which gate? AND Both must be true: AND.
Review: binary: Review: what number is **110** in binary? 6 110 = 4 + 2 = 6.
add two bits: This circuit adds two bits: the sum is A XOR B and the carry is A AND B. Set the switches so the answer is 10 in binary (2).
1 + 1 = 10 in binary: the sum bit is 0 and the carry is 1, just like 5 + 5 = 10 carries a 1 in base 10. Chains of these gates add numbers of any size.
Solutions
One possible solution for each task. Other correct programs are fine.
Vary: change the gate › OR with one on
Open task: any program that does what the step asks.
Vary: change the gate › OR with both on
Open task: any program that does what the step asks.
Vary: change the gate › NOT
Open task: any program that does what the step asks.
Vary: change the gate › AND's one row
Open task: any program that does what the step asks.
Vary: change the gate › Does B matter?
Open task: any program that does what the step asks.
add two bits
Open task: any program that does what the step asks.
Stretch and support
Stretch: A full adder adds three bits (two numbers and a carry in). Sketch how two half adders and an OR gate could make one.
Support: Keep the three truth tables on the board for the whole lesson.
Exit ticket
Fill in the output: 1 AND 1, 0 OR 1, NOT 0. Why are computers built on binary?
1, 1, 1. Switches have two reliable states, and gates combine them to do any calculation.
What each step is for
two switches in a line: Committing to whether the lamp lights with one of two switches in a line tests the new move: in series, the output is 1 only when both inputs are 1 (AND).
Try: every combination: Trying all four combinations on the circuit settles the prediction and fills the truth table: only 1 and 1 lights the lamp.
Worked example: AND and OR: Building the AND and OR truth tables row by row, then the chain from two states to computing, models the new move. Sam reads OR as one or the other but not both, the misconception planted after the method.
Vary: change the gate: Each task changes one thing: the gate (AND to OR), the inputs (one on, both on), then NOT's single input, then the only row that lights AND.
gates: Outputs of AND, OR and NOT for given inputs, choosing a gate for a real rule, and a review of binary from lesson 5.
add two bits: Making a half adder show 1 + 1 = 10 reverses the process: students choose the inputs for a wanted output, and see gates doing binary addition.
Where it leads
Next: Bits all the way down (tracing text and colours to binary).
Code links: and, or and not in Python and MakeCode conditions are these gates; the Robotics course uses them to combine sensor readings.