Hexadecimal (Hex) Calculator

Perform hex arithmetic and convert between hexadecimal, decimal, and binary.

Hexadecimal (Base 16)FF
Decimal (Base 10)255
Binary (Base 2)11111111
Octal (Base 8)377

Hex Calculator Formula & How It Works

Hex digits: 0–9, A(10), B(11), C(12), D(13), E(14), F(15) | Base 16
  • Each hex digit = 4 bits (a nibble)
  • 2 hex digits = 1 byte = 8 bits
  • FF₁₆ = 255₁₀ = 11111111₂
  • Hex is compact binary representation: #RRGGBB for colours

Hexadecimal (base 16) uses digits 0–9 and A–F. It's popular in computing because 1 hex digit represents exactly 4 binary digits (a nibble), making binary much more readable. Memory addresses, RGB colour codes (#FF6B35), and byte values (0xFF) all use hex notation.

Hex Calculator FAQs

What is hexadecimal used for in programming?

Memory addresses (0x7FFF0001), colour codes (#FF6B35), byte values (0xFF=255), bitwise operations, machine code, and debugging. Hex is more compact than binary and easier to convert than decimal for low-level work.

How do you convert hex to decimal?

Multiply each digit by 16 raised to its position power (rightmost = 16⁰). Example: 2AF₁₆ = 2×256 + 10×16 + 15×1 = 512 + 160 + 15 = 687₁₀.

Related Calculators