OCR J277 requires knowledge of denary (base 10), binary (base 2), and hexadecimal (base 16). This lesson focuses on converting between denary and binary.
All data in a computer is represented as electrical signals — either ON (1) or OFF (0). Binary maps directly to these two states. Every piece of data — text, images, sound, programs — is ultimately stored and processed as sequences of 0s and 1s.
For an 8-bit binary number, each position (bit) has a place value that is a power of 2:
| Bit position | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|
| Column value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Power of 2 | 2⁷ | 2⁶ | 2⁵ | 2⁴ | 2³ | 2² | 2¹ | 2⁰ |
The most significant bit (MSB) is on the left (value 128); the least significant bit (LSB) is on the right (value 1).
Method: Identify which bits are 1, then add up their column values.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 |
1s are in columns: 128, 32, 16, 4, 1
128 + 32 + 16 + 4 + 1 = 181
Method: Work from the largest column value downward. Subtract if it fits (put 1), skip if it doesn't (put 0).
Result: 01001011
Check: 64 + 8 + 2 + 1 = 75 ✓
| Denary | Binary (8-bit) | Check |
|---|---|---|
| 0 | 00000000 | — |
| 1 | 00000001 | 1 |
| 10 | 00001010 | 8+2=10 |
| 25 | 00011001 | 16+8+1=25 |
| 100 | 01100100 | 64+32+4=100 |
| 200 | 11001000 | 128+64+8=200 |
| 255 | 11111111 | 128+64+32+16+8+4+2+1=255 |
Note: 255 is the maximum value for an 8-bit binary number (all bits = 1). An 8-bit number can represent 256 values: 0–255.
8 questions · 18 marks · Show all working
10 questions · 10 marks · 10 minutes
| Term | Definition |
|---|