Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

IBM Db2 11 1 Certification Guide Explore Techniques To Master Database Programming And Administration Tasks In IBM Db2

Authors: Mohankumar Saraswatipura ,Robert Collins

1st Edition

1788626915, 978-1788626910

More Books

Students also viewed these Databases questions