You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
This lesson brings together all three number systems — binary, denary, and hexadecimal — and provides a comprehensive guide to converting between them. Fluency in these conversions is essential for the GCSE Computer Science exam.
| From | To | Method |
|---|---|---|
| Binary → Denary | Add up the place values of all 1-bits | Use the column headings: 128, 64, 32, 16, 8, 4, 2, 1 |
| Denary → Binary | Subtract place values or divide by 2 | Use place value method or successive division |
| Binary → Hex | Split into nibbles (4-bit groups) | Convert each nibble to its hex digit |
| Hex → Binary | Replace each hex digit with 4 bits | Use the hex-to-binary lookup table |
| Hex → Denary | Multiply digits by powers of 16 | First digit × 16 + second digit × 1 |
| Denary → Hex | Divide by 16 | Quotient = first digit, remainder = second digit |
flowchart LR
D[Denary] -->|place value or div by 2| B[Binary]
B -->|sum place values| D
B -->|nibble groups| H[Hexadecimal]
H -->|each digit -> 4 bits| B
D -->|divide by 16| H
H -->|digit x 16 + digit| D
Denary to Binary (place value method):
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 |
156 in binary = 10011100
Binary to Hex:
156 in hex = 9C
Check (Hex to Denary): 9 × 16 + 12 × 1 = 144 + 12 = 156. Correct!
Hex to Binary:
E7 in binary = 11100111
Hex to Denary:
Check (Binary to Denary): 128 + 64 + 32 + 4 + 2 + 1 = 231. Correct!
Binary to Denary:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 |
Binary to Hex:
01011010 in binary = 5A in hex
Misaligning place values: Always start from the right when assigning binary place values (1, 2, 4, 8, 16...). A common error is writing them left to right.
Forgetting to pad with leading zeros: When converting binary to hex, if the leftmost group has fewer than 4 bits, add leading zeros. For example, 110101 should be split as 0011 | 0101, not 1101 | 01.
Confusing hex letters with denary values: Remember A=10, B=11, C=12, D=13, E=14, F=15. Students sometimes write A=1 by mistake.
Losing the carry in binary addition: When you have 1+1+1 in a column, the result is 1 with a carry of 1. Do not forget to add the carry to the next column.
Try these conversions yourself, then check your answers:
| Denary | Binary | Hexadecimal |
|---|---|---|
| 45 | 00101101 | 2D |
| 100 | 01100100 | 64 |
| 170 | 10101010 | AA |
| 199 | 11000111 | C7 |
| 240 | 11110000 | F0 |
| 255 | 11111111 | FF |
| 128 | 10000000 | 80 |
| 63 | 00111111 | 3F |
Exam Tip: In the exam, always show your working. Even if you get the final answer wrong, you can pick up method marks by showing clear working. Write out the place values, show each step, and circle or underline your final answer.
The maximum value that can be represented depends on the number of bits:
| Bits | Maximum Unsigned Value | In Hex |
|---|---|---|
| 4 bits (nibble) | 15 | F |
| 8 bits (byte) | 255 | FF |
| 16 bits | 65,535 | FFFF |
The formula for the maximum value of n bits is: 2ⁿ – 1
Hex → Binary: 7 = 0111, B = 1011, so 7B = 01111011.
Binary → Denary:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 1 | 1 | 1 | 0 | 1 | 1 |
64 + 32 + 16 + 8 + 2 + 1 = 123.
Cross-check Hex → Denary directly: 7 × 16 + 11 = 112 + 11 = 123. The two routes agree.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.