Course Solutions Uncategorized (Solved) : 6 20 Pts Consider Two Integer Arrays C D 100 Elements Let Sa2 Sa3 Contain Base Address Arr Q34250494 . . . .

(Solved) : 6 20 Pts Consider Two Integer Arrays C D 100 Elements Let Sa2 Sa3 Contain Base Address Arr Q34250494 . . . .

 

6. (20 pts) Consider two integer arrays C and D of 100 elements. Let Sa2 and Sa3 contain the base address of array C and D, respectively, and the index i is in St0, sum is in Sv0. Write MIPS code to perform the following operations (a) Get C[15] from memory and put it in register Sto (b) Put the value 132 in D[6] (c) Translate the following code into MIPS instrucion int Cl100], D[100), sum 0; for (i 50; i < 10; i i-2) sum sum + Clil* 14-Di-1]; DO NOT use mult instruction in translating *15, use shift instruction instead: (d)How many instructions are executed during the running of the code in (c), and how many memory data references will be made during execution?

6.

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post