Fill in the blanksQuestion 1 · Recall
Loading…
By the end you can convert between hexadecimal, binary and denary, in any direction, without a calculator.
Hexadecimal (hex) needs sixteen digits. After 0 to 9 we run out of symbols, so letters step in:
| Denary | 10 | 11 | 12 | 13 | 14 | 15 |
|---|---|---|---|---|---|---|
| Hex | A | B | C | D | E | F |
| Binary | 1010 |
1011 |
1100 |
1101 |
1110 |
1111 |
Hex columns are powers of 16: 1, 16, 256, 4096 … You'll see hex written as &4A (the Cambridge style in assembly language), 0x4A or 4A₁₆. They all mean the same number.
, so one hex digit is exactly four bits (a nibble). Converting between them is a lookup, not a sum.
Denary can't do this: 10 isn't a power of 2, so its digits don't line up with groups of bits. That's why people write binary in hex: it's a quarter of the length. (Where that helps is the next lesson.)
Worked example: Binary to hex (and back)
Convert 1011011110 to hex.