Information Technology Reference
In-Depth Information
Conversion Example 16: Convert 26 to Binary
13
2 6
-26
0
The first bit is 0; now divide 13 by 2. [0]
6
2 3
-12
1
The second bit is 1; now divide 6 by 2. [10]
3
26
-6
0
The third bit is 0; now divide 3 by 2. [010]
1
23
-2
1
The fourth bit is 1; the leftmost bit is the division
result at the top, which is one. [11010]
Answer: 11010
An Alternate Method
The dividing procedure described previously works, but it takes a lot of time. Another method
is to remember the bit position values within a byte: 128, 64, 32, 16, 8, 4, 2, 1, and play with
the bits until the sum adds up to the desired number. Table 2-5 shows these binary numbers and
their decimal value.
Bit Values
Table 2-5
Binary Number
Decimal Value
10000000
128
01000000
64
00100000
32
00010000
16
 
Search WWH ::




Custom Search