Decimal to Hexadecimal Converter
Enter the decimal number you want to convert to hexadecimal.
Table of Contents
- How does decimal to hexadecimal conversion work?
- Decimal to hexadecimal conversion formula
- Conversion process
- Examples
- Decimal to hexadecimal conversion table
- Frequently Asked Questions
How does decimal to hexadecimal conversion work?
The decimal system is base 10 and the hexadecimal system is base 16. To convert a decimal number to hexadecimal, repeatedly divide the number by 16 and record the remainders. Then, read the remainders in reverse order (from bottom to top) to obtain the hexadecimal number. Digits greater than 9 are represented with the letters A through F.
Decimal to hexadecimal conversion formula
To convert a decimal number N to hexadecimal:
Where the coefficients hi (remainders) take values from 0 to 15, which are represented with digits 0 to 9 and the letters A through F.
Conversion process
- Divide the decimal number by 16 and note the remainder (0–15).
- Take the quotient obtained and repeat the division by 16 until you reach 0.
- Write the remainders in reverse order (from bottom to top) to obtain the hexadecimal number.
Examples
26₁₀ to hexadecimal| Division | Quotient | Remainder | 
|---|---|---|
| 26 ÷ 16 | 1 | 10 → A | 
| 1 ÷ 16 | 0 | 1 | 
Reading the remainders from bottom to top: 1A₁₆.
Result: 26₁₀ = 1A₁₆.
255₁₀ to hexadecimal| Division | Quotient | Remainder | 
|---|---|---|
| 255 ÷ 16 | 15 | 15 → F | 
| 15 ÷ 16 | 0 | 15 → F | 
Reading the remainders from bottom to top: FF₁₆.
Result: 255₁₀ = FF₁₆.
Decimal to hexadecimal conversion table
Quick reference values for small decimal numbers.
| 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 | 
| 32 | 20 | 
| 64 | 40 | 
| 128 | 80 | 
| 256 | 100 | 
| 512 | 200 | 
| 1024 | 400 | 
Frequently Asked Questions
How do you convert a decimal number to hexadecimal?
To convert a decimal number to hexadecimal, repeatedly divide the number by 16 and record the remainders. Then, read the remainders from bottom to top to get the base-16 number.
Which digits are used in the hexadecimal system?
The hexadecimal system uses 16 symbols: the digits 0 to 9 and the letters A to F, representing the values 10 to 15.
