Homework
Computer Organization II, Autumn 2010, HW 4
These questions will be covered in practise sessions during the week 47
(22-26.11.2010)
- Is it possible that Booth's algorithm (Fig. 9.12 [Sta10, Stal06], Fig. 9.12 [Stal03]) would be clearly slower than normal multiplication algorithm for
Two's complement integers, given just before it in text book? If it is,
please give an example. If it is not, please give a detailed reasoning.
- Problems 9.34 ja 9.36 [Sta10, Stal06] (9.20, 9.24 [Stal03])
See Problem 9.32 on how to compute relative errors.
Problem 9.36 has different constants with different book versions. Use this version:
One of the most serious errors in computer calculations occur when two nearly equal numbers are subtracted. Consider A=0.11177 and B=0.11122. The computer truncates all values to four decimal digits. Thus, A'=0.1117 and B'=0.1112.
(a) ...
(b) ...
(c) How would the situation change, in part (b) of the latter problem the values
were stored with five decimal numbers (instead of four)? What is the
worse accuracy of variable C value?
- Problems 10.6 and 11.18 [Sta10, Stal06] (10.3 and 11.12 [Stal03])
You may assume that each instruction ses has a DIV instruction.
Three address instruction sets have of course three operands
Also assume, that variables A, B, C, D, E, F and X are in memory.
- Problem 11.7 [Sta10, Stal06] (11.6 [Stal03])
Give example instruction for parts (a) and (b).
(c) Would is be worthwhile in the instruction to place the opcode only after the operands? Why?
- Problem 10.17 [Sta10, Stal06] (10.9 [Stal03])