Decimal to Binary Conversions - Method I: Using Binary Exponential

advertisement
Decimal to Binary Conversions - Method I:
Using Binary Exponential Placeholders
One method of converting from a decimal value to a binary value
is to consider the values of the exponents that represent binary
placeholders. Remember that each binary placeholder, like each
decimal placeholder, can be represented by an exponential
expression:
OnePlaceholder Hundred SixtyName
Twenty- Fours
Eights
ThirtySixteens Eights Fours
Seconds
Twos
Ones
Placeholder
Exponential
Expressions
27
26
25
24
23
22
21
20
Calculated
Exponent
128
64
32
16
8
4
2
1
Table 3: Exponential Expressions for Binary Placeholders
Okay, so how can we use the exponential expressions to convert
from decimal to binary? For an example let's use the decimal
number 97:
1. Similar to binary to decimal conversions, we are going to
construct a table. We begin by finding the greatest binary
placeholder exponential that is less than or equal to our
decimal number. We put that exponential expression in the
left-most column of our table. In this example, the 26
placeholder is the placeholder that we place in the left-most
column. Since 26 is equal to 64, we know that it is less
than 97 (our decimal number). The next placeholder, the 27
placeholder, is too big. 27 is equal to 128, which is greater
than 97. Below the exponential, we put a "1":
Decimal Number: 97
Placeholder
Exponential
Expression
26
25
24
23
22
21
20
Calculated
Exponent
64
32
16
8
4
2
1
1/0
1
2.
3. In the second step, we take the value of the exponent from
step #1 and add it to the value of the next exponent to the
right. If the sum is less than or equal to our decimal
number, then we put a "1" underneath the second
placeholder. Otherwise, we put a "0" underneath. For our
example, we know that 26+25 is less than 97 (26=64,
25=32, 64+32=96, 96‹97). We put a "1" underneath 25:
Decimal Number: 97
Placeholder
Exponential
Expression
26
25
24
23
22
21
20
Calculated
Exponent
64
32
16
8
4
2
1
1/0
1
1
4.
5. We continue to add the values of subsequent placeholders
to the values of the placeholders under which we put a "1".
If the result is less than or equal to our decimal value, we
put a "1" underneath that placeholder. If the result is
greater than our decimal value, then we put a "0"
underneath:
Expression
1 Placeholder
Calculated
or Exponential
Exponent
0? Expression
26+25+24?97
64+32+16?97
0
112?97
112>97
24
16
26+25+23?97
64+32+8?97
0
104?97
104>97
23
8
26+25+22?97
64+32+4?97
0
100?97
100>97
22
4
26+25+21?97
64+32+2?97
0
98?97
98>97
21
2
26+25+20?97
64+32+1?97
1
97?97
97=97
20
1
6.
7. We now can transpose our 1s and 0s to our original table to
find our binary number!
Decimal Number: 97
Placeholder
Exponential
Expression
26
25
24
23
22
21
20
Calculated
Exponent
64
32
16
8
4
2
1
1/0
1
1
0
0
0
0
1
Binary Number: 1100001
[Top of the Page | Decimal to Binary Exercises]
Decimal to Binary Conversions - Method II:
Using Division
The second method of converting from decimal to binary also
involves constructing a table. This time, instead of using binary
placeholder exponential expressions, we'll do some simple division.
Again, let's use the decimal number 97 as our example:
1. The first step in the conversion is to take the decimal
number and divide it by 2. Put the division expression in the
upper left-most cell of our table. Take the quotient of the
division result and put it in the second cell of the row. Put
the remainder in the last cell of the row. Important:
NEVER carry your divisions past the decimal point!
Decimal Number=97
Division
Expression
97/2
Quotient
Remainder
48
1
2.
3. For each subsequent row, we take the quotient from the
previous row and divide it by two. We put the new quotient
in the second cell of the row and put the remainder in the
last cell of the row:
Decimal Number=97
Division
Expression
Quotient
Remainder
97/2
48
1
48/2
24
0
24/2
12
0
12/2
6
0
6/2
3
0
3/2
1
1
1/2
0
1
4.
5. The last step in the proces is concerned only with the last
column in our table -- the "Remainder" column. Notice that
the remainder column only has ones or zeros. Also note that
the cell in the remainder column of the last row must be a
"1". If we read the 1s and 0s in the remainder column from
the bottom to the top, we'll have our binary number!
Decimal Number=97
Division
Quotient Remainder Direction
Expression
97/2
48
1
48/2
24
0
24/2
12
0
12/2
6
0
6/2
3
0
3/2
1
1
1/2
0
1
Binary Number=1100001
[Top of the Page | Decimal to Binary Exercises]
Decimal to Binary Exercises
Now, try some binary to decimal problems on your own. Try each
of the following conversions. Below each are solutions to the
conversions using Method I and Method II. Try each of the
methods in doing the conversions:
1. 59
Answer using
Method I
Answer using
Method II
4. 112
Answer using
Method I
Answer using
Method II
2. 72
Answer using
Method I
Answer using
Method II
5. 196
Answer using
Method I
Answer using
Method II
3. 92
Answer using
Method I
Answer using
Method II
6. 272
Answer using
Method I
Answer using
Method II
Download