Hex Calculator
Programmer hex calculator: AND/OR/XOR/NOT, shifts and arithmetic with selectable 8/16/32/64-bit or BigInt width, two's-complement signed output, hex/dec/binary.
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 |
About this hex calculator
Enter two numbers in any combination of bases — hex, decimal, or binary — pick an operation, choose a bit width, and the calculator returns the result simultaneously in hex, unsigned decimal, signed decimal and binary. The math core uses BigInt, so in Arbitrary (BigInt) mode very large values like 0xFFFFFFFFFFFFFFFF work without precision loss (0xFFFFFFFFFFFFFFFF + 1 = 0x10000000000000000). The bit-width selector (8/16/32/64-bit) makes bitwise operations (AND, OR, XOR, NOT, shifts) wrap inside a fixed register exactly like C, Rust, or masked Python: NOT 0xFF in 8-bit gives 0x00, and negative results are shown both as proper two's-complement hex and as a signed decimal. Everything runs in your browser — no inputs are uploaded.
Frequently Asked Questions

