
CPSC 2105 Introduction to Computer Organization
Homework Set 2 Due Monday, January 30, 2006
NOTE: SHOW ALL OF YOUR WORK. YOU MUST DEMONSTRATE THAT YOU
UNDERSTAND THE PROCESS OF OBTAINING AN ANSWER. WHILE THESE CAN
BE DONE ON MANY CALCULATORS, YOU MUST DO THESE BY HAND.
BE PREPARED TO DISCUSS THESE PROBLEMS IN CLASS.
Each of these questions counts 20 points.
1. In decimal notation the fraction 1/4 can be represented as a terminating decimal (0.25)
while the fraction 1/3 cannot, being represented by 0.3333333… (never terminating).
In binary, the decimal number 1/2 is represented by 0.1 and the decimal number 3/4 is
represented by 0.110, both of which terminate as expected.
Show by any method you prefer that the binary representation of the decimal number
0.6 cannot be represented by a terminating binary. Show the repeating pattern.
The next three questions focus on the IEEE–754 standard representation of floating point
numbers as 32–bit binary numbers. These can be represented by eight hexadecimal digits.
Show the IEEE–754 single precision representation of the following real numbers.
Show all eight hexadecimal digits associated with each representation, so that the decimal
number 0.0 is represented as 0x00000000 and – 1.0 is represented as 0xBF800000.
2. – 6.5
3. 0.8046875
4. 3904.0
5. In 8–bit ASCII code, each character is represented by two hexadecimal digits.
Give the ASCII representation (in hexadecimal) of the eight character string
“CPSC2105” – notice no blank. Hint: It has sixteen hexadecimal digits.
(For those of you who know the big–endean vs. little–endean issue, I don’t care).