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 

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

1 Expert Approved Answer
Step: 1 Unlock

To calculate the execution time of the given code we need to consider the number of clock cycles req... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!