Convert decimal to hexadecimal
255 in decimal is FF in hexadecimal. Each digit is multiplied by its place value — the base raised to the digit's position, counting from zero on the right — and the products are added. The page prints every one of those products rather than only the total. The conversion is exact: bases are positional notation for the same number, so nothing is rounded and the result can be checked digit by digit.
Conversion rules checked · How we check
255 in decimal
FF
How it gets there
- Divide by 16, keeping the remainders
- 255 ÷ 16 = 15 remainder F 15 ÷ 16 = 0 remainder F
- Read the remainders upwards
- The last remainder is the leading digit.
decimal to hexadecimal, at a glance
Hexadecimal is how bytes are written down: two digits cover 0 to 255 exactly, which is why colours, memory addresses and character codes all appear in it.
| decimal | hexadecimal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 8 |
| 9 | 9 |
| 10 | A |
| 11 | B |
| 12 | C |
| 13 | D |
| 14 | E |
| 15 | F |
| 16 | 10 |
Why is the working shown?
Every other converter of this kind prints the answer and stops. A base is a positional system, so the answer is a sum you can check: each digit is multiplied by the base raised to its position, and the results are added. Going the other way is repeated division, reading the remainders upwards. Neither is a black box, and this page refuses to be one.