objectives
By the end you'll be able to…
- Explain the difference between denary (base-10) and binary (base-2).
- Convert an 8-bit number from denary → binary and back.
- Add two 8-bit binary numbers together and spot an overflow error.
- Perform a left or right binary shift and describe its effect.
denary
Denary (Base-10)
Denary is the number system we use every day. It has 10 digits (0–9). Each column has a place value that increases by a factor of 10 as you move left.
| 1000s | 100s | 10s | 1s |
|---|---|---|---|
| 103 | 102 | 101 | 100 |
| 3 | 2 | 6 | 8 |
Reading left to right: (3 × 1000) + (2 × 100) + (6 × 10) + (8 × 1) = 3268.
binary
Binary (Base-2)
Binary has only 2 digits (0 and 1). Each column has a place value that doubles as you move left.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 |
128, 64, 32, 16, 8, 4, 2, 1. If you can write these out fast at the start of the exam, every conversion becomes easy.
🖱️ Try it: click the bits
Click any bit to flip it on/off. Watch the denary value update instantly.
With 8 bits you can represent 0 to 255 (0000 0000 to 1111 1111). At GCSE you'll only ever be asked to work with 8 bits.
denary → binary
Converting denary to binary
The reliable method: write out the place values, then walk left → right, deciding "does this fit?" at each column.
- Write the place values: 128, 64, 32, 16, 8, 4, 2, 1.
- Does 128 fit into 45? No → 0. Does 64? No → 0. Does 32? Yes → 1. Subtract: 45 − 32 = 13.
- Does 16 fit into 13? No → 0. Does 8? Yes → 1. 13 − 8 = 5.
- Does 4 fit into 5? Yes → 1. 5 − 4 = 1.
- Does 2 fit into 1? No → 0. Does 1? Yes → 1. 1 − 1 = 0. Done.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 |
45 = 00101101 in binary. Check: 32 + 8 + 4 + 1 = 45 ✅
🖱️ Try it: build any number 0–255
Type a denary number and see the binary. Then use the interactive bits above to check yourself.
Conversion questions are usually worth 2 marks: 1 for the answer, 1 for the working. Always leave the place-value table on the page.
binary → denary
Converting binary to denary
Even easier: write out place values above the bits, then add up the columns with a 1.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 |
Add the values where there's a 1: 64 + 32 + 2 + 1 = 99.
🖱️ Try it
If the binary number ends in 1, the denary answer must be odd. If it ends in 0, the answer must be even. Use this to sanity-check your conversion.
addition
Binary addition
Adding binary works just like column addition in denary — but with only 5 golden rules:
| Sum | Answer | Meaning |
|---|---|---|
| 0 + 0 | 0 | write 0 |
| 0 + 1 | 1 | write 1 |
| 1 + 0 | 1 | write 1 |
| 1 + 1 | 10 | write 0, carry 1 |
| 1 + 1 + 1 | 11 | write 1, carry 1 |
Start from the rightmost column, work left. Add each column, applying the rules.
1001 (9) + 0100 (4) = 1101 (13) ✅
00011001 (25) + 10001001 (137) = 10100010 (162) ✅
Always write carries clearly — either above or below the sum. There are marks for the working, and examiners want to see where the carries went.
overflow
Overflow errors
An overflow error happens when the result of a binary addition needs more bits than are available to store it.
At GCSE we work with 8 bits. The biggest 8-bit number is 11111111 (255). If an addition produces a result bigger than 255, a 9th bit would be needed — but it can't be stored. That's an overflow.
The correct answer would be 256, but 256 needs a 9th bit. Only 8 bits are stored, so the result reads as 0. That extra 1 (highlighted in red) is the overflow.
If an addition question is followed by "what problem has been caused?" — the answer is almost always overflow error.
shifts
Binary shifts
A binary shift moves every bit a set number of places to the left or right.
- Left shift by 1 → multiplies by 2. Left shift by 2 → multiplies by 4. Left shift by n → multiplies by 2n.
- Right shift by 1 → divides by 2. Right shift by 2 → divides by 4. Right shift by n → divides by 2n.
- Empty columns are filled with 0.
- Bits that fall off the end are lost — this can cause loss of precision or overflow/underflow.
Every bit moves 1 place left. The bit in the 128 column falls off. The 1 column is filled with 0.
Result: 01010000 = 64 + 16 = 80. 40 × 2 = 80 ✅
Every bit moves 1 place right. The bit in the 1 column falls off. The 128 column is filled with 0.
Result: 00010100 = 16 + 4 = 20. 40 ÷ 2 = 20 ✅
🖱️ Try it — click the bits, then shift
Set a starting number by clicking bits, then press "shift left" or "shift right".
Right shifts of odd numbers lose data. E.g. shifting 00000101 (5) right by 1 gives 00000010 (2), not 2.5. This is called loss of precision.
practice
Exam-style practice
Q1. Convert the denary number 213 to 8-bit binary.
Q2. Convert the binary number 10110111 to denary.
Q3. Add these binary numbers: 01101100 + 00010101.
Q4. Perform a left shift of 2 on 00001110. What is the effect?
Q5. Adding 11111110 and 00000011 causes what error, and why?
// end of topic 2 — binary