CMPU 101 - Assignment 2 Due: by the beginning of class (12:00 noon) on Wednesday, February 8th

This assignment is a paper-and-pencil assignment.

Problem 1

Convert the following decimal numbers to binary:

Problem 2

Convert the following binary numbers to decimal:

Problem 3

Consider the following Java variable declaration that represents some number of pennies (one-cent coins) as an int:

int numberOfPennies = ???;

Note that the value used to initialize the variable has been obscured.  Assume that it contains a non-negative value, but that you don't know exactly what value it contains.

Write additional Java statements that will compute:

For example, if numberOfPennies has the value 242, then the number of whole dollars is 2, and the amount of change is 42.