Question: The instruction sub in MIPS is a core instruction (like add and addi) that stands for subtract. As the name suggests, it subtracts 2 integer

 The instruction sub in MIPS is a core instruction (like addand addi) that stands for "subtract". As the name suggests, it subtracts

The instruction sub in MIPS is a core instruction (like add and addi) that stands for "subtract". As the name suggests, it subtracts 2 integer values found in registers and places the result in a register. The syntax is: subrd,rs,rt Where: rd is the destination register that hold the value in register rs minus the value in register rt (in THAT order). Download the skeleton program simplearithmetic1. asm from our course Canvas site (look in the Modules section) and take a look at it. You are supposed to implement the arithmetic function: a+bc,where:a=3,b=18,c=11. You have to ensure that variables a, b, c, MUST be stored in registers $t0,$t1,$t2, respectively, and that the result MUST be stored in register $t3. You can use either addi or li to assign value to registers. a) Write down (or type) the missing code here after you've verified it by running it on spim. b) Write down (or type) exactly what you see printed out on your display after you run this. Is it what you expected? Why? C) In hexadecimal format, what is the value stored in register $t3 at the conclusion of this program? Explain how you got to this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!