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 provides extensive practice in converting between binary, denary, and hexadecimal — a core skill tested in OCR J277 Section 2.6. Conversion questions appear regularly in Paper 1 and often carry 2-4 marks.
graph TD
Bin["Binary"] <--> Hex["Hexadecimal"]
Bin <--> Den1["Denary"]
Hex <-->|"via binary or direct"| Den2["Denary"]
Den1 <--> Den2
There are six possible conversions. The most efficient routes are:
| From | To | Method |
|---|---|---|
| Binary | Denary | Add place values where bit = 1 |
| Denary | Binary | Place value or successive division by 2 |
| Binary | Hex | Group into nibbles (4-bit groups) |
| Hex | Binary | Expand each hex digit to 4 bits |
| Hex | Denary | Multiply digits by powers of 16 |
| Denary | Hex | Divide by 16, or convert via binary |
flowchart LR
Binary((Binary - base 2)) -->|place values 128 64 32 ... 1| Denary((Denary - base 10))
Denary -->|divide by 2 / place values| Binary
Binary -->|group into 4-bit nibbles| Hex((Hex - base 16))
Hex -->|expand each digit to 4 bits| Binary
Hex -->|x16 then x1 place values| Denary
Denary -->|divide by 16 OR via binary| Hex
Example 1: 01011010
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 |
64 + 16 + 8 + 2 = 90
Example 2: 11100001
128 + 64 + 32 + 1 = 225
Example 1: Convert 73 to binary
Using place values:
Result: 01001001
Check: 64 + 8 + 1 = 73. Correct!
Example 2: Convert 199 to binary
Result: 11000111
Check: 128 + 64 + 4 + 2 + 1 = 199. Correct!
Example 1: 10110100
Split: 1011 | 0100
Answer: B4
Example 2: 01111110
Split: 0111 | 1110
Answer: 7E
Example 1: Convert 9C to binary
Answer: 10011100
Example 2: Convert D7 to binary
Answer: 11010111
Example 1: Convert 5A to denary
Answer: 90
Example 2: Convert E3 to denary
Answer: 227
OCR Exam Tip: Always show your working in conversion questions. Even if you make an arithmetic error, you can gain method marks by demonstrating the correct process.
Complete the following conversions:
| Binary | Denary |
|---|---|
| 00101100 | 44 |
| 10010001 | 145 |
| 11110000 | 240 |
| 01010101 | 85 |
| Denary | Binary |
|---|---|
| 100 | 01100100 |
| 250 | 11111010 |
| 37 | 00100101 |
| 192 | 11000000 |
| Binary | Hex |
|---|---|
| 10101111 | AF |
| 01100011 | 63 |
| 11001010 | CA |
| 00010111 | 17 |
| Hex | Denary |
|---|---|
| 2A | 42 |
| FF | 255 |
| 80 | 128 |
| C9 | 201 |
| Mistake | Correction |
|---|---|
| Starting binary groups from the left | Always group from the right when converting to hex |
| Forgetting leading zeros | A nibble must always be 4 bits (e.g., 5 = 0101, not 101) |
| Confusing hex A-F with denary | A = 10, B = 11, C = 12, D = 13, E = 14, F = 15 |
| Not checking the answer | Always convert back to verify your result |
| Using the wrong place values | Binary: powers of 2. Hex: powers of 16. Do not mix them up. |
OCR Exam Tip: In the exam, if you have time, convert your answer back to the original number system to verify it. This takes seconds and can catch costly errors.
Web developers regularly work with hex colour codes. This worked example converts the code #2F9 (a shade of green) through all three number systems to reinforce how conversions chain together.
Setup. The hex colour shorthand #2F9 is the three-digit form of the full code #22FF99. For this exercise, we focus on the middle byte FF so we can demonstrate a round-trip in 8 bits.
Step 1: Hex to binary.
Result: 11111111.
Step 2: Binary to denary.
Use the 8-bit place value table:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255 — the maximum value for 8 bits, which corresponds to 100% intensity of the green channel in an RGB colour.
Step 3: Denary back to hex.
Divide 255 by 16: 255 / 16 = 15 remainder 15. Both the quotient and remainder map to F, so 255 = FF. Round-trip confirmed.
Step 4: Apply to a different channel.
Suppose we want to convert the red channel value 8C to denary to check RGB sliders in a graphics tool.
Total: 128 + 12 = 140. In binary: 8 = 1000, C = 1100, so 8C = 10001100. Place value check: 128 + 8 + 4 = 140. All three representations agree.
Step 5: Compose a full RGB code.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.