Explainer · 6 min read
Binary Numbers for Beginners: How Computers Count
Learn to read and write binary in ten minutes — place values, converting to and from decimal, hexadecimal shortcuts and how text becomes 0s and 1s.
Why computers use binary
A computer chip is built from billions of tiny switches that are either off or on. Binary — base 2 — uses exactly two digits, 0 and 1, so it maps perfectly onto those switches. Every number, letter, photo and song is ultimately stored as patterns of bits.
Place values
In decimal each place is worth ten times the one to its right (1, 10, 100…). In binary each place is worth twice as much: 1, 2, 4, 8, 16, 32, 64, 128.
- 1011 = 8 + 0 + 2 + 1 = 11
- 11111111 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
- 100000000 = 256
Decimal to binary
Repeatedly divide by 2 and write down the remainders, then read them bottom to top. 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1 → 1101.
Hexadecimal: binary's shorthand
Hex is base 16, using 0–9 then A–F. One hex digit is exactly four bits, so a byte (8 bits) is always two hex digits: 1111 1111 = FF = 255. That's why colours like #FF8800 and memory addresses are written in hex.
How text becomes binary
Each character has a number. In UTF-8 the letter A is 65 = 01000001 and a is 97 = 01100001. Emoji and accented letters use two to four bytes. Try typing your name into the Binary Translator to see it as bits.