Deep down, a computer can only tell two things apart: a wire is on or off, 1 or 0. Everything — this page, your photos, every Python program — is built from those two digits. To understand computers, you first have to understand how they count. The good news: once you've played with the simulator below, conversions you used to fear become almost mechanical.
1Why computers count in twos
We humans count in base 10 (decimal) — ten digits, 0 to 9 — almost certainly because we have ten fingers. A computer has no fingers; it has electrical switches that are either on or off. So it counts in base 2 (binary) — just two digits, 0 and 1. Each binary digit is called a bit.
A number system is defined by its base (also called the radix) — how many distinct digits it uses:
| System | Base | Digits used | Where you meet it |
|---|---|---|---|
| Binary | 2 | 0, 1 | Inside every computer |
| Octal | 8 | 0–7 | Compact shorthand for binary |
| Decimal | 10 | 0–9 | Everyday human counting |
| Hexadecimal | 16 | 0–9, A–F | Colours (#FF6B00), memory addresses |
#FF6B00 is just three hex numbers.- A number system's base (radix) is how many digits it uses: binary 2, octal 8, decimal 10, hex 16.
- Computers use binary because their switches have two states: on (1) and off (0).
- Hexadecimal uses A–F for the values 10–15.
2Place value — the key idea
Every conversion rests on one idea you already know from decimal: place value. In decimal, the number 365 means:
3 × 10² + 6 × 10¹ + 5 × 10⁰ 300 + 60 + 5 = 365
Each position is the base raised to a power, increasing right-to-left. The exact same rule works in any base — just change the base. So binary 101101 means:
1×2⁵ + 0×2⁴ + 1×2³ + 1×2² + 0×2¹ + 1×2⁰ 32 + 0 + 8 + 4 + 0 + 1 = 45
- Place value: each position is the base raised to a power, increasing right to left (…b², b¹, b⁰).
- Any base → decimal: multiply each digit by its place value and add.
- Binary 101101 = 32+8+4+1 = 45.
3See it live — the Number System Simulator
Type any whole number below and watch it appear instantly in all four systems, with the working shown. Try the examples from above (like 45), then explore: what is 255 in hex? What is binary 11111111 in decimal? Play until the patterns click.
- The same value looks different in each base, but it is the same quantity.
- 255 = 11111111 (binary) = 377 (octal) = FF (hex) — a useful one to remember.
- Each extra binary digit doubles the largest number you can represent.
4Converting by hand (for the exam)
The simulator builds intuition, but in the exam you convert by hand. Here are the methods you must know.
Decimal → Binary (repeated division by 2)
Divide by 2 repeatedly, noting each remainder, then read the remainders bottom to top:
45 ÷ 2 = 22 remainder 1 ↑ 22 ÷ 2 = 11 remainder 0 | 11 ÷ 2 = 5 remainder 1 | read 5 ÷ 2 = 2 remainder 1 | upward 2 ÷ 2 = 1 remainder 0 | 1 ÷ 2 = 0 remainder 1 | 45 = 101101 in binary
Binary → Decimal
Use place value (topic 2): add up the powers of 2 where there's a 1.
The binary–octal–hex shortcut
This is the exam time-saver. Because 8 = 2³ and 16 = 2⁴:
- Binary ↔ Octal: group binary digits in 3s (from the right); each group is one octal digit.
- Binary ↔ Hex: group binary digits in 4s (from the right); each group is one hex digit.
101101 → groups of 4: 0010 1101 → 2 D → hex 2D 101101 → groups of 3: 101 101 → 5 5 → octal 55
- Decimal→binary: divide by 2 repeatedly, read remainders bottom-to-top.
- Binary→octal: group bits in 3s; binary→hex: group bits in 4s — always from the right.
- Pad short left-hand groups with zeros.
★ Practical: convert without the simulator
Cover the simulator and do these by hand, then check yourself:
- Convert decimal 90 to binary (repeated division by 2).
- Convert binary 110011 to decimal (place value).
- Convert binary 11011010 to hexadecimal (group in 4s).
- Convert hexadecimal A5 to decimal, then to binary.
Ready for the chapter test?
Answer 5 questions. Score 60% or more to mark this chapter complete.
Start the test →💡 Log in to save your progress and earn the certificate.