CPU time for computer B can be found using this equation:
CPU execution time for a program
= CPU clock cycles for a program / Clock rate
⇒ CPU timeB = CPU clock cyclesB / ( 0.5 × Clock rateA )
⇒ 8 seconds
= CPU clock cyclesB / ( 0.5 × 4 × 109 cycles/second )
⇒ CPU clock cyclesB =
= 8 seconds × 0.5 × 4 × 109 cycles/second
= 16 × 109 cycles
Therefore, computer B must have 16 × 10
9 cycles for this program.
†Note that this question is not realistic because the computer designers usually target on clock rate instead of the number of clock cycles for a program.