Hex Calculator
Free online hex calculator to convert between hexadecimal and decimal numbers. Perform hex arithmetic operations with step-by-step calculation and explanation.
How to Calculate Hexadecimal?
Hexadecimal (base-16) is a number system that uses 16 symbols: 0-9 and A-F. It's commonly used in computer programming and digital systems. Each position represents a power of 16.
Converting Hexadecimal to Decimal:
- Write down the hexadecimal number
- Multiply each digit by 16 raised to the power of its position (from right to left, starting at 0)
- Add all the results together
0xFF = 15×16¹ + 15×16⁰ = 240 + 15 = 255
Converting Decimal to Hexadecimal:
- Divide the decimal number by 16
- Write down the remainder (convert 10-15 to A-F)
- Continue dividing the quotient by 16 until it becomes 0
255 ÷ 16 = 15 remainder 15 → F
15 ÷ 16 = 0 remainder 15 → F
Result: 0xFF
Hexadecimal reference table
Decimal | Hexadecimal | Binary |
---|---|---|
0 | 0x0 | 0000 |
1 | 0x1 | 0001 |
10 | 0xA | 1010 |
15 | 0xF | 1111 |
16 | 0x10 | 10000 |
255 | 0xFF | 11111111 |
256 | 0x100 | 100000000 |