What are decimal, hexadecimal and binary numbers?
The decimal system is the everyday base-10 number system. It uses ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
The hexadecimal system is base-16. It uses digits 0–9 plus the letters A, B, C, D, E and F, where A equals 10 and F equals 15.
The binary system is base-2 and uses only 0 and 1. Computers use binary internally, while hexadecimal is often used as a compact way to write binary data.
How to convert decimal to hexadecimal
To convert decimal to hexadecimal, repeatedly divide the decimal number by 16 and record the remainder. Remainders 10 through 15 become A through F.
462 ÷ 16 = 28 remainder 14 = E
28 ÷ 16 = 1 remainder 12 = C
1 ÷ 16 = 0 remainder 1
Result: 1CE₁₆
So decimal 462 converts to hexadecimal 1CE.
How to convert decimal to binary
To convert decimal to binary, repeatedly divide the decimal number by 2 and record the remainder. The binary result is the remainders read from bottom to top.
42 ÷ 2 = 21 remainder 0
21 ÷ 2 = 10 remainder 1
10 ÷ 2 = 5 remainder 0
5 ÷ 2 = 2 remainder 1
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1
Result: 101010₂
So decimal 42 converts to binary 101010.
When decimal-to-hex conversion is useful
Decimal to hexadecimal conversion is common in programming, debugging, color values, memory addresses, Unicode code points and low-level data inspection.
For example, decimal 255 is FF in hexadecimal. In an RGB color code, FF represents the maximum value of a color channel.
Input rules
- Use digits 0–9 for decimal input.
- Commas, spaces and underscores are ignored for easier reading.
- Whole numbers are supported. Fractions are intentionally not converted by this tool.
- Negative integers are supported, such as -462.