[Solved]-Two Different Mips Assembly Programs Run Program Add S0 S0 S1 Add S0 S3 S2 Add S0 S0 S3 Pr Q37242510
Two different MIPS assembly programs are run:
Program A:
add $s0, $s0, $s1
add $s0, $s3, $s2
add $s0, $s0, $s3
Program B:
addi $s6, $s6, -20
add $s6, $s6, $s1
lw $s0, 8($s6)
a) For each MIPS assembly instructions above, what is thecorresponding C statement?
b) For each MIPS assembly above, assume that the registers $s0,$s1, $s2, $s3 contain the values 10, 20, 30, 40, respectively.Also, assume that register $s6 contains the value 10016, and thatmemory contains the following values:
Address (HEX) Value (HEX)
100 0x00000064
104 0x000000C8
108 0x0000012C
Find the value of $s0 at the end of each assembly codesegment
c) For each MIPS instruction in each programs above, show thevalue of the op, rs, rt, rd,
shamt, and funct fields for R-type instructions or op, rs, rt, andimmediate fields for Itype
instructions.
Expert Answer
Answer to Two different MIPS assembly programs are run: Program A: add $s0, $s0, $s1 add $s0, $s3, $s2 add $s0, $s0, $s3 Program B… . . .
OR

