Question: Perform the following operations using MIPS assembly code and submit your report in Canvas showing your code, comments and answers. Store the value 0x10 into
Perform the following operations using MIPS assembly code and submit your report in Canvas showing your code, comments and answers.
Store the value 0x10 into register $S1
Store the value 0x11 into register $S2
Store the value 0x12 into register $S3
Add the values in register $S1 and $S2 and store the result in $t0
Add the values in $S1 and $S2 and $S3 and store the result in $t1
Multiply the value stored in $t1 by 2 and store the result in $t2
Move the contents of $S2 to $S1 (hint: use add instruction) and then clear the contents of register $S2
Increment the value of $S1 by 5
Decrement the value of $S2 by 2
x = x + y + z - q; Assume that x, y, z, q are stored in registers $s4-$s7, respectively
Verify your code of question number 10 by assigning the values X=1, y=8, Z = 9 and q = 4 to the corresponding registers
Write the machine codes for all the instructions you used in question 9 in binary form as well as in hexadecimal format
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
