🔤 How letters become numbers
Why: See how text becomes numbers (and back).
Unlocks: Pictures — pixels are the same trick.
You now know the machine's dirty secret: it can only store numbers. So how does it hold this very sentence?
Simple: everyone agreed on a code. Give every letter a number — A is one number, B is another — and suddenly text is just a list of numbers, which switches can store happily. When your friend's phone receives those numbers, it looks them up in the same code book and draws the letters back on screen.
Kids have used this trick for centuries to pass secret notes: A=1, B=2, C=3… Let's use exactly that code to read a real machine message:
The code: A = 1, B = 2 … Z = 26. Decode the number message by tapping the right letters.
One code book for the whole world
Real computers use a giant shared code book called Unicode — it has a number for every letter in every language, plus every emoji. The letter A is 65. The Arabic letter م is 1605. The emoji 🐸 is 128,056. When you send a text message, you are really sending a list of numbers — and because every device on Earth owns the same code book, it arrives as words.
When you type the letter J, what does the computer actually store?