EE150 - Fall 1996

Programming Assignment #4
Questions and Answers


------

Q. IN BINARY, THERE ARE ONLY 8 BITS RIGHT? OR DO YOU HAVE TO CALCULATE FOR UP TO 32 BITS?

A. Well it should in fact be only limited by the range of storage of the integer type you use. This should be clearly specified in your code as a comment. Using integers (ie int) would allow a maximum value of 1111111111111111111111111111111 or 2147483647 .... you should be able to figure out why. However, it is possible to allow for even bigger values for bonus marks. At any rate, if you support a maximum value as above that will be sufficient. The important thing is that the method you use be GENERAL and not rely on a minimum or maximum size other than that of the integer type you choose.

Q.

A.

------ ------