Every photo, every song, every message you have ever sent is stored as nothing but switches that are on or off. There is no third option anywhere in the machine — and by the end of this you will be able to count to 31 on one hand.
Most people can count to five on one hand.
You are about to be able to count to thirty-one on the same hand, using the same five fingers, with no tricks and nothing hidden. And when you can do it, you will have understood the one idea that everything else in a computer is built on top of.
It starts with a slightly rude question: why does a computer only know two numbers?
Ask around and someone will tell you: binary is a secret code, and the computer translates our real numbers into it.
That sounds reasonable. It has the direction completely reversed.
There is no real number sitting underneath waiting to be translated back. The switches are the number. What the computer shows on your screen — the shape `7`, the shape `42` — is the translation, done at the last possible moment, for your benefit.
And while we are at it: base ten is not natural either. Ten is not a special quantity. Nothing in the universe comes in tens on purpose. We count in tens because of an accident of anatomy — we have ten fingers, and we started by pointing at them.
Counting in tens is a human habit borrowed from our hands. Counting in twos is a machine habit borrowed from its switches. Neither is the true one.
Inside a processor, a single piece of information is held by a tiny switch. Current is flowing, or it is not.
Now imagine you wanted a switch that could hold ten different amounts instead — a tenth full, two tenths full, and so on. You would have to measure how much current was flowing, precisely, billions of times a second, in something the width of a few atoms, while it is warm and the wire next door is doing the same thing.
The measurement would go wrong constantly. Is that four tenths, or five? Nobody could ever be sure.
With two states there is nothing to measure. It is on, or it is off, and the gap between those is enormous compared to any wobble. So the machine is never confused about what it is holding. Two is not a limitation somebody settled for. Two is the choice that makes the whole thing reliable.
One of these switches — one on-or-off answer — is called a bit. Eight of them together are called a byte.
Here is the whole trick. Instead of every finger being worth 1, each finger is worth double the one before. Put a finger up and you add its value; leave it down and you add nothing.
Start with a fist. Raise them one at a time and watch the running total.
Using the doubling trick, how many DIFFERENT amounts can one hand of five fingers hold?
Every extra switch doubles how many different things you can say. So: 1 switch says 2 things, 2 switches say 4, 3 say 8, 4 say 16, and so on. Sort each job into the smallest number of switches that can do it.
Tap an item, then tap where it belongs
Engineers could build a switch with ten settings instead of two. They mostly do not. What is the real reason?
Somewhere in a computer's memory sit eight switches reading:
0 1 0 0 0 0 0 1
Use the doubling trick and that is the number 65. Definitely, arithmetically 65.
Except that in the standard text code every computer agrees on, 65 is the letter A. So it is also the letter A.
And if those eight switches happened to be part of a black-and-white photograph, 65 is a shade of dark grey. So it is also a shade of dark grey.
Here is the uncomfortable bit: the switches do not say which. There is nothing else in there. No label, no note, no hint. All three readings are equally available and the memory is completely silent on the question.
What decides is the program that opens it. The meaning was never stored — a person chose it, wrote it into a program, and the program applies that choice every time it looks.
A pattern of switches has no meaning of its own. Meaning is something a program brings with it.
You open a photo in a program built for text. The screen fills with thousands of random-looking characters. What has actually happened?
You’re previewing as a parent — nothing here is recorded.
The finger-counting figures are arithmetic, not measurements: place values of 1, 2, 4, 8, 16 sum to 31, and five two-state switches have 2^5 = 32 distinct arrangements including all-off. Likewise 2^3 = 8, 2^4 = 16 and 2^8 = 256, so eight switches represent the values 0 to 255. A single on-or-off value is a bit; eight bits are a byte. Binary place values are powers of two and every whole number has exactly one binary representation. The capital letter A is code point 65 in ASCII, which is 01000001 in eight-bit binary. ASCII is a published standard (ANSI X3.4) and its first 128 code points are shared by Unicode/UTF-8, which is why 65 means A across essentially all modern software. Digital circuits use two states because the voltage gap between 'high' and 'low' is large relative to electrical noise, leaving a wide margin for reliable reading; multi-level storage exists (for example multi-level-cell flash memory) but requires more careful sensing and is more error-prone, which is why processor logic is binary. Base ten is a human convention commonly attributed to counting on ten fingers; other bases have been used by human cultures, including base twenty and base sixty, the latter surviving in our 60-second minute.