Binary Numbers: How Computers Count Using Only 0s and 1s

Published Apr 14, 2026 Β· 6 min read

Every photo, video, text message, and app on your device is ultimately stored as sequences of 0s and 1s. Binary (base-2) is the fundamental language of digital computing.

Why Binary?

Computers use electrical signals that are either ON (1) or OFF (0). It's far more reliable to detect two states than ten. Each binary digit (bit) is a tiny switch, and 8 bits form one byte β€” enough to represent 256 different values (2^8).

Binary to Decimal Conversion

Each position represents a power of 2, right to left:

Binary1286432168421Decimal
101100001011022
1111111111111111255

10110 = 16 + 4 + 2 = 22

Decimal to Binary

Repeatedly divide by 2 and record remainders:

Common Bit Sizes

UnitBitsRangeExample Use
1 bit10-1True/false flag
1 byte80-255One ASCII character
2 bytes160-65,535Unicode character
4 bytes320-4.29 billionIPv4 address, integer
8 bytes640-18.4 quintillionModern integer, memory address

Binary Operations

Try it: Use our Binary Calculator to convert between binary, decimal, hex, and perform binary operations.
πŸ“š Sources: Khan Academy EPA