;colony/science  / Computers, Visually  / How do computers count with only 1s and 0s?
Computers, Visually

How do computers count with only 1s and 0s?

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

Plate 24 — Eight switches value = Σ bᵢ·2ⁱ · 2⁸ = 256
Tap the squares; press +1 and watch the carry ripple.
Predict firstBefore you flip the bits: how high can eight on/off switches count?
128643216842100101010+32+8+242decimal · 0x2A hex · "*" in ASCIItap the squares — each is worth double its neighbour
PLATE 24 · 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.
Try with the plate
  • Flip bits to spell the number 42 in binary.
  • Set all eight bits to 1 and read the maximum value.

Computers count in binary because they are built from transistors that reliably hold only two states: on and off, 1 and 0. Each binary column is worth double the one before, so eight switches (a byte) span 256 values — enough for any number up to 255 or any keyboard character.

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.

The common mix-up

Most people think computers use 1s and 0s as some arbitrary code. In fact a transistor is reliable only when fully on or fully off, so binary is the most noise-proof alphabet electronics can speak — not a quirky preference.

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.

Remember this

Everything a computer shows you is switches that are on or off; with each column worth double the last, eight of them already span any number to 255.

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.

Common questions

Why do computers use base 2 instead of base 10?

A transistor is brilliant at being fully on or fully off but unreliable at in-between voltages. Two trusted states make binary essentially immune to noise, so it is the most reliable alphabet electronics can speak.

How can ones and zeros become letters and pictures?

The bits mean nothing alone. 01000001 is the number 65 unless we agree it is the letter "A" (ASCII), or a pixel's redness, or a fragment of sound. Agreed codebooks give the bytes meaning.

Why do old games sometimes break at 256?

A single byte caps at 255, so the next value rolls over. Pac-Man breaks on level 256 and old RPGs cap stats at 255 — the byte overflowing, visible in the wild.

Built & checked by Nilesh Singh · how this is made · last updated June 2026