Multiple choice

Consider the following program segment for a hypothetical CPU having three user registers R1,R2 and R3.

Let the clock cycles required for various operations be as follows: ADD with both operands in register: 1 clock cycle Instruction fetch and decode: 2 clock cycles per word Register to/from memory transfer: 3 clock cycles

The total number of clock cycles required to execute the program is

  1. 29

  2. 24

  3. 23

  4. 20

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation