Convert Decimal to Hexadecimal
1 Decimal (dec) = 1 Hexadecimal (hex). Use the free converter below to instantly convert any decimal value to hexadecimal, or view the full conversion table and formula.
1 dec = 1 hex
Decimal to Hexadecimal Conversion Table
How to Convert Decimal to Hexadecimal
To convert decimal to hexadecimal, repeatedly divide the number by 16 and note the remainders. Read the remainders from bottom to top, using A-F for values 10-15. For example, 42 in decimal: 42 ÷ 16 = 2 remainder 10 (A), so 42 = 2A in hex.
Worked Example: Convert 7 dec to hex
Start with the value in decimal
7 dec
Apply the formula
Repeatedly divide by 16, read remainders bottom-to-top
Calculate the result
7 dec = 7 hex
Decimal to Hexadecimal Examples
0 dec is equal to 0 hex. Using the formula Repeatedly divide by 16, read remainders bottom-to-top, 0 dec converts to 0 hex.
1 dec is equal to 1 hex. Using the formula Repeatedly divide by 16, read remainders bottom-to-top, 1 dec converts to 1 hex.
2 dec is equal to 2 hex. Using the formula Repeatedly divide by 16, read remainders bottom-to-top, 2 dec converts to 2 hex.
7 dec is equal to 7 hex. Using the formula Repeatedly divide by 16, read remainders bottom-to-top, 7 dec converts to 7 hex.
8 dec is equal to 8 hex. Using the formula Repeatedly divide by 16, read remainders bottom-to-top, 8 dec converts to 8 hex.
10 dec is equal to A hex. Using the formula Repeatedly divide by 16, read remainders bottom-to-top, 10 dec converts to A hex.
15 dec is equal to F hex. Using the formula Repeatedly divide by 16, read remainders bottom-to-top, 15 dec converts to F hex.
16 dec is equal to 10 hex. Using the formula Repeatedly divide by 16, read remainders bottom-to-top, 16 dec converts to 10 hex.
Converting Hexadecimal to Decimal
Need the reverse conversion? Use the table below for a quick reference converting hexadecimal back to decimal.
| Hexadecimal (hex) | Decimal (dec) |
|---|---|
| 0 | 0 |
| 1 | 1 |
| A | 10 |
| F | 15 |
| 10 | 16 |
| 1F | 31 |
Decimal to Hexadecimal FAQ
What is decimal to hexadecimal conversion?
Decimal to hexadecimal conversion changes a base-10 number into a base-16 number using digits 0-9 and letters A-F.
What is 255 in hexadecimal?
255 in decimal equals FF in hexadecimal. 255 ÷ 16 = 15 remainder 15, so both digits are F (15).
Why is hexadecimal used in computing?
Hexadecimal is widely used in computing because each hex digit maps to exactly 4 binary bits, making it a compact way to represent binary data. It's used for memory addresses, color codes (#FF0000), and byte values.
Understanding Decimal and Hexadecimal
What is a Decimal (dec)?
The decimal (dec) is a specialized unit of number systems. It is commonly abbreviated as dec and relates to hexadecimal by a factor of 1.
What is a Hexadecimal (hex)?
The hexadecimal (hex) is a specialized unit of number systems. It is commonly abbreviated as hex and relates to decimal by a factor of 1.