Cover lesson · Computer Science · Year 7 · Beginner

Binary code bracelets

DCF: Data and computational thinking → Problem-solving and modelling

Name: Class: Date:

Cover teacher — you need no subject knowledge and no computers

Print: this sheet, one per pupil. Pupils need a dark and a light coloured pencil. If the school has beads and elastic they can thread a real bracelet afterwards, but the whole lesson works with pencils.

Run: 5 min read how the code works · 10 min the conversion practice table · 10 min decode the mystery bracelet · 15 min design your own bracelet for a five-letter Welsh word · 10 min the four "how many patterns?" questions.

Collect: this sheet. Every answer is on the worked example sheet, including all 26 letter codes, so you can mark it without doing any binary yourself.

What you are doing

A computer stores a letter as a pattern of on and off. You are going to use the same idea with beads: a dark bead is a 1 and a light bead is a 0. Five beads per letter is enough for the whole alphabet. You will decode a bracelet somebody else made, then design your own and check it works.

Step by step

  1. 5 min — Read "How the code works" and do the first line of the practice table with your partner.
  2. 10 min — Complete the conversion practice table. Show the place-value working.
  3. 10 min — Decode the mystery bracelet. Write the bits, then the number, then the letter.
  4. 15 min — Choose a five-letter Welsh word and design your bracelet. Colour the beads in.
  5. 10 min — Answer the four questions about how many patterns are possible.

How the code works

Step 1: turn the letter into its position in the alphabet. Step 2: turn that number into five binary digits using the place values below. Step 3: colour a dark bead for every 1 and a light bead for every 0, left to right.

The five place values

Bead1st2nd3rd4th5th
Worth168421

Add up the values of the dark beads and you get the number. For example 01101 is 8 + 4 + 1 = 13, and 13 is the letter M. Going the other way, take the letter, find its number, then keep asking "does 16 fit? does 8 fit?" and write 1 or 0 for each.

Letter to number

ABCDEFGHIJKLM
12345678910111213
NOPQRSTUVWXYZ
14151617181920212223242526

Conversion practice

Fill in every empty cell. The working column is where the marks are.

LetterNumber5-bit codeWorking
M13011018 + 4 + 1 = 13, and 16 and 2 are not needed
A
G
L
S
Z
10100
00110

Decode the mystery bracelet

Five letters. It is somewhere you can see from a school window in north Wales.

Bracelet to decode: five letters of five beads letter 1 letter 2 letter 3 letter 4 letter 5 Top line: write the five bits. Bottom line: write the number, then the letter.

The word is: ___ ___ ___ ___ ___

Design your own bracelet

Choose a five-letter Welsh word — for example CYMRU, DRAIG, CALON, GWLAD or TEULU, or a five-letter place name such as CONWY or TYWYN. Write your word, work out the codes, then colour the beads: dark for 1, light for 0.

LetterNumber5-bit codeWorking
Blank bracelet strip of five letters, five beads each letter 1 letter 2 letter 3 letter 4 letter 5 Top line: write the five bits. Bottom line: write the number, then the letter.

Now swap with a partner and decode theirs without being told the word. Their word was: _______________

How many patterns?

QuestionYour answer
1. How many different patterns can you make with 5 beads?
2. What is the largest number 5 beads can show, and what is its pattern?
3. Why would 4 beads per letter not be enough for the alphabet?
4. There are some patterns left over after the 26 letters. How many, and what could you use them for?

Success criteria

If you finish early