• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE | Gate IT 2007 | Question 41

Following table indicates the latencies of operations between the instruction producing the result and instruction using the result. 2007_41 C
 Load R1, Loc 1;	 Load R1 from memory location Loc1
 Load R2, Loc 2;	 Load R2 from memory location Loc 2
 Add R1, R2, R1;	 Add R1 and R2 and save result in R1
 Dec R2;	 Decrement R2
 Dec R1;	 Decrement R1
 Mpy R1, R2, R3;	 Multiply R1 and R2 and save result in R3
 Store R3, Loc 3;	 Store R3 in memory location Loc 3
What is the number of cycles needed to execute the above code segment assuming each instruction takes one cycle to execute ?

(A)

7

(B)

10

(C)

13

(D)

14

Answer

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments