Decimal to Hexadecimal (decimal to hex)
Divide the number by 16 again and again; each remainder (0 to 15, written 0 to F) is one hex digit, read from the last to the first.
Binary
1111 1111Octal
377Decimal
255Hexadecimal
FFShow the working
| Divide | Quotient | Remainder (digit) |
|---|---|---|
| 255 ÷ 16 | 15 | F |
| 15 ÷ 16 | 0 | F |
| Read the remainders from the bottom up: FF | ||
Decimal to hexadecimal table
| Decimal | Hexadecimal |
|---|---|
0 | 0 |
9 | 9 |
10 | A |
15 | F |
16 | 10 |
31 | 1F |
32 | 20 |
64 | 40 |
100 | 64 |
127 | 7F |
128 | 80 |
200 | C8 |
255 | FF |
256 | 100 |
1,000 | 3E8 |
1,024 | 400 |
4,095 | FFF |
4,096 | 1000 |
65,535 | FFFF |
How it works
- Divide by 16 and note the remainder, writing 10 to 15 as A to F; repeat with the quotient until it reaches 0.
- Read the remainders from bottom to top.
- Example: 255 ÷ 16 = 15 r 15 (F), 15 ÷ 16 = 0 r 15 (F), so 255 = FF.
Frequently asked questions
What is 1000 in hex?
3E8: 3 × 256 + 14 × 16 + 8 = 1000.
Why does hex use letters?
Base 16 needs sixteen digits, and A to F are used for the values 10 to 15.
Calculations run in your browser. Nothing you enter is sent anywhere or added to a searchable page address. How we calculate