Hexadecimal to Decimal Conversion
This appendix 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
|