9. [13 marks]
a) Convert the following base ten numbers to binary.

28
Solution: 11100

7
Solution: 111


b) Convert the following binary numbers to base ten.

10010
Solution: 18

10101
Solution: 21

1110
Solution: 14


c) In assignment four's "Hanoi" program, the binary representation of the number controlled which disk was moved. Which disk would be moved for each of the numbers in part b?

10010
Solution: disk 2

10101
Solution: disk 1

1110
Solution: disk 2


(press 'back' in your web browser to get back to where you were in the exam)