Ch 2 · Counting in Binary · Theory

Topic 2 of 14 in Data Representation — How Computers Store Everything as Numbers — 4 lessons.

Place Value, Base 2

The numbers you use every day are denary (base 10): each column is worth ten times the one to its right (1, 10, 100, 1000…). Binary works exactly the same way, but each column is worth twice the one to its right.

Binary → Denary, in Code

You do not need this code in the exam — but running it makes the pattern click. It adds the place value wherever a bit is 1.

Denary → Binary

To convert denary to binary, subtract the largest column value you can, mark a 1, and repeat. Convert 77:

Your Turn: Convert It

All topics in Theory Data-representation

  1. Why Computers Use Binary
  2. Counting in Binary
  3. Hexadecimal — Shorthand for Binary
  4. Binary Addition & Overflow
  5. Negative Numbers — Two's Complement
  6. Logical Binary Shifts
  7. Representing Text
  8. Representing Images
  9. Representing Sound
  10. Storage Units & Compression
  11. Floating-Point Numbers (A Level)
  12. More Number Representations
  13. File Organisation & Access (A Level)
  14. Check Your Understanding