You are on page 1of 5

1-)

a-) In two’s complement, this number is a negative number. So,

1010 1101 0001 0000 0000 0000 0000 0010


0101 0010 1110 1111 1111 1111 1111 1101
+ 1

0101 0010 1110 1111 1111 1111 1111 1110 = 1391460350 d

Since it is negative, number is equal to -1391460350 in decimal.

b-) 1010 1101 0001 0000 0000 0000 0000 0010 = 2903506940decimal

c-) First bit is sign bit and equal to 1, so it is negative.

Next 8 bits (from 30 to 23) is exponent and equal to 90

90-127 = -37

And last 23 bits is fractional and equal to 00100000000000000000010

So, the floating number is equal to = - 1. 00100000000000000000010 + 2-37

2-)

Shift smaller : 2.8510 * 103 = 0.28510 * 104

First with guard and round : 0.29


+ 9.84 1.01 * 105
10.13

Without guand and round : 0.28


+ 9.84 1.01 * 105
10.12

3-)

2010 = 20 * 20 = 10100.0 * 20 = 1.01 * 24

Single precision :

Exponent = 4 + 127 = 131

0 10000011 01000000000000000000000

Double precision :

Exponent = 4 + 1023 = 1027

0 10000000011 01000000000000000000000000000000000000000000
4-)

Response Time : Total time required to complete a specific task.

Execution time : Time between the starting and finishing of a task.

Throughput : Total work that is done for each unit time.

System performance : The general performance of computer system that includes I/O, CPU,
memory etc.

CPU performance : The performance about only CPU’s tasks. It can be determined by fast, CPU time
etc.

5-)

a-) 6 x 0. 50 = 3

3 + 0.50 = 3.5

b-) (3.5 x 6) - 6 = 15 15/17.5 = 0.8571

(3.5 x 6) – 3.5 = 17.5

6-)

a-) Amdahl’s Law : The performance enhancement possible with a given improvement is limited by
the amount that the improved feature is used.

b-) It can be used by a simple formula : Timp = (Taffected / Amountimp ) + Tunaffected


( T = execution time )

7-)

First, find the CPIt = ( 5 x 0.25 ) + ( 1.33 x 0.75 ) = 2.2475

CPIfor FP trig = 0.025 x (20 - 2) = 0.45

CPIfor new FP trig = 2.2475 - 0.45 = 1.7975 ≅ 1.8

CPI for new fp = (0.75 x 1.33) + 0.25 x 4 = 1.9795 ≅ 2

a-) To make the effective average CPI for FP in trig computations 2 gives better performance
b-) 2.25/2=1.125
8-)

CPU Execution Time = ( CPI x IC ) / CR

MIPS = IC / (CPU Execution Time x 106) = IC / ((CPI x IC x 106 )/CR)) = CR / (CPI x 106)

9-)

CPU TimeVAX 5 x 106 x ICVAX 25 x 106 IC VAX


a-) = 12 = x So; = 0.67
6 6
CPU TimeIBM 5 x 10 ICIBM x 1.39 x 10 IC IBM

5 x 106
b-) 1 = and so CPIVAX = 5 x 106
CPIVAX

25 x 106
18 = and so CPIIBM = 1.39 x 106
CPIIBM

10-)

CPI = ( (45000 x 1) + (32000 x 1) + (15000 x 2) + (8000 x 2) ) /100000 = 1,55


MIPS = (40 x 106) / (1,55 x 106) = 25,8
Execution Time = (1,55 x 100000) / 40 x 10 6 = 1,55 / 400 =3,87 ms

11-)

a-) 100/(25/3 + (100-25)) = 1,20

b-) 100/( 45/2 + (100-45)) = 1,29

c-) 100/((25/3)+(45/2)+30) = 1.64

12-)

These three principle components of CPU Time are CPI (Clock Cycles Per Instruction), IC (Instruction
Count) and CR (Clock Rate). CPU time is found by multiplying of these values: CPIxICxCR

13-)

PerformM1 / PerformM2 = 5/10 = 0.5 So M2 is faster in program 1


PerformM1 / PerformM2 = 4/3 = 1.33 So M1 is faster in program 2

14-)
a-) We can find by using Amdahl’s law.

10 = 1 / ( (0.5-k) + (0.25/20 + 0.25/30 + k/15) )


k = 45.08%

b-) We can find by calculating enhanced and no-enhanced rate.

1-0.25-0.35-0.10.3+0.2530+0.3520+(0.115)=0.30.3325=90%

15-)

Avarage cycle : 1 x 0.15 + 4 x 0.85 = 3.55


0.15/3.55 = 0.04

16-) ?

17-)

7.5 x 10 9 x 0.8
a-) CPU Execution Time = = 1.2 seconds
9
5 x 10

b-) 1.2/3 = 0.40

18-)

Let’s k be percent of the fp instructions in total. So:


100/4 = k/15 + (100-k)
375 = 1500-14k  14k = 1125  k = 1125/14 = 80.36
So, 80.36 % of the instructions must be floating point to achieve a speedup of at least 4

19-)

a-) For M1 : ( 1 x 0.60 ) + ( 2 x 0.30 ) + ( 4 x 0.10 ) = 1.6

For M2 : ( 2 x 0.60 ) + ( 3 x 0.30 ) + ( 4 x 0.10 ) = 2.5

80 x 10 6 100 x 10 6
b-) MIPSM1 = = 50 ; MIPS M2 = = 40
6 6
1.6 x 10 2.5 x 10

You might also like