Do arithmetic and bitwise operations on hexadecimal numbers.
Hex uses digits 0–9 and A–F (A = 10 … F = 15). 1A3F + FF = 1B3E.
Hexadecimal (base 16) is a compact way to write binary numbers — each hex digit stands for four bits. This calculator adds, subtracts, multiplies and divides hex numbers, applies AND, OR and XOR, accepts an optional 0x prefix and shows every result in hex, decimal, binary and octal. The second tool converts between all four bases.
Hex is common in programming, colour codes (#FF5733), memory addresses and MAC addresses. For base 2 see the Binary Calculator; for text encodings see Base64 Encode / Decode.
The calculator applies the standard method step by step.
| Item | Value |
|---|---|
| Binary (base 2) | 1101100111110 |
| Octal (base 8) | 15476 |
| Decimal (base 10) | 6,974 |
| Hexadecimal (base 16) | 1B3E |
| Base | First number | Second number |
|---|---|---|
| Binary | 1101000111111 | 11111111 |
| Octal | 15077 | 377 |
| Decimal | 6719 | 255 |
| Hexadecimal | 1A3F | FF |
| Operation | Result |
|---|---|
| 1A3F + FF | 1B3E |
| FF + 1 | 100 |
| FF × 10 | FF0 |
| F0 AND 3C | 30 |
| A ÷ 3 | 3 |
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 6 | 110 | 6 | 6 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 17 | 10001 | 21 | 11 |
| 18 | 10010 | 22 | 12 |
| 19 | 10011 | 23 | 13 |
| 20 | 10100 | 24 | 14 |
Add column by column using values 0–15; if the sum is 16 or more, write the remainder and carry 1. A + 7 = 11₁₆ (17).
Multiply each digit by a power of 16 (from the right) and add. FF₁₆ = 15 × 16 + 15 = 255.
Replace each hex digit with its 4-bit binary value: F = 1111, A = 1010.
They are the digits for 10 to 15: A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
A prefix used in programming to show that the number is hexadecimal, as in 0xFF.
Colour codes in web design, memory addresses, machine code, MAC addresses and debugging.
It uses the standard method: decimal = Σ digit × 16ᵏ e.g. 1A3F₁₆ = 4096 + 2560 + 48 + 15 = 6719 The full working and a worked example are shown on this page.
Decimal results use standard double-precision arithmetic (about 15–16 significant digits). Tools that work with whole numbers — big numbers, factors, bases, combinations — use exact integer arithmetic, so no digits are lost.
Yes for checking your work and learning the method. The steps and formula are shown so you can understand the answer, but follow your teacher's rules about calculators in exams.
No. Everything is calculated in your browser and nothing you enter is uploaded or saved.