Inside a computer are tiny switches that can only be on or off. On is written 1 and off is 0. One switch makes 2 patterns, two make 4, three make 8: every switch you add doubles the patterns. Patterns of switches are how a computer stores numbers.
Inside a computer there are billions of tiny switches, and each one can only be on or off. How can that store a number, or a letter?
A switch is either on or off: nothing in between. On is written 1 and off is written 0. Each card on the board is one switch: face up is on, face down is off.
How this lesson works: Predict, Try, Investigate, Modify, Practise, Make
Predict: Read the problem and decide what you think before you try anything. A wrong guess is fine: it shows you what to look for.
Try: Try it on the board and compare the result with your prediction.
Investigate: Work out why it happens, one step at a time.
Modify: Change the problem on purpose and see what happens.
Practise: A few on your own, to check you have it.
Make: Make your own problem using what you have learned. Expect a few tries; that is normal.
Make your prediction first. Help opens once you've locked it in.
PredictRead the problem and decide what you think before you try anything. A wrong guess is fine: it shows you what to look for.
Two switches
TryTry it on the board and compare the result with your prediction.
Try: find every pattern
Was your guess right?
Try it yourselfYour edits are saved in this browser.
Flip the cards to make every pattern you can. Count them as you go. Finish with both cards face up.
Use the board. This ticks when you get there.
InvestigateWork out why it happens, one step at a time.
Worked example: three switches
Worked exampleBefore each step, say what you think comes next.
00,01,10,11Two switches: 4 patterns.
000,001,010,011A third switch, off, in front of each one.
100,101,110,111The third switch on, in front of each one.
4+4=8Three switches: 8 patterns. Each switch you add doubles them.
Now: what does face up mean?
Sam counts the patterns for two switches. Click the line where it first goes wrong.
How many patterns can three switches make?
ModifyChange the problem on purpose and see what happens.
Vary: add switches
Try it yourselfYour edits are saved in this browser.
Press Add a card until there are three cards.
Use the board. This ticks when you get there.
With three cards, make the pattern on, off, on (left to right).
Use the board. This ticks when you get there.
Add one more card in your head. How many patterns can four switches make?
PractiseA few on your own, to check you have it.
Switches
How many patterns can five switches make?
MakeMake your own problem using what you have learned. Expect a few tries; that is normal.
A secret signal
Then: with your partner, make up a code where each pattern of three cards means something (8 messages). What would you choose?
Try it yourselfYour edits are saved in this browser.
Students flip dot cards as switches, write on as 1 and off as 0, list the patterns two and three switches make, and see that each switch doubles the patterns (AC9TDI6K04 node 1). About 35 minutes.
I can say what happens to the patterns when I add a switch.
Before class
Do the boards yourself first. The cards are CS Unplugged's binary cards; doing it with real cards first works well. Here the dots don't count yet: this lesson is only on and off.
The one idea: on/off switches are written 1 and 0, and each switch doubles the number of patterns. No powers or place value needed; listing and doubling is enough.
Year 7–8 catch-up: How many patterns? (8K04 n2) does this with 2ⁿ; this lesson is the idea before the notation.
Running the lesson
Predict: students who chose 3 missed all off; ask what 0 would look like.
Try: have pairs say each pattern aloud as they flip.
Worked example: build the 8 patterns on the board from the 4.
Make: let partners invent a three-card code.
The hard part (on purpose)
Leaving out all off (two switches make 3). Ask every time: is all face down a pattern too?
When students get stuck
A student counts 3 patterns for two switches (Sam's mistake). Ask: What do the cards show when they're both face down? Fix: All off is a pattern too: 4.
A student adds instead of doubling (3 switches: 6). Ask: For each of the 4 patterns, how many ways can the new switch go? Fix: Two each: 8.
Stretch and support
Stretch: How many switches would you need to give every student in your school their own pattern?
Support: A card: up = on = 1, down = off = 0. 1 switch: 2, 2: 4, 3: 8, 4: 16.
Where it leads
Next: Counting dots (patterns become numbers).
Year 7–8: Bits and binary numbers, How many patterns?
What each step is for
two switches: Committing to a number of patterns tests the new move: list every pattern, including all off.
Try: find every pattern: Flipping two cards through every pattern settles the prediction; ending on both up confirms the last one.
Worked example: three switches: Listing three switches' patterns by adding a switch to each two-switch pattern models the move: each switch doubles the patterns. Sam skips all off, the mistake planted after the method.
Vary: add switches: Each task adds a switch or sets one pattern, so doubling is seen, not told.
switches: Reading patterns as 1s and 0s, doubling, and why computers use switches at all.
a secret signal: Setting a pattern from its 1s and 0s reverses the move: students turn the written pattern into switches.