Hex calculator

Perform arithmetic (+, −, ×, ÷) and logic operations (AND, OR, XOR) on hexadecimal numbers. See results in hex, decimal, and binary instantly.

Hex calculator

0x
0x
Result (hex)
0xA5B
Decimal
2651
Binary
0b1010 0101 1011
Octal
0o5133

How hex works

Hexadecimal is base-16, using digits 0-9 and letters A-F (where A=10, B=11, C=12, D=13, E=14, F=15). Each hex digit represents exactly 4 binary bits, which is why hex is the standard shorthand for binary data in programming.

Hex A3F = A×162 + 3×161 + F×160 = 2,560 + 48 + 15 = 2,623

Each hex digit directly maps to four binary digits: A=1010, 3=0011, F=1111. So A3F16 = 1010 0011 11112.

Common hex values

HexDecimalBinaryCommon use
0xFF2551111 1111Max byte value
0x1002561 0000 0000Byte overflow
0xFFFF65,5351111 1111 1111 1111Max 16-bit value
0x7F1270111 1111Max signed byte
0xC0FFEE12,648,4301100 0000 1111 1111 1110 1110Example word

FAQ

Why is hex used in computing?

Each hex digit cleanly maps to 4 binary bits, making hex a compact, human-readable form for byte data. Two hex digits = one byte. That's why colours (#FF6B00), memory addresses, and MAC addresses use hex.

Is input case-sensitive?

No. Upper and lowercase letters are accepted. Output is always shown in uppercase.

What's the largest hex number I can enter?

The calculator uses BigInt, so there is no practical limit for integer values.

Related calculators