This is a paper and pencil exercise.

1. Complete the table. Show your calculation. Each column represents a base and each row should have the same number in it, represented by the various bases.

2 | 8 | 10 | 16 |
---|---|---|---|

10111100 | |||

0125 | |||

224 | |||

0xFF5 |

2. Fill in the blanks. Each question mark stands for a single digit.

0x?4 = 124?_{5}

3. How can you use `%`

to obtain the last digit of a number
represented by the symbol `x`? The last two digits? What can you say
in general?

4. **A Balanced Ternary Expansion** It is possible to uniquely write any
integer in an expansion of the form

where each of the \(e_k\) are 0, 1 or -1. Find such an expansion for each of the folllowing numbers: 5, 13, 37 and 79. Can you describe an algorithm for doing this in general?

5. **Be an agent of Change** Describe how to count out any
amount between $0.00 and $1.00 using standard coins to use as few coins
as possible. You will find using `//`

and `%`

handy.
NB: Gordon Gecko is your friend.