15.2 Hexadecimal to Decimal Conversion

This table describes how to convert hexadecimal to decimal. For each hex digit, find the associated decimal value. Add the numbers together.

High Byte Low Byte
Hex 1000 Dec Hex 100 Dec Hex 10 Dec Hex 1 Dec
0 0 0 0 0 0 0 0
1 4096 1 256 1 16 1 1
2 8192 2 512 2 32 2 2
3 12288 3 768 3 48 3 3
4 16384 4 1024 4 64 4 4
5 20480 5 1280 5 80 5 5
6 24576 6 1536 6 96 6 6
7 28672 7 1792 7 112 7 7
8 32768 8 2048 8 128 8 8
9 36864 9 2304 9 144 9 9
A 40960 A 2560 A 160 A 10
B 45056 B 2816 B 176 B 11
C 49152 C 3072 C 192 C 12
D 53248 D 3328 D 208 D 13
E 57344 E 3584 E 224 E 14
F 61440 F 3840 F 240 F 15

For example, hex A38F converts to 41871 as follows:

Hex 1000’s Digit Hex 100’s Digit Hex 10’s Digit Hex 1’s Digit Result
40960 768 128 15 41871 Decimal