CST8110 Intro to Computing - Assignment #2Due: 8:45am Monday, February 3, 1997
Always show the steps of your calculations for all conversions!
1. What does the 8-bit binary bit pattern 01111010 look like when expressed
a. in octal b. in hexadecimal c. as an unsigned decimal number
d. as a signed decimal number e. as an ASCII character
2. Convert the value -125 decimal to 8-bit
a. octal b. hexadecimal c. binary
3. Convert the value -32,047 decimal to 16-bit
a. octal b. hexadecimal c. binary
4. What value do you add to an upper-case ASCII letter to make it a lower-case ASCII letter?
5. What range of signed numbers can be stored in 23 bits?
6. Define the precision and the range of a floating-point number.
7. Explain the difference between how integers and floating-point numbers are stored in computer memory.
8. What are the precision and range of the C Language float floating-point storage type?
9. For each of the following measurements, indicate whether the numeric value is best stored in a signed two-byte integer or a C Language float floating-point storage type. Explain why:
a. Price (dollars and pennies) of a computer b. Count of children in one family
c. Count of children in all of Canada d. Your height in centimetres
e. Your height in metres f. Exchange rate between Canadian and U.S. dollars
10. 1/10 (0.1) is a binary fraction that repeats forever. What happens when such a fraction is entered into a computer memory location that only has a fixed number of bits to store it?
Due dates and times:
Your assignment is due in the Ian Allen assignment box before 8:45am Monday, February 3.
Please fasten together firmly all parts of your assignment so that no parts will be lost.
(An excellent strategy is to put all your pages into a labelled full-size brown envelope.)
Identify your assignments:
Make obvious on the outside of your assignment these four things (type or print clearly):
2. your student ID number,
3. your weekly Lab time and section number (031, 032, or 033), and
4. the course number: CST8110.
Assignments are marked for clarity and simplicity as well as correctness.
Late assignments are handled according to the policy given in the course outline.