🔢 Numbers

🔌Binary Numbers

Computers know only 0 and 1, yet they compute everything — the secret is a number system with just two digits.

You count with ten digits, 0 through 9. Yet every computer, phone and game console on Earth runs on just two: 0 and 1. They still manage to play movies, do your accounting and beat you at chess — thanks to a stripped-down number system called binary.

First, look back at base ten

Base ten's power lives in the places: the digit 3 means 3 in the ones place but 30 in the tens place. Each place is 10 times the one to its right, so 347 is really 3×100+4×10+73 \times 100 + 4 \times 10 + 7. You drilled this place-value trick in Place Value.

Here is the key: 10 is merely a choice. The trick does not care which base you pick — with 2, it builds a complete number system just as well.

Binary: every place ×2

Binary has only the digits 0 and 1, and each place is 2 times the one to its right. Reading right to left, the place values are 1, 2, 4, 8:

DecimalBinaryMeaning
111
210one 2
3112 + 1
4100one 4
51014 + 1
71114 + 2 + 1

Counting up — 0, 1, 10, 11, 100, 101, 110, 111 — feels like an odometer ticking over, except it carries when a place reaches two instead of ten.

InteractiveDecimal Contrast
Th
3
H
4
T
7
O
2

3,472

Read asthree thousand four hundred and seventy-two

Expanded form

3000 + 400 + 70 + 2

Dial the digits in this expander and feel how each step to the left multiplies a place by 10. Binary works exactly the same way — only the multiplier changes to 2.

Decimal to binary, and back again

Decimal to binary: keep halving. To convert 13, divide by 2 over and over, keeping the remainders.

  • 13 ÷ 2 = 6 remainder 1
  • 6 ÷ 2 = 3 remainder 0
  • 3 ÷ 2 = 1 remainder 1
  • 1 ÷ 2 = 0 remainder 1

Stop when the quotient reaches 0. Read the remainders from bottom to top: 1101. So decimal 13 is written 1101 in binary.

Read the remainders bottom-up

Keep dividing until the quotient is 0; the last remainder becomes the highest place. Verify on the spot: the place values of 1101 are 8, 4, 2, 1, and 8 + 4 + 1 = 13. It checks out.

The other direction is easier: add up the places. Every 1 contributes the value of its place: 1101=8+4+0+1=131101 = 8 + 4 + 0 + 1 = 13. A binary number is not a secret code, just an ordinary number unpacked into powers of 2 — the same move Scientific Notation makes with powers of 10.

Why computers love binary

What an electric circuit does best is tell two states apart: on and off — a perfect match for 1 and 0. With only two states to distinguish, a little voltage wobble never causes a misread. A single chip packs in billions of tiny switches, each holding one binary digit. Two digits look poverty-stricken, but their combinations are endless — every character on your screen is, at bottom, a long string of 0s and 1s.

Check yourself

Quick quiz

  1. 1. Binary 1010 equals which decimal number?

  2. 2. What is decimal 6 in binary?

  3. 3. In binary, what comes right after 1?