Question #02: The following problems deal with translating from MIPS to C. Assume that the variables f, g, h, i, and jare assigned to registers S0, S1, $s2, $s3, and $4, respectively. Assume that the base address of the arrays A and B are in registers $6 and $57, respectively. a. sll $s2, Ss4, 1 add SsO, Ss2, $s3 add Ss0, S80, Ss1 b. sll Sto, $so, 2 add Sto, Ss6, Sto sll Stl, $sl, 2 add $t1, Ss7, $t1 lw So, 0(SO) addi St2, Sto, 4 lw $t0,($12) add $to, Sto, $so sw Sto, O(St1) # $t0f.4 # $t0 -&A[1] # $t1 g4 # St1- &B[g] #f-AO) a) For the MIPS assembly instructions above, what is the corresponding statement? b) For the MIPS assembly instructions above, rewrite the assembly code to minimize the number if MIPS instructions (if possible) needed to carry out the same function. c) How many registers are needed to carryout the MIPS assembly as written above? If you could rewrite the code above, what is the minimal number of registers needed? Question # 03: In the following problems, we will be investigating memory operations in the context of an MIPS processor. The table below shows the values of an array stored in memory. Assume the base address of the array is stored in register Ss6 and offset it with respect to the base address of the array D Address Data 20 4 5 28 3 32 2 34 1 II) Address Data 24 2 38 4 32 3 36 6 40 a) For the memory locations in the table above, write C code to sort the data from lowest to highest, placing the lowest value in the smallest memory location shown in the figure. Assume that the data shown represents the variable called Array, which is an array of type int, and that the first number in the array shown is the first element in the array. Assume that this particular machine is a byte addressable machine and a word consists of four bytes b) For the memory locations in the table above, write MIPS code to sort the data from lowest to highest, placing the lowest value in the smallest memory location. Use a minimum number of MIPS instructions Assume the base address of Array is stored in register Ss6. c) To sort the array above, how many instructions are required for the MIPS code? If you are not allowed to use the immediate field in lw and sw instructions, how many MIPS instructions do you need? Question 4: In the following problems, the data table contains bits that represent the opcode of an instruction. You will be asked to interpret the bits as MIPS instructions into assembly code and determine what format of MIPS instruction the bits represent 1. 0000 0011 0000 1010 1000 0000 0010 0001two 2. 0000 0001 0100 1011 0100 1000 0010 0011two For the binary entries above, what instruction do they represent?