Hex to Decimal Conversion: Understanding Number Systems

Utilko Team 5 min read Developer Tools

The Four Number Systems in Computing

Computers work with different number systems, each with a different base:

  • Binary (Base 2): Uses only 0 and 1. The language computers actually think in.
  • Octal (Base 8): Uses 0–7. Historically used in computing; still appears in Unix file permissions.
  • Decimal (Base 10): Uses 0–9. The number system humans use daily.
  • Hexadecimal (Base 16): Uses 0–9 and A–F. Commonly used in programming, color codes, and memory addresses.

Why Hexadecimal?

Hexadecimal is a convenient shorthand for binary. Because 16 = 2^4, each hex digit represents exactly 4 binary bits. A byte (8 bits) can be written as exactly 2 hex digits. This makes hex much more readable than long strings of 0s and 1s while still mapping directly to binary.

Example: Binary 11111111 = Hex FF = Decimal 255

Hexadecimal Digit Reference

DecimalHexBinary
000000
110001
550101
991001
10A1010
11B1011
12C1100
13D1101
14E1110
15F1111
161000010000
255FF11111111

How to Convert Hex to Decimal

Multiply each hex digit by 16 raised to the power of its position (starting from 0 on the right).

Example: Convert 2A hex to decimal

2A = (2 × 16^1) + (A × 16^0) = (2 × 16) + (10 × 1) = 32 + 10 = 42

Example: Convert 1F4 hex to decimal

= (1 × 16^2) + (F × 16^1) + (4 × 16^0) = (1 × 256) + (15 × 16) + (4 × 1) = 256 + 240 + 4 = 500

Where You See Hexadecimal

  • Web colors: #FF5733 is hex for red=255, green=87, blue=51
  • Memory addresses: 0x7FFD4A8B in debugger output
  • MAC addresses: 00:1A:2B:3C:4D:5E (each pair is one byte)
  • Hash values: SHA-256 checksums, MD5 hashes
  • Unicode code points: U+1F600 (emoji)
  • HTML/CSS color codes: #3B82F6 (blue)

Converting Decimal to Hex

Divide the decimal number by 16 repeatedly and record remainders in reverse:

Example: Convert 255 to hex
255 ÷ 16 = 15 remainder 15 → F
15 ÷ 16 = 0 remainder 15 → F
Reading remainders bottom-up: FF

Try It Free

Convert between hexadecimal, decimal, binary, and octal instantly with our free number base converter.

Hex Calculator →

Tools Mentioned in This Article