11-17-2014, 05:19 PM
CS501 Advance Computer Architecture Close Date 18th November 2014
Question No. 1 10 Marks
Write assembly language instructions to execute the following expression on 0-address and 3-address machines.
F = A + (B × C / D) – E
Question No. 2 A compiler designer is trying to decide between two code sequences for a particular machine. The hardware designers have supplied the following facts:
Instruction Class CPI required for each class
A 2
B 3
C 2
The compiler designer intends to write two code sequences to achieve a task. Both code sequences are required the following instruction count.
Code Sequence Instruction Count for each sequence
1 A B C
10 5 8
2 6 4 9
a) Which code sequence will execute faster? Justify your answer on the basis of CPU clock cycles calculations.
What is the CPI for each

mileys81: