Hex Calculator

Perform hexadecimal arithmetic and convert between hex, decimal, binary, and octal number systems.

Hexadecimal Operations

Calculation Results

0
base 16
0
base 10
0
base 2
0
base 8
💡 Hex System: Hexadecimal uses 16 symbols: 0-9 and A-F. Each hex digit represents 4 binary bits, making it ideal for representing binary data compactly.

What is Hexadecimal?

Hexadecimal (base-16) is a number system that uses 16 symbols: 0-9 and A-F. It's widely used in computing because it provides a human-friendly representation of binary-coded values. Each hex digit represents exactly 4 binary bits (a nibble).

Hexadecimal Digits

HexDecimalBinaryOctal
0000000
1100011
2200102
3300113
4401004
5501015
6601106
7701117
88100010
99100111
A10101012
B11101113
C12110014
D13110115
E14111016
F15111117

Hex Arithmetic Operations

Hex Addition

Example: 1A + 2B = 45

Step 1: A (10) + B (11) = 21 decimal = 15 hex
Write 5, carry 1
Step 2: 1 + 2 + 1 (carry) = 4
Result: 45

Hex Subtraction

Example: 2B - 1A = 11

Step 1: B (11) - A (10) = 1
Step 2: 2 - 1 = 1
Result: 11

Why Hexadecimal Matters

  • Memory Addresses: Computer memory addresses are typically shown in hex.
  • Color Codes: Web colors use hex (e.g., #FF5733 = orange).
  • MAC Addresses: Network device identifiers use hex.
  • Character Encoding: Unicode and ASCII use hex codes.
  • Debugging: Programmers use hex to read raw memory dumps.

Hex to Decimal Conversion

To convert hex to decimal, multiply each digit by 16 raised to the power of its position (from right, starting at 0):

1A (hex) = (1 × 16¹) + (A × 16⁰)
= (1 × 16) + (10 × 1)
= 16 + 10 = 26 (decimal)

References

  • Khan Academy. "Hexadecimal Numbers." 2026.
  • GeeksforGeeks. "Hexadecimal Arithmetic." 2026.