BINARY

TOPIC 01 – DECIMAL NUMBERS IN BINARY

 

LESSON WORK SOLUTIONS

 

 


The answers are very easy to Google.  In order to give you a chance to see the solution process, I will include a full solution for the first problem (a) of each number.

 

1a) Convert 132.210 to binary.

Solution:


We start with the usual chart to take care of the 132 part…

 

 

 

 

 

 

 

 

 

 

256

128

64

32

16

8

4

2

1


132 – 128 = 4   (so put a 1 over 128)

We are left with 4.  So we put 0s above 64, 32, 16 and 8.

4 – 4 = 0   (so put a 1 over 4)

We are left with 0.  So we put 0s above 2 and 1.

 

0

1

0

0

0

0

1

0

0

256

128

64

32

16

8

4

2

1


Now we need to deal with the .2 part.  We simply extend the chart to the right.  The question asks for 4 decimal places only so we only need 4 columns.

 

 

 

 

 

0.5

0.25

0.125

0.0625


0.2 – 0.125 = 0.075   (so put a 1 over 0.125)

 

0.075 – 0.0625 = 0.0125  (so put a 1 over 0.0625)

 

We could continue, but we are at 4 decimal digits

 

0

0

1

1

0.5

0.25

0.125

0.0625


So, the final answer is 1000 0100.0011

 

 

2a) Convert 1010.101 to base 10.

SOLUTION

 

Again we start with the famous chart.  We know exactly the size we need for our number to fit.

 

1

0

1

0.

1

0

1

8

4

2

1

0.5

0.25

0.125

 

So we simply added the numbers that are under the 1s.

 

8 + 2+ 0.5 + 0.125 = 10.625

 

Therefore, the answer is 10.625

 

3a) Convert 12.2113 to base 10.

SOLUTION

Again we start with our chart.  Of course, its base 3 so we go up/down by powers of three.  I have including the bottom row to show how I built the chart.

 

1

2.

2

1

1

3

1

0.3333333333…

0.1111111111…

0.037037037…

31

30

3-1

3-2

3-3

 

So, now we do scientific notation to get our answer…

 

1x3 + 2x1 + 2x0.3333333333 + 1x0.1111111111 + 1x0.037037037

= 3 + 2 + 0.6666666666 + 0.1111111111 + 0.037037037

= 5.8148148147

 

So our answer is 5.8148148147.

 


4a) Convert 118.31110 to base 7.


SOLUTION

 

We start with our chart in base 7.

 

 

 

 

 

 

 

 

343

49

7

1.

0.14285714…

0.02040816…

0.0029154518…

 

It does get a little ugly in the decimal area so we will limit our chart to 3 decimal columns.

 

We will start with the 118 part.  Let's see how man 49s are in it.

 

118 – 49 – 49 = 20   (so we put a 2 over 49)

 

Now we see how many 7s are in 20.

 

20 – 7 – 7 = 6  (so we put a 2 over 7)

 

Now, we are left with 6 to be covered by 1s.

 

6 – 1 – 1 – 1 – 1 – 1 – 1 = 0 (so we put a 6 over 1)

So our chart looks like this so far:

 

0

2

2

6.

 

 

 

343

49

7

1.

0.14285714…

0.02040816…

0.0029154518…

 

And now we deal with the .311 part of the number.

 

0.311 – 0.14285714 - 0.14285714 = 0.02528571  (so we put a 2 in the first decimal column)

 

0.02528571 – 0.02040816 = 0.00487755 (so a 1 in the next column)

 

0.00487755 - 0.0029154518 = 0.0019620982 (so a 1 in the next column)

0

2

2

6.

2

1

1

343

49

7

1.

0.14285714…

0.02040816…

0.0029154518…

 

So the answer is 226.211.

 

Note: For both b and c, the best solution is likely to first convert to base 10 and then to the over specified base.