Waypoint
πŸ”’
technologyΒ·ThinkerΒ·12 min

Binary Numbers: The Language Every Computer Speaks

β€œEvery photo you've ever taken, every song you've listened to, every message you've sent β€” all of it, inside the computer, is nothing but ones and zeros. Not because engineers liked the idea. Because electricity gave them no choice.”

Count to ten. Easy. You do it every day without thinking: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10.

When you reach nine, you run out of single digits and add a new column on the left. That's because humans count in base-10: ten digits (0 through 9), and each column is worth ten times the one to its right.

Why ten? Almost certainly because we have ten fingers.

Computers don't have fingers. They have transistors β€” tiny electronic switches that can be either on or off. Nothing in between. No "kind of on." No "three-quarters on." Just two states.

So computers count in base-2: two digits (0 and 1), and each column is worth two times the one to its right. This is binary.

How Binary Works

In decimal, the columns are worth 1, 10, 100, 1,000 (powers of 10). In binary, the columns are worth 1, 2, 4, 8, 16, 32, 64, 128 (powers of 2).

To read the binary number 11001000:

| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |-----|----|----|----|----|---|---|---| | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 |

Where there's a 1, add that column's value: 128 + 64 + 8 = 200.

That's it. Binary is just a different way of writing the same numbers we already know. 200 in decimal and 11001000 in binary are identical values expressed two different ways β€” the same way "two hundred" and "200" and "CC" (in Roman numerals) are the same number.

Bits and Bytes

Each binary digit is called a bit (from "binary digit"). A single bit stores one of two values: 0 or 1.

Eight bits grouped together make a byte. One byte can hold 2⁸ = 256 different values β€” the numbers 0 through 255.

This is why 256 appears everywhere in computing:

  • Screen colour channels go 0–255 (one byte each for red, green, blue)
  • Old computer keyboards had 256 possible characters (one byte per character)
  • IP addresses use numbers 0–255 for each of their four sections
  • Sound samples, image brightness, network ports β€” all built on multiples of bytes

What Bits Actually Store

Here's the part that surprises people: a byte is just a number. What it means depends entirely on how you use it.

The byte 11001000 (decimal 200) could be:

  • The number 200
  • The red component of a bright-red pixel
  • Part of a letter in a text file
  • One sample of audio data
  • Part of an instruction for a processor

The computer doesn't "know" which one. The program using the data decides how to interpret it. This is why you can't just open a music file as if it were a document β€” the same bits mean completely different things depending on context.

Why Not Use Decimal?

It seems natural to ask: why not build computers that use base-10, like humans?

The answer is physical. A transistor has two reliable states: fully conducting electricity, or fully blocking it. Building circuits that distinguish ten different voltage levels β€” "this is a 4, this is a 5, no wait it's a 3" β€” would require enormous precision and be unreliable, especially as transistors get smaller and smaller.

Binary maps onto the physical world perfectly. On = 1. Off = 0. Reliable, simple, fast β€” even at billions of operations per second.

Everything digital β€” the screen you're reading this on, the music playing in your headphones, the camera taking your photo β€” is ultimately a very fast, very organised machine flipping billions of switches on and off. Binary is the unavoidable consequence of building computers from electricity.

Ready to explore?

5 interactive activities waiting in the next tab.

⚑Daily Challenge · Calculate

A standard colour image stores each pixel as three bytes: one for red (0–255), one for green (0–255), one for blue (0–255). That's 3 bytes = 24 bits per pixel. How many different colours can be represented? A 12-megapixel photo has 12,000,000 pixels. How many bytes does it take to store it uncompressed? And why do JPEG files end up much smaller?

Reflect

Every piece of digital information β€” every conversation, every photograph, every song β€” is ultimately a very long sequence of ones and zeros, stored as tiny electrical charges. The digital world is nothing but an enormous, carefully organised collection of switches in positions that we have agreed to interpret as meaning something. Does that change how you think about digital things?