Information Technology Reference
In-Depth Information
Conversion Example 10: Convert 0010101001011001000010110001 to Hex
Group the bits:
0010 1010 0101 1001 0000 1011 0001
Answer: 2A590B1 h
Converting Hexadecimal to Binary
This procedure is also easy—Just change the hex digits into their four-bit equivalent. The
following are some examples.
Conversion Example 11: Convert 0DEAD0 into Binary
Hex: 0 D E A D 0
Binary: 0000 1101 1110 1010 1101 0000
Answer: 000011011110101011010000
Conversion Example 12: Convert AA0101 into Binary
Hex: A A 0 1 0 1
Binary: 1010 1010 0000 0001 0000 0001
Answer: 101010100000000100000001
Converting Binary to Decimal
To convert a binary number to decimal, multiply each instance of 1 by the power of 2. Table 2-4
shows that each bit in the binary number 11111111 has a decimal equivalent from 1 to 128,
which is based on the location of the bit in the binary. This is similar to decimal numbers where
the numbers are based on 1s, 10s, 100s, and so on. In decimal format, the number 111 is 100+10+1.
In binary format, the number 11111111 is the sum of 128+64+32+16+8+4+2+1 = 255. For
10101010, this results in 128+0+32+0+8+0+2+0 = 170. This is similar to decimal numbers
where the numbers are based on 1s, 10s, 100s, and so on. The following are some examples.
Decimal Values of Bits in a Binary Number
Table 2-4
2 7 = 128
2 6 = 64
2 5 = 32
2 4 = 16
2 3 = 8
2 2 = 4
2 1 = 2
2 0 = 1
Power of 2
Binary
1
1
1
1
1
1
1
1
 
Search WWH ::




Custom Search