How to Convert Hexadecimal to Decimal
Converting hexadecimal (base 16) to decimal (base 10) is straightforward once you understand the method. This guide walks you through it step by step with examples.
The Formula
Each hex digit is multiplied by 16 raised to the power of its position (starting from 0 on the right). Then sum all the values:
decimal = dn × 16n + dn-1 × 16n-1 + ... + d0 × 160
Where each d is a hex digit (0-9, A=10, B=11, C=12, D=13, E=14, F=15).
Step-by-Step Examples
Example 1: Convert hex FF to decimal
- F = 15 (rightmost digit, position 0): 15 × 16⁰ = 15 × 1 = 15
- F = 15 (leftmost digit, position 1): 15 × 16¹ = 15 × 16 = 240
- Sum: 240 + 15 = 255
Example 2: Convert hex 2A3F to decimal
- F = 15 × 16⁰ = 15 × 1 = 15
- 3 × 16¹ = 3 × 16 = 48
- A(10) × 16² = 10 × 256 = 2,560
- 2 × 16³ = 2 × 4,096 = 8,192
- Sum: 8,192 + 2,560 + 48 + 15 = 10,815
Example 3: Convert hex 0x1A to decimal
- A = 10 × 16⁰ = 10
- 1 × 16¹ = 16
- Sum: 16 + 10 = 26
Quick Reference: Powers of 16
| Position | Power | Value |
|---|---|---|
| 0 | 16⁰ | 1 |
| 1 | 16¹ | 16 |
| 2 | 16² | 256 |
| 3 | 16³ | 4,096 |
| 4 | 16⁴ | 65,536 |
| 5 | 16⁵ | 1,048,576 |
| 6 | 16⁶ | 16,777,216 |
| 7 | 16⁷ | 268,435,456 |
| 8 | 16⁸ | 4,294,967,296 |
Practice Problems
Try converting these hex values to decimal (answers at the bottom):
3F100BEEFCAFE
Show Answers
3F= 3×16 + 15 = 63100= 1×256 = 256BEEF= 11×4096 + 14×256 + 14×16 + 15 = 48,879CAFE= 12×4096 + 10×256 + 15×16 + 14 = 51,966