In: Computer Science
Look for the binary representation for each of the numbers in the left column of the following table using the algorithm that iteratively divides by two. Show all steps of the algorithm for each number in different rows of a table with three columns like the example I have included. All steps are essential for getting full credit. Create 5 different tables for the 5 numbers. The numbers in the left column of the following table are expressed in base-10 system.
Number |
Binary representation |
1110 |
|
1111 |
Example: The number to be represented in binary notation
is 142.
Division Problem |
Quotient |
Remainder |
142/2 |
71 |
0 |
71/2 |
35 |
1 |
35/2 |
17 |
1 |
17/2 |
8 |
1 |
8/2 |
4 |
0 |
4/2 |
2 |
0 |
2/2 |
1 |
0 |
1/2 |
0 |
1 |
Answer: 10001110 (same as the binary string formed by putting
the bits in the third column of the table)
(verification of correctness: (20 * 0 + 21 * 1 + 22 * 1 + 23 * 1 + 24 * 0 + 25 * 0 + 26 * 0 + 27 * 1) = (2 + 4 + 8 + 128) = 142)