Decimal to Hex & Hex to Decimal Converter
Convert decimal to hexadecimal or hex to decimal instantly. Our free converter includes step-by-step examples, a conversion table, and clear explanations.
| Decimal | Hexadecimal Numeral |
|---|---|
| — | — |
| Hexadecimal Numeral | Decimal |
|---|---|
| — | — |
Number System Basics:
- Decimal System: Base 10, uses digits 0-9
- Hexadecimal System: Base 16, uses digits 0-9 and letters A-F
How to Convert Decimal to Hexadecimal:
Like binary, converting a decimal number to hexadecimal does not use a single multiplication factor. Instead, it uses the repeated division method: divide the number by 16 repeatedly, record each remainder (using A-F for remainders 10-15), and read the remainders from bottom to top.
Example: Convert 255 to hexadecimal.
255 ÷ 16 = 15 remainder 15 (F)
15 ÷ 16 = 0 remainder 15 (F)
Reading the remainders from bottom to top gives FF.
255 in decimal = FF in hexadecimal
How to Convert Hexadecimal to Decimal:
To convert a hexadecimal numeral to decimal, multiply each digit by 16 raised to the power of its position (counting from 0 on the right, and treating A-F as 10-15), then add all the results together.
Example: Convert FF to decimal.
FF = (15×161) + (15×160)
FF = 240 + 15
FF in hexadecimal = 255 in decimal
Decimal to Hexadecimal Conversion Table
| Decimal | Hexadecimal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 5 | 5 |
| 9 | 9 |
| 10 | A |
| 11 | B |
| 15 | F |
| 16 | 10 |
| 25 | 19 |
| 50 | 32 |
| 100 | 64 |
| 150 | 96 |
| 200 | C8 |
| 255 | FF |
| 500 | 1F4 |
| 1,000 | 3E8 |
| 4,096 | 1000 |
| 65,535 | FFFF |
Difference Between Decimal and Hexadecimal Number Systems
| Aspect | Decimal | Hexadecimal |
|---|---|---|
| Base | Base 10 | Base 16 |
| Digits Used | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 | 0-9 and A, B, C, D, E, F |
| Place Values | Powers of 10 (1, 10, 100, 1,000…) | Powers of 16 (1, 16, 256, 4,096…) |
| Typical Use | Everyday counting, money, measurements | Memory addresses, color codes, byte representation |
| Digit Length | Longer representation for the same value | Shorter, more compact representation |
| Conversion Method | Divide by 16 repeatedly to get hexadecimal | Multiply digits by powers of 16 to get decimal |
1. Solved Examples on Converting Decimal to Hexadecimal
Example 1
Problem: Convert 1 into hexadecimal.
Solution:
1 ÷ 16 = 0 remainder 1
1 in decimal = 1 in hexadecimal
Example 2
Problem: Convert 10 into hexadecimal.
Solution:
10 ÷ 16 = 0 remainder 10 (A)
10 in decimal = A in hexadecimal
Example 3
Problem: Convert 16 into hexadecimal.
Solution:
16 ÷ 16 = 1 remainder 0
1 ÷ 16 = 0 remainder 1
16 in decimal = 10 in hexadecimal
Example 4
Problem: Convert 25 into hexadecimal.
Solution:
25 ÷ 16 = 1 remainder 9
1 ÷ 16 = 0 remainder 1
25 in decimal = 19 in hexadecimal
Example 5
Problem: Convert 100 into hexadecimal.
Solution:
100 ÷ 16 = 6 remainder 4
6 ÷ 16 = 0 remainder 6
100 in decimal = 64 in hexadecimal
Example 6
Problem: Convert 255 into hexadecimal.
Solution:
255 ÷ 16 = 15 remainder 15 (F)
15 ÷ 16 = 0 remainder 15 (F)
255 in decimal = FF in hexadecimal
Example 7
Problem: Convert 1,000 into hexadecimal.
Solution:
Dividing 1,000 by 16 repeatedly and reading the remainders from bottom to top gives:
1,000 in decimal = 3E8 in hexadecimal
2. Solved Examples on Converting Hexadecimal to Decimal
Example 1
Problem: Convert 1 into decimal.
Solution:
1 = 1×160
1 in hexadecimal = 1 in decimal
Example 2
Problem: Convert A into decimal.
Solution:
A = 10×160
A in hexadecimal = 10 in decimal
Example 3
Problem: Convert 10 into decimal.
Solution:
10 = (1×161) + (0×160)
10 = 16 + 0
10 in hexadecimal = 16 in decimal
Example 4
Problem: Convert 19 into decimal.
Solution:
19 = (1×161) + (9×160)
19 = 16 + 9
19 in hexadecimal = 25 in decimal
Example 5
Problem: Convert 64 into decimal.
Solution:
64 = (6×161) + (4×160)
64 = 96 + 4
64 in hexadecimal = 100 in decimal
Example 6
Problem: Convert FF into decimal.
Solution:
FF = (15×161) + (15×160)
FF = 240 + 15
FF in hexadecimal = 255 in decimal
Example 7
Problem: Convert 3E8 into decimal.
Solution:
Multiplying each digit by its place value and summing the results gives:
3E8 in hexadecimal = 1,000 in decimal
How accurate is the conversion between decimal and hexadecimal?
The conversion is exact for whole numbers with no rounding involved. Every non-negative integer has one, and only one, correct hexadecimal representation, and the reverse is also true. Rounding only becomes a concern when converting fractional decimal values, which this calculator does not handle.
Are there any tools or calculators available for converting decimal to hexadecimal?
Yes, the calculator above converts between decimal and hexadecimal instantly in both directions. Enter a value in either field and the other field updates automatically, with the result also shown in the table below the calculator.
Can this calculator handle negative numbers or decimals like 3.5?
No, this calculator works only with non-negative whole numbers. Negative hexadecimal numbers require a separate representation method, and fractional hexadecimal conversion follows a different process than the whole-number division method used here.
Why is hexadecimal used in computing?
Hexadecimal is widely used in computing because it maps neatly onto binary: each hexadecimal digit represents exactly four binary digits (bits). This makes hexadecimal a much more compact and human-readable way to express binary values, which is why it’s commonly used for memory addresses, color codes, and byte-level data.
What do the letters A through F mean in hexadecimal?
Since hexadecimal is base 16 but only ten digit symbols (0-9) exist, the letters A through F are used to represent the values 10 through 15. For example, A represents 10, B represents 11, and F represents 15.
What is 1,000 in hexadecimal?
1,000 in decimal is 3E8 in hexadecimal. This is found by dividing 1,000 by 16 repeatedly and reading the remainders, using A-F for remainders 10-15, from the last division back to the first.