Consider three different processors P1, P2, and P3 executing the same instructio
ID: 3835685 • Letter: C
Question
Consider three different processors P1, P2, and P3 executing the same instruction set with the clock rates and CPI given in the following table. 1. [2] Which Processor has the highest performance? 2. [2] If the processors each execute a program in 10 seconds, find the number of cycles and the number of instructions. B. [4] Write a procedure called ReturnSmaller that accepts two numbers, compares those two numbers and returns the smaller one. C. Represent -1.5 in Binary 1. [2] IEEE-754 Single precision representation 2. [2] IEEE-754 double precision representationExplanation / Answer
A)
1)
Performance = 1/ (execution time)
We know execution time = CPI * C
where CPI = Cycles per instruction
C = clock rate
P1 = execution time = 1.5 * (1/2 GHz) = 1.5 * 0.5 * 10^-9 = 0.75 * 10^-9 seconds
P2 = execution time = 1 * (1/1.5 GHz) = 1 * 0.6 * 10^-9 = 0.6 * 10^-9 seconds
P3 = execution time = 3 * (1/2.5 Ghz) = 3 * 0.4 * 10^-9 = 1.2 * 10^-9 seconds
Therefore Performance of Processor P2 is the highest
B)
SMALLER :
move $t1,$a1
move $t2,$a2
bl $t1,$t2,SKIP
move $v1,$t2
jal $ra
SKIP:
move $v1,$t1
jal $ra
C.
Decimal representation is -1.5 :-
SINGLE PRECISION BINARY REPRESENTATION :- 1 0111111 110000000000000000000000
DOUBLE PRECISION BINARY REPRESENTATION :- 1 01111111111 1000000000000000000000000000000000000000000000000000