Binary and Denary

GCSE Computer Science · Data Representation

Why computers use binary

Computers are built from millions of tiny switches (transistors) that can only be in one of two states: on or off. We represent these two states with the digits 1 (on) and 0 (off). A number system with only two digits is called binary, or base 2.

Humans normally count in denary (also called decimal, or base 10) using the ten digits 0–9. To make computers useful, we constantly convert between the binary the machine understands and the denary that people read.

  • A single binary digit (a 1 or 0) is called a bit.
  • 8 bits = 1 byte. One byte can store 256 different values (0–255).
  • A group of 4 bits is called a nibble.

Place value — the key idea

Both systems use place value, where each column is worth a fixed amount.

In denary, columns are powers of 10: … 1000, 100, 10, 1.

In binary, columns are powers of 2. For one byte (8 bits) the column headings are:

1286432168421
2⁷2⁶2⁵2⁴2⁰

Each column is double the one to its right. Learn these eight headings by heart — almost every binary question relies on them.

Binary → Denary

Write the binary number under the column headings, then add up the headings wherever there is a 1.

Example: convert 01101010 to denary.

128  64  32  16   8   4   2   1
 0    1   1   0   1   0   1   0

Add the headings with a 1 above them: 64 + 32 + 8 + 2 = 106.

Denary → Binary

Work from the largest heading (128) down to 1. For each heading ask: "Does it fit into what's left?" If yes, write 1 and subtract it; if no, write 0.

Example: convert 77 to binary.

  • 128 into 77? No → 0
  • 64 into 77? Yes → 1, leaves 13
  • 32 into 13? No → 0
  • 16 into 13? No → 0
  • 8 into 13? Yes → 1, leaves 5
  • 4 into 5? Yes → 1, leaves 1
  • 2 into 1? No → 0
  • 1 into 1? Yes → 1, leaves 0

Result: 01001101. Check: 64 + 8 + 4 + 1 = 77. ✓

Units of storage

UnitSize
Bita single 1 or 0
Nibble4 bits
Byte8 bits
Kilobyte (KB)1000 bytes
Megabyte (MB)1000 KB
Gigabyte (GB)1000 MB
Terabyte (TB)1000 GB

Each unit up is ×1000 (some boards/older systems use ×1024 — check which your board expects; AQA and OCR use ×1000).

The largest value in n bits

  • The biggest number in n bits is 2ⁿ − 1 (all 1s).
  • The number of different values in n bits is 2ⁿ.

So 8 bits gives 2⁸ = 256 values, the largest being 2⁸ − 1 = 255 (11111111).

Worked example

How many values can be stored in 4 bits, and what is the largest?

  • Number of values: 2⁴ = 16 (0 to 15).
  • Largest value: 2⁴ − 1 = 15 (1111).

Common mistakes

  • Miscounting the column headings — always write all eight (128…1) before you start.
  • Confusing "largest value" (2ⁿ − 1) with "number of values" (2ⁿ).
  • Dropping leading zeros — a byte answer should have 8 digits (e.g. 00001101, not 1101).

Exam tips

  • Write the place-value headings above the number every single time — it prevents slips and often earns a method mark.
  • Always check by converting back the other way.
  • Remember: adding one bit doubles the range of numbers you can store.

Key facts to remember

  • Binary = base 2 (digits 0 and 1); denary = base 10.
  • 8 bits = 1 byte; column headings 128, 64, 32, 16, 8, 4, 2, 1.
  • n bits store 2ⁿ values; the largest is 2ⁿ − 1.
Don't understand a part?

Sign in and ask our AI tutor to explain any passage in plain English.

Try AI explanations →

More on Data Representation

Hexadecimal Binary Arithmetic and Shifts Characters, Images and Sound Compression

← All GCSE Computer Science notes