83.0k views
5 votes
Q1 (16pts) – Mandatory Show all the steps you took to calculate the number. If you only show the final result (and not the steps), you will get NO CREDIT for the exercise. No calculators allowed. a) (4pts) Convert the following number from base 2 to base 10. Show your work. 1000101 b) (4pts) Convert the following hexadecimal number from base 16 to base 10. Show your work. bad c) (4pts) Convert the following number from base 10 to base 2. Show your work.

1 Answer

2 votes

Answer:

1. 69

2. 2989

3. Incomplete

Step-by-step explanation:

1. Covert 1000101 from base 2 to base 10

To convert a number from base 2 to base 10, we have to multiply individual digits of that number by the power of the base the digit represent.

First, we start our digit representation from the rightmost digit to the leftmost digit

This will give us

1

0

1

0

0

0

1

(notice that the digits are represented in a backward direction)

The first digit is at position 0, the next is at position 1, the next is at 2 till we get to the last digit; i.e.

1 -> 0

0 -> 1

1 -> 2

0 -> 3

0 -> 4

0 -> 5

1 -> 6

The next step is to remove the 0 individual digits, so we have

1 -> 0

1 -> 2

1 -> 6

After the we multiply the individual digits by the power of the base the digit represent

In this question, we're dealing with base 2

So, this gives us

1 * 2^0 = 1 * 1 = 1

1 * 2^2 = 1 * 4 = 4

1 * 2^6 = 1 * 64 = 64

The last step is to add up the results above

1 + 4 + 64 =69

2. Convert bad from base 16 to base 10

We apply the same method in question 1 to this

First, we start our digit representation from the rightmost to the leftmost digit

d

a

b

Then we introduce the position

d -> 0

a -> 1

b -> 2

There's no 0 digits in this, so we skip this step.

The next step after this is to convert each hexadecimal alphabet to hexadecimal digits

The hexadecimal represents digits in the following way;

0 1 2 3 4 5 6 7 8 9 a b c d e f

Notice that after 9, it switched to alphabet a, then b till it gets to f

The alphabets represents numbers. a represents 10; b, 11; c, 12; d, 13; e, 14 and f, 15.

So, our hexadecimal alphabets will be replaced with the digits equivalent

13 -> 0

10 -> 1

11 -> 2

Then we multiply the individual digits by the power of the base of the digits represent.

Here, we're dealing with base 16.

So, we have

13 * 16^0 = 13 * 1 = 13

10 * 16^1 = 10 * 16 = 160

11 * 16^2 = 11 * 256 = 2816

Then we add these results

13 + 160 + 2816 = 2989

3. Incomplete question.

In question 1, we converted from base 2 to base 10

Here, I'll convert the result in question 1 to base 2

So I'll be working base on this following question.

Convert 69 in base 10 to base 2

Converting from base 10 to any base requires division (unlike question 1 and 2 above)

An important thing to note is the remainder and the resulting quotient (as, will be seen later)

It's also to be noted that, the division will not stop until the resulting quotient equals 0.

Also, the divisor will be the base we're converting from.

The divisor is 2, in this case.

Step 1. Divide 69 by 2

69/2 = 34 remainder 1.

Is 34 equals to 0? No.

Meaning that we have to continue dividing

Step 2. 34/2 = 17 remainder 0

Step 3. 17/2 = 8 remainder 1

Step 4 8/2 = 4 remainder 0

Step 5. 4/0 = 2 remainder 0

Step 6. 2/2 = 1 remainder 0

Step 7. 1/2 = 0 remainder 1

We stop here, because our quotient is now 0

Our results is the reminder; but we have to pick each remainder from the bottom to the top;

i.e. 1000101

So, 69 in base 10 equals 1000101 in base 2

User Karthik N G
by
4.8k points