Numbers in base 16
Hexadecimal (hex) uses sixteen digits: 0 to 9 and then A to F for the values ten to fifteen. Programmers like it because one hex digit equals exactly four binary digits, which makes long binary numbers short and readable.
You will meet hex in colour codes such as #FF5733, memory addresses, error codes and file dumps. This calculator adds, subtracts, multiplies, divides and applies AND, OR and XOR to hex numbers, and shows the answer in every common base.
How it is calculated
Worked example
FF + 1A
- In decimal
- 255 + 26 = 281
- Result in hex
- 119
- Result in binary
- 100011001
Hex digit table
Counting in hex goes 0 1 2 3 4 5 6 7 8 9 A B C D E F and then rolls over to 10, which is sixteen in decimal. The letters simply stand for the values ten to fifteen.
| Hex | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| Decimal | 10 | 11 | 12 | 13 | 14 | 15 |

