Computers without computers: binary cards and logic gates
Unplugged activities for learning how computers work: count in binary with cards, draw pictures from numbers, and be a logic gate.
You can understand how a computer works without touching one. These four unplugged activities use cards, paper and people to act out the ideas in the How computers work lessons. They suit a class, a family, a study group, or two friends. Each takes about 10 minutes, so a whole session is about 40.
The approach is inspired by the computer science unplugged tradition of teaching computing with games and no screens.
What you need
- Paper, pencils and some squared paper
- Five cards or sheets, each marked with dots: 1, 2, 4, 8 and 16
- A few sheets of coloured paper, or hats, for the logic gate activity
- A timer (optional)
Activity 1: Binary cards
Link to the lessons: Bits: why computers count in ones and zeros.
Lay the five cards in a row, biggest on the left: 16, 8, 4, 2, 1. Each card is a bit: face up (dots showing) means 1 and face down means 0.
- Ask someone to make the number 5. (Face up: 4 and 1.)
- Make 11. (8 + 2 + 1.)
- Make 31. (All up.) Why can't you make 32?
- Take turns calling out a number from 0 to 31 and racing to make it.
- Now count from 0 to 31, one at a time, flipping only the cards that must change. Watch how the right-hand card flips every time, the next every second time, and so on.
Discuss:
- What happens to the cards when you add 1?
- How many numbers can 5 cards make? (32.) What about 6 cards? (64.)
- Why do computers like two states, face up and face down?
Extension: write your age, or your birthday, in binary.
Activity 2: Pictures from numbers
Link: Everything is numbers.
On squared paper, draw a grid 8 squares wide and 8 tall. In pairs:
- Person A secretly colours in squares to make a simple picture: a letter, a heart, an arrow.
- Person A writes down each row as a string of 1s and 0s (1 is coloured, 0 is blank), then turns each row into a number. (Use the cards from Activity 1 to help.)
- Person A hands over only the list of numbers.
- Person B turns the numbers back into bits and colours in a new grid.
- Compare the pictures.
Discuss:
- What happens if one number is wrong? (One row of the picture changes.)
- How could you store colours? (Use more bits for each square, or three numbers for red, green and blue.)
- Why does a bigger picture need more numbers?
Activity 3: Human logic gates
Link: Logic gates.
Choose two people as inputs, A and B. Each is either standing (1) or sitting (0). A third person is the gate. They watch the inputs and follow a rule to stand or sit as the output.
- AND gate: the gate stands only if A and B are both standing.
- OR gate: the gate stands if A or B (or both) is standing.
- NOT gate: one input; the gate does the opposite.
- XOR gate: the gate stands if A and B are different.
Go through every combination of A and B (sit-sit, sit-stand, stand-sit, stand-stand) and write it in a truth table.
Build an adder. Use one XOR gate and one AND gate, both watching the same two inputs. The XOR person is the sum, and the AND person is the carry. Test: what happens for 0+0, 0+1, 1+0, and 1+1? (The last gives sum 0 and carry 1, which is the binary number 10.)
Discuss: How would you build this out of two switches and a lamp? (Series for AND, parallel for OR. You can try this in Circuit Rescue.)
Activity 4: The guessing game
Link: Algorithms: step-by-step instructions.
One person thinks of a secret number from 1 to 100. The other person guesses, and the first says only "higher" or "lower".
- Round 1: slow. The guesser starts at 1 and counts upward: 1, 2, 3...
- Round 2: smart. The guesser always picks the middle of what is left.
- Count the guesses in each round. Try with different secret numbers.
Discuss:
- What is the most guesses the smart method ever needs? (7.)
- What about the numbers 1 to 1,000? (10.) A million? (20.)
- Why does halving help so much?
Questions that match each lesson
| Lesson | Question to ask |
|---|---|
| What is a computer? | Where do input, process, output and store happen in these activities? |
| Bits | How do you count higher than 1 with only two states? |
| Everything is numbers | How can a picture travel as just a list of numbers? |
| Logic gates | What does a gate decide, and what does it ignore? |
| Algorithms | Which strategy is faster, and why? |
Common misconceptions
- "Computers understand what they are doing." Your human gates never understood anything either. They followed a rule. Computers do the same, only billions of times faster.
- "Binary is a different kind of maths." It is the same numbers, written with only two digits.
- "Smarter means faster." A good algorithm beats raw speed. The guessing game shows it.