In: Computer Science
1) a) Divide 256 successively by 2 until the quotient is 0 256/2 = 128, remainder is 0 128/2 = 64, remainder is 0 64/2 = 32, remainder is 0 32/2 = 16, remainder is 0 16/2 = 8, remainder is 0 8/2 = 4, remainder is 0 4/2 = 2, remainder is 0 2/2 = 1, remainder is 0 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 100000000 Answer: 100000000 b) Divide 2467 successively by 2 until the quotient is 0 2467/2 = 1233, remainder is 1 1233/2 = 616, remainder is 1 616/2 = 308, remainder is 0 308/2 = 154, remainder is 0 154/2 = 77, remainder is 0 77/2 = 38, remainder is 1 38/2 = 19, remainder is 0 19/2 = 9, remainder is 1 9/2 = 4, remainder is 1 4/2 = 2, remainder is 0 2/2 = 1, remainder is 0 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 100110100011 Answer: 100110100011 c) Divide 1023 successively by 2 until the quotient is 0 1023/2 = 511, remainder is 1 511/2 = 255, remainder is 1 255/2 = 127, remainder is 1 127/2 = 63, remainder is 1 63/2 = 31, remainder is 1 31/2 = 15, remainder is 1 15/2 = 7, remainder is 1 7/2 = 3, remainder is 1 3/2 = 1, remainder is 1 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1111111111 Answer: 1111111111 d) Divide 23 successively by 2 until the quotient is 0 23/2 = 11, remainder is 1 11/2 = 5, remainder is 1 5/2 = 2, remainder is 1 2/2 = 1, remainder is 0 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 10111 Answer: 10111 e) Divide 7 successively by 2 until the quotient is 0 7/2 = 3, remainder is 1 3/2 = 1, remainder is 1 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 111 Answer: 111