16 min read
Why Computers Use Binary
Electronic switches have two states, so computers store everything as bits — and group bits into bytes.
Two States Are Easy and Reliable
Inside a computer are billions of transistors — tiny electronic switches. A switch is either off or on. We write off as 0 and on as 1.
A system with only two states is called binary. Computers use it because:
- It is reliable. Telling "on" from "off" is easy even when the voltage wobbles a little. Telling apart ten different voltage levels (for decimal) would cause many errors.
- It is simple and cheap to build. Two-state switches are small, fast and use little power, so billions fit on one chip.
- It matches logic. True/false decisions map directly to 1/0. You will build on this in the Boolean Algebra course.
- Everything can be coded in it. Numbers, text, pictures, sound and programs can all be turned into patterns of 0s and 1s.
Bits, Nibbles and Bytes
Four bits are sometimes called a nibble (half a byte). One nibble is exactly one hexadecimal digit — which is why hex is so useful.
With n bits you can make 2ⁿ different patterns:
| Bits | Different patterns | Range of whole numbers |
|---|---|---|
| 1 | 2 | 0–1 |
| 4 (a nibble) | 16 | 0–15 |
| 8 (a byte) | 256 | 0–255 |
| 16 | 65,536 | 0–65,535 |
Bigger Units
| Units of data | ||
|---|---|---|
Everything Becomes Binary
Practice
What is the largest whole number that can be stored in one byte (8 bits)?
Your answer
More lessons in Number Systems · Next: Converting Any Base to Decimal · Previous: Place Value and Number Bases
