Home My space log
Language EN (English)

Parity magic

ages 8-10 30 minestimate Screen-free lesson

A card trick shows how a computer adds one extra row and column so it can find and fix a single mistake.

Steps

  1. Ask: have you ever had a disc or QR code that would not work? Computers often correct such mistakes automatically.
  2. Lay out a 5 by 5 square of black and white cards with no pattern.
  3. Add a sixth row and a sixth column so every row and every column has an even number of black cards. (This extra card is called a parity bit.)
  4. While everyone looks away, flip exactly one card.
  5. Find the one row and the one column that now have an odd number of black cards. The card where they cross is the flipped one.
  6. Pairs practise. Then try flipping two cards. What happens?

Talk about it

  • Why does the trick work?
  • What happens if two cards flip?
  • Where do computers use this idea?

CC BY-SA 4.0

Adapted from CS Unplugged by the University of Canterbury Computer Science Education Research Group (CS Unplugged), licensed CC BY-SA 4.0.

Original lesson, with pictures · License: CC BY-SA 4.0

There are no pictures here. The original lesson has the pictures and printables.

Changes made: Simplified, shortened and translated by Open Cosmos with AI

This adapted lesson is shared under the same license (CC BY-SA 4.0).