Question: arrB: Assume that arrB array is already defined and allocated in memory, its base address and its number of elements are already stored in $a1

arrB: Assume that arrB array is already defined and allocated in memory, its base address and its number of elements are already stored in $a1 and $a2 correspondingly. Answer each of the next questions as required. Questions are independent. .byte 0x99,0x20,0x73,0x40,0x50,0x69, Please write question numbers and answer parts in this question in order. Q1) Write no more than 7 MIPS instructions to calculate $a3: if (arrB[9] != arrB[32] ) $a3 = arrB[9] -arrB[32]; else $a3 = arrB[32] - arrB[9]; Q2) Write no more than 12 MIPS instructions that arranges in descending order the neighboring elements in every pair of arrB. For example, if arrB={2,5,8,20,30,15,...,7,9}, then after executing your code arrB becomes {5,2,20,8,30,15,...,9,7}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
