Assignment 10, due Nov 5
Part of
the homework for 22C:60, Fall 2010
|
Always write your name legibly as it appears on your University ID and on the class list!
|23|22_21_20_19_18_17_16|15_14_13_12_11_10__9__8__7__6__5__4__3__2__1__0| |__|____________________|_______________________________________________| s exponent mantissa
a) Give the representation for 1.0 in this number system. (0.5 points)
b) Give the representatin and equivalent decimal value of the smallest normalized number in this number system. (0.5 points)
c) Give the representatin and equivalent decimal value of the smallest non-normalized non-zero number in this number system. (0.5 points)
d) Given a floating point number in the format from problem 1 in the least-significant 24 bits of R3, write a sequence of instructions (not a subroutine, just a sequence of instructions) that computes the 2's complement integer exponent in R4 and the 2's complement binary fraction in R3. The point for this fraction should be just to the right of the sign bit. Use R4 and R5 if you need to use extra registers. (0.5 points)
Assume the following I/O registers on the HAWK parallel port, which is designed to be far more general than the old Centronics standard:
a) When the Hawk system is powered up, the printer port control register is set to all zero, by the hardware. When the printer driver runs its initialization code, what values should it place in the printer port data and control registers assuming that you are trying to maintain compatibility with the old Centronics standard? (0.5 points)
b) Write a subroutine to output one character to a Centronics compatible printer. It will need to wait for the printer (several inputs from the printer must have specific values before an output cycle begins), then put the data into specific bits of the data register, and then manipulate one or more additional output bits while observing the printer's response. (0.5 points)