- (6 points)
Do problem 4.10 on p. 323 of the textbook.
Hint: The textbook claims this can be done
with only three instructions. I think this is only
possible by using pseudoinstructions; if you
use only real instructions you will need four.
- (8 points)
Do problem 4.12 on p. 323 of the textbook.
- (8 points)
Do problem 4.14 on p. 324 of the textbook.
Hint: You may find conversions from binary to
decimal less tedious if you first convert to hexadecimal
and then convert to decimal. Remember that partial
credit for wrong answers is only possible if you show
your work.
- (8 points)
Do problem 4.23 on p. 326 of the textbook.
(The problem suggests photocopying Figure 4.17.
To save you the trouble of photocopying the figure
or finding it on the authors' Web site,
here it is in your choice of
printable formats:
PDF
or
PostScript.
This figure is copyrighted1.)
Hint: Consider whether you can combine
the output marked Set (bit 31 of the
result of subtracting a - b)
and the output marked Overflow to generate
something that is 1 when and 0 otherwise.
- (6 points)
Do problem 4.43 on p. 329 of the textbook.
- (4 points)
- Use the algorithm in Figure 4.32 of the textbook
to multiply by , showing values
at each step for all of the registers involved
(as the textbook does in the example in
Figure 4.33 -- you don't have to use this exact
format but should show about the same amount of
detail).
- Use the algorithm in Figure 4.40 of the textbook
to divide by , showing values
at each step for all of the registers involved.