Hexadecimal to Decimal Converter

Formula: decimal = Σ(dᵢ × 16ⁱ) for each hex digit dᵢ at position i

Hex to Decimal Converter

Hexadecimal is a base-16 number system widely used in computing for its compact representation of binary data.

Conversion Formula

decimal = Σ(dᵢ × 16ⁱ) for each hex digit dᵢ at position i

Each hex digit represents a power of 16. From right to left: 16⁰=1, 16¹=16, 16²=256, etc. Multiply and sum.

Step-by-Step Examples

FF = 255

F=15. 15×16 + 15×1 = 255

1A = 26

1×16 + A(10)×1 = 26

Frequently Asked Questions

What is hexadecimal?

Hexadecimal (hex) is a base-16 number system using digits 0-9 and letters A-F (where A=10, B=11, ..., F=15).

How do you convert hex to decimal?

Multiply each hex digit by 16 raised to its position (starting from 0 on the right) and sum. E.g., 1A = 1×16 + 10×1 = 26.

What is 0xFF in decimal?

FF in hex equals 255 in decimal. The 0x prefix is just notation used in programming to indicate a hex number.

Why is hex used in programming?

Hex is compact: one hex digit represents exactly 4 binary digits. This makes it much easier to read memory addresses and color codes.

What are hex color codes?

CSS colors like #FF5733 are hex. Each pair represents red, green, blue values from 00 (0) to FF (255).