Binary place values
Computers represent data using bits. An unsigned 8-bit value has place values 128, 64, 32, 16, 8, 4, 2 and 1. Its highest value is 255.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 |
01011010₂ = 64 + 16 + 8 + 2 = 90₁₀.
Why hexadecimal?
One hexadecimal digit represents exactly four binary bits. Group binary from the right into nibbles: 1010 1111₂ = AF₁₆. Hexadecimal uses 0–9 and A–F (10–15).
Overflow
If an unsigned 8-bit addition exceeds 255, the ninth carry bit cannot fit in 8 bits. For example, 250 + 10 = 260: stored in 8 bits, the lower eight bits encode 4, with an overflow carry.
Try it
1. Convert 11010110₂ to decimal. 2. Convert 157₁₀ to 8-bit binary. 3. Convert 1111 0010₂ to hexadecimal. 4. Explain why 200 + 100 overflows in 8 bits.
Check worked answers
1. 214. 2. 10011101. 3. F2. 4. 300 exceeds the maximum 8-bit unsigned value of 255.
