
How computers use binary code to represent letters and numbers
Computers are just rows of fastidious light switches. They don't "know" what a letter is; they just see a "yes" or a "no"—either electricity is flowing or it isn't. It’s like sorting laundry into whites and colors, but doing it billions of times a second.
To store a word, the machine follows a rigid pattern, like a knitting chart or seaside signal flags. Each character is just a unique sequence of eight "ons" and "offs." It’s quite a fuss for a text, but that’s the secret language behind your screen.
It’s about having enough "slots" to fit the alphabet without things getting muddled. If you only had three switches, you'd only get eight patterns—hardly enough for a grocery list, let alone Shakespeare.
Eight switches give you 256 unique combinations. That’s plenty for capitals, lowercase, and those pesky punctuation marks. It’s like a grand chest of drawers where every handkerchief has its own specific spot.
They tried smaller sets early on, but it was a right mess. Eight became the standard "byte" because it was the perfect balance—useful, but not too much faff.
You've hit the nail on the head. 256 spots is fine for a tea party, but a disaster once the whole world wants an invite. When we added emojis and complex scripts, the chest simply burst.
To fix it, we started stacking those drawers. Instead of one byte, we link two or four together for a single symbol. It’s like adding an extension to the cottage when you've run out of guest rooms.
This system, called Unicode, is a bit more faff but stores over a million characters. Now, every obscure symbol has its own tidy spot.
It uses a clever bit of labeling right at the start. Think of it like a color-coded sticker on the handle. The very first few switches in the sequence act as a signal to tell the computer exactly what’s coming next.
If the first switch is a "zero," the machine knows it’s just one simple drawer—no fuss. But if it sees a specific row of "ones," it’s a signal to keep pulling out drawers until the set is complete.
It’s like a recipe that tells you halfway through to check the next page for the rest of the ingredients. A bit of extra faff, certainly, but it keeps the emojis from getting tangled up with the alphabet.
Spot on, dear. It’s a bit like using half your suitcase just for the luggage tags. When we use those first few switches as "stickers," we do lose a bit of space for the actual character data.
In a four-drawer stack, we might spend several switches just saying "more is coming!" It’s a tax we pay for the convenience of global communication. Without those labels, the computer would just see a giant, meaningless jumble of ons and offs.
It’s a small price to pay to ensure your "hello" doesn't accidentally turn into a picture of a dancing shrimp. A necessary bit of faff to keep the peace.
Related topics
How a computer uses 'queues' to handle information in order
The logic of 'database indexing' for finding information quickly
The way a computer screen uses pixels to display images
The way 'responsive design' makes a website fit any screen size
The logic of 'pathfinding algorithms' for navigating digital maps
The way a computer uses 'encryption' to keep messages private