How to use this calculator
- Enter or choose first hex number.
- Enter or choose operation.
- Enter or choose second hex number.
- The result (hex) updates as you type. Use Copy result or Share to keep it.
Method
Value = Σ dᵢ × 16ⁱ, with digits 0–9 and A = 10, B = 11, C = 12, D = 13, E = 14, F = 15; the operation is done on the exact integers
- dᵢ
- the hex digit in position i, counted from 0 at the right
Worked example
- FF = 15 × 16 + 15 = 255.
- 255 + 1 = 256 = 1 × 16², which is 100 in hex.
- In binary, 256 = 2⁸ = 100000000.
FF + 1 = 100 in hexadecimal, or 255 + 1 = 256 in decimal.
What the result means
Each hex digit stands for exactly four bits, which is why hex is used for memory addresses, colour codes (#FF8800) and byte values.
Assumptions and limits
- Inputs are unsigned hexadecimal integers; upper or lower case and a 0x prefix are accepted.
- Negative results are shown with a minus sign, not in two’s complement.
- Division gives a whole-number quotient and a remainder.
Questions
How do I convert hex to decimal?
Multiply each digit by a power of 16 from the right (1, 16, 256, 4096, …) and add. 1A = 1 × 16 + 10 = 26.
Why is one byte two hex digits?
A byte has 8 bits and each hex digit encodes 4 bits, so 00 to FF covers all 256 byte values.