;colony/science  / Computers, Visually  / Binary numbers
Computers, Visually · No. 51 of the first 100

Binary numbers

Everything your computer has ever shown you — this sentence included — is switches that are either on or off.

Plate XXIV — Eight switches value = Σ bᵢ·2ⁱ · 2⁸ = 256
Tap the squares; press +1 and watch the carry ripple.
128643216842100101010+32+8+242decimal · 0x2A hex · "*" in ASCIItap the squares — each is worth double its neighbour
FIG. XXIV — EIGHT SWITCHES
Quick set
These 8 bits say
42
Possible values
256= 2⁸
Each square is a switch worth double the one to its right: 1, 2, 4, 8… With just eight on-or-offs you can spell every number from 0 to 255 — press "A" and you're looking at how this very page stores the letter A. Try +1 from 255 and watch every switch flip at once.
The short answer

Computers can only hold "on" and "off", so they count with just 1 and 0. The trick: each switch is worth double the one before — 1, 2, 4, 8… With eight switches you can already spell any number up to 255, or any letter on your keyboard.

What's actually happening

Why two? Because a transistor — the switch computers are made of — is brilliant at exactly two things: fully on and fully off. A voltage that's "roughly 3.7" can be misread; a voltage that only needs to be "high or low" is essentially immune to noise. Binary isn't a quirky preference, it's the most reliable alphabet electronics can speak. So computers took the two symbols they could trust and built everything from them.

Counting in twos works exactly like counting in tens, with smaller bus fares. In decimal, each column is worth ten times the last: units, tens, hundreds. In binary, each column doubles: 1, 2, 4, 8, 16… The byte — eight binary digits — became the standard scoop of data, holding any value from 0 to 255. The number 42 is 00101010: a 32, an 8, and a 2, switched on.

The real magic is that the bits don't mean anything by themselves. 01000001 is the number 65 — unless we've agreed it's the letter "A" (ASCII), or a pixel's redness, or a fragment of a song's waveform. Text, photos, video, this page: all of it is bytes, given meaning by agreed-upon codebooks. When people say "everything is ones and zeros", that is not a metaphor. It is an inventory.

Try it at home Count to 31 on one hand
  1. 1Assign your thumb 1, index 2, middle 4, ring 8, little finger 16.
  2. 2A raised finger is a 1, lowered is 0. Three = thumb + index. Five = thumb + middle.
  3. 3Count up from zero, flipping fingers like the +1 carry in the simulator. One hand reaches 31; two hands reach 1,023.