Decimal to Hexadecimal Converter
Convert from:
Convert to:
The result will be displayed here.
Calculation Steps:
Calculation steps will be displayed here.
Table of Contents
- How does decimal to hexadecimal conversion work?
- Decimal to hexadecimal conversion formula
- Example #1
- Example #2
- Decimal to hexadecimal conversion table
How does decimal to hexadecimal conversion work?
Converting a decimal number to hexadecimal involves transforming a base-10 number to its base-16 equivalent. In the hexadecimal system, numbers are represented with digits from 0 to 9 and letters from A to F, where A equals 10, B equals 11, C equals 12, D equals 13, E equals 14, and F equals 15.
Decimal to hexadecimal conversion formula
To convert a decimal number to hexadecimal, the following methodology is used:
- Divide the decimal number by 16.
- Record the remainder.
- Continue dividing the quotient by 16 until the quotient is 0.
- The remainders obtained represent the digits of the hexadecimal number, read from bottom to top.
Example #1
Convert the decimal number 156 to hexadecimal:
- 156 ÷ 16 = 9, remainder 12 (C in hexadecimal).
- 9 ÷ 16 = 0, remainder 9.
The hexadecimal number is 9C
.
Example #2
Convert the decimal number 255 to hexadecimal:
- 255 ÷ 16 = 15, remainder 15 (F in hexadecimal).
- 15 ÷ 16 = 0, remainder 15 (F in hexadecimal).
The hexadecimal number is FF
.
Decimal to hexadecimal conversion table
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 |
31 | 1F |
63 | 3F |
85 | 55 |
127 | 7F |
128 | 80 |
170 | AA |
240 | F0 |
255 | FF |