Question: Write your answers down in the space provided below the question. 2.1 How long will it take to execute the following code using the
Write your answers down in the space provided below the question. 2.1 How long will it take to execute the following code using the assumptions given below? mov ax, 2h mov bx, 3h mul bx add ax,bx Assume the following: (1) The machine on which the above program fragment is to be executed has a 500 MHz clock. (ii) Four cycles are needed to fetch an instruction from memory. (Instructions are not prefetched.) (iii) Multiplication takes 6 clock cycles to execute (iv) Addition takes 4 cycles to execute (v) The mov instruction takes 3 cycles to execute (vi) Fetch and execute cycles do not overlap. Express your answer in microseconds (usec), where I usec-1x10 sec.
Step by Step Solution
3.55 Rating (159 Votes )
There are 3 Steps involved in it
To calculate the execution time of the given code we need to consider the number of clock cycles req... View full answer
Get step-by-step solutions from verified subject matter experts
