
Site Search
SECTION I-6: Converting from Decimal to Hex Number System
Converting from Decimal to Hex can be approached in two ways:
- Converting to Binary first and then convert to Hex. This method is demonstrated below.
- Convert directly from Decimal to Hex by repeated division, keep tracking of the remainders
Convert 4510 to Hex | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
32/1 | 16/0 | 8/1 | 4/1 | 2/0 | 1/1 |
First Convert to Binary 32+8+4+1 = 4510 |
||||
45= 0010 11012 = 2D |
Convert 62910 to Hex | |||||||||
---|---|---|---|---|---|---|---|---|---|
512 | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 |
62910 - (512+64=32+16+4+1) = 0010 0111 01012 = 275 Hex |
Convert 171410 to Hex | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
1024 | 512 | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 |
171410 - (1024+512+128+32+16+2) = 0110 1011 00102 = 6B2 Hex |