Live Calculators

Plug in numbers to check your hand-worked answers. Everything updates instantly.

1 · CPU Execution Time

CPU time=IC×CPIclock rate\text{CPU time} = \frac{\text{IC} \times \text{CPI}}{\text{clock rate}}
Total cycles = IC × CPI = 2,000,000,000
CPU time = 1.000 s

2 · Average CPI

Average CPI=iCPIi×CountiiCounti\text{Average CPI} = \frac{\sum_i \text{CPI}_i \times \text{Count}_i}{\sum_i \text{Count}_i}
ClassCPICountCycles
A5
B2
C3
Total cycles = 10, Total instructions = 7
Average CPI = 1.4286

3 · Amdahl's Law

New time=Unaffected+AffectedrSpeedup=OldNew\text{New time} = \text{Unaffected} + \frac{\text{Affected}}{r} \qquad \text{Speedup} = \frac{\text{Old}}{\text{New}}
Unaffected (floor) = 20
New time = 20 + 80/16 = 25.000
Overall speedup = 4.000×
Max possible speedup (r → ∞) = 5.000×
Tip: set Old = 100, Affected = 80, r = 16 → speedup 4× (that's worked example WE-9a). Then try r = anything for the multiply problem and watch it approach the 5× ceiling but never cross it.