219k views
4 votes
Can someone please tell me my teacher wrote answer but he wants us to show how he did it

Can someone please tell me my teacher wrote answer but he wants us to show how he-example-1

1 Answer

6 votes

This is a question that needs us to convert a number from a decimal base to three other bases

a) Requires to convert 42 decimal to binary or base-2

The most-used method for doing so Is to divide the number by two as many times as needed and collect all the remainders

Start by 42 / 2 = 21. Since 21*2=42, the remainder of the first division is zero.

I'll save that remainder: 0

Now we divide 21/2 to get 10 (only the whole quotient)

Since 10*2=20. There is a remainder here: 21 - 20 = 1

The next division is 10 / 2 = 5. The product 5*2=10 leaves a remainder of 0

Let's go on with the divisions, now we do 5 / 2 = 2. The new remainder is

5 - 2 * 2 = 1

This will be the last division: 2 / 2 = 1 . Remainder 0

The last quotient (1) and the collection of remainders will be joined from last to first:

101010. This is our answer

b) The same procedure goes when converting to base-3

42 / 3 = 14. 42 - 3*14 = 0

14 / 3 = 4, remainder 14 - 4*3 = 2

4 / 3 = 1, remainder 4 - 1 * 3 = 1

Since I cannot divide further the last quotient will be collected as before with the rest:

1120

c) Let's convert to base-5. Follow the same procedure

42 / 5 = 8. Remainder: 42 - 8*5 = 2

8 / 5 = 1. Remainder 8 - 1 * 5 = 3

Cannot divide any more, so I collect the last quotient and the above remainders as:

132

That is our final answer

User Hayley
by
4.9k points