Number codes
Number codes replace each letter with a number. Here are three:
- A1Z26: each letter is its place in the alphabet: A = 1, B = 2… With the 27-letter Spanish alphabet, Ñ is 15 and the letters after it move up by one: O is 16 and Z is 27.
- Decimal: each character is its Unicode number, the one computers use to store text. A is 65, a is 97 and Ñ is 209. It works with any character, even emoji.
- Binary: each character is written as its UTF-8 bytes, 8 bits (zeros and ones) each. A is 01000001; Ñ takes two bytes and an emoji four.
A little history
Swapping letters for numbers is an ancient idea: the Greeks and the Hebrews used the letters of their alphabets to write numbers. Gottfried Leibniz described the binary system in 1703, and today it is the language of every computer. In 1963 the ASCII code was created for the letters of English; since that was not enough for other languages, Unicode followed, and today it numbers more than 150,000 characters, from Ñ to emoji.
Try it
Choose the code and the separator (space, dash or comma) and type your message. In A1Z26 only letters are encoded: digits and punctuation are left out, because a number would be mistaken for a letter, and words are separated by a slash (or by a space, if you separate with dashes). In decimal and binary everything is encoded, spaces included. To decode, any separator works; if a number matches no letter, you will see a question mark in its place.
Each letter is its place: A = 1 … Z = 26.
35 of 600 characters
20 15 13 15 18 18 15 23 / 23 5 / 15 16 5 14 / 20 8 5 / 20 18 5 1 19 21 18 5 / 3 8 5 19 20
The key
| Letter | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Becomes | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
In the classroom
- First steps. A1Z26 is ideal for primary school, since all it takes is counting. Before starting, ask students to write the alphabet with each letter's number under it.
- Secret sum. Encode a word and ask students to add up its numbers: the total is the combination of a number lock. HOLA, for example, adds up to 8 + 15 + 12 + 1 = 36.
- How computers think. With secondary students, compare decimal and binary: why does Ñ take two bytes when N takes only one? It is a good way into computing.
- Chain of clues. Give a message in binary whose solution leads to the next puzzle.
Tips
- If you use A1Z26 with 27 letters, tell students that Ñ counts: many English materials use 26 letters, and the numbers do not match.
- In binary, separate the bytes so they are easy to read; without separators, they are read 8 bits at a time.
- For younger students, keep the table in sight.
Printable worksheet
Practise this cipher on paper: a worksheet with the key and two exercises, ready to print or download with its answer key. Open the worksheet