1-min guide

What is binary?

Binary is a way of writing numbers using only two digits, 0 and 1. A computer handles numbers as combinations of electricity “flowing (1)” and “not flowing (0).”

Reading time: about 1 min

More in the 5-min version →
1280 640 321 160 80 41 20 11 00100101 = 32 + 4 + 1 = 37
A lit bulb is 1, an unlit bulb is 0. The numbers are the place values

Each place is worth double

In the decimal numbers we use every day, places grow tenfold from the right: ones, tens, hundreds. In binary, they double from the right: 1, 2, 4, 8, 16, 32, 64, 128.

37 in binary

Starting from the biggest place, ask “does it fit?” 64 doesn’t fit in 37. 32 fits (5 left). 16 and 8 don’t fit. 4 fits (1 left). 2 doesn’t fit. 1 fits. Write 1 for the places that fit and 0 for the others, and you get 00100101.

8 bits: 0 to 255

One digit that is 0 or 1 is called “1 bit.” With 8 bits (= 1 byte) you can write 00000000 to 11111111 — that is, 256 values from 0 to 255. To write 256 you need one more bit. The “overflow” in the game is exactly this running out of digits.

Binary around you

Summary
  • Binary writes numbers using only 0 and 1
  • Place values double from the right: 1, 2, 4, 8…
  • 8 bits = 1 byte can represent 0–255
Go further: 5-min deep diveBinary in depth: hex, negative numbers and unitsTips for writing it short in hex, the “two’s complement” for negative numbers, and why 1 TB shows up as 931 GB.Read the 5-min version →