Computers without computers: binary cards and logic gates

Activity guide8 min read

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

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.

  1. Ask someone to make the number 5. (Face up: 4 and 1.)
  2. Make 11. (8 + 2 + 1.)
  3. Make 31. (All up.) Why can't you make 32?
  4. Take turns calling out a number from 0 to 31 and racing to make it.
  5. 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:

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:

  1. Person A secretly colours in squares to make a simple picture: a letter, a heart, an arrow.
  2. 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.)
  3. Person A hands over only the list of numbers.
  4. Person B turns the numbers back into bits and colours in a new grid.
  5. Compare the pictures.

Discuss:

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.

  1. AND gate: the gate stands only if A and B are both standing.
  2. OR gate: the gate stands if A or B (or both) is standing.
  3. NOT gate: one input; the gate does the opposite.
  4. 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".

  1. Round 1: slow. The guesser starts at 1 and counts upward: 1, 2, 3...
  2. Round 2: smart. The guesser always picks the middle of what is left.
  3. Count the guesses in each round. Try with different secret numbers.

Discuss:

Questions that match each lesson

LessonQuestion to ask
What is a computer?Where do input, process, output and store happen in these activities?
BitsHow do you count higher than 1 with only two states?
Everything is numbersHow can a picture travel as just a list of numbers?
Logic gatesWhat does a gate decide, and what does it ignore?
AlgorithmsWhich strategy is faster, and why?

Common misconceptions