Answer:
a) 3.3
b) 3
Explanation:
1)
As we know ,
CPI = sum of ( instructions× clock cycle)
= 50%(1) + 30%(4) + 20%(8)
= 50% + 120% + 160%
= 330%
=
= 3.3
⇒CPI = 3.3
2)
Let a = number of cycles on average
As given,
a 10% improvement in performance of P1,
⇒New CPI = 3
⇒3 = 50% + 30% (x) + 20%(8)
⇒3 = 50% + 30% (x) + 160%
⇒3 = 210% + 30%(x)
⇒3 = 2.1 + 0.3x
⇒3 - 2.1 = 0.3x
⇒0.9 = 0.3x
⇒x =
= 3
⇒x = 3
∴ we get
Number of cycles on average = 3
Answer:
A rise in the population of predators is followed by a decrease in the population of prey.
Answer:
True.
Explanation:
In statement 1 we have loop-=++count;
which means loop = loop - (++count);
Where ++ is a pre increment operator which increases the value of count by 1 before using it.
In the other statement also we are doing the same thing.
Increasing the count by 1 and decreasing it from the loop variable.
Hence we conclude that the answer is True.
You can declare new classes as needed : this is one reason java is known as a extensible language.