Computer

Appendix A describes the MIPS simulator. which is helpful for these exercises.
Although the simulator accepts pseudoinstructions, try not to use pseudoinstructions
for any exercises that ask you to produce MIPS code. Your goal should be to learn
the real MIPS instruction set, and if you are asked to count instructions, your
count should reflect the actual instructions that will be executed and not the
pseudoinstructions.
There are some cases where pseudoinstructions must be used (for example. the

l a instruction when an actual value is not known at assembly time). In many cases.
they are quite convenient and result in more readable code (for example. the l i
and mov e instructions). If you choose to use pseudoinstructions for these reasons.
please add a sentence or two to your solution stating which pseudoinstructions you
have used and why.
2.1 [5] (92.2) For the following C statement, what is the corresponding MIPS
assembly code? Assume that the variables f . g . h . and i are given and could be
considered 32-bit integers as declared in a C program. Use a minimal number of
MIPS assembly instructions.

f = g + (h – 5)
2.1 [5] <92.2> For the following MIPS assembly instructions above, what is a
corresponding C statement?

add f . g . h

add f . 1 . f
TAKE ADVANTAGE OF OUR PROMOTIONAL DISCOUNT DISPLAYED ON THE WEBSITE AND GET A DISCOUNT FOR YOUR PAPER NOW!

To enjoy our big discount, type the Discount Code on the Discount box & click Use Code to apply the discount.

DISCOUNT 22% OFF

Coupon Code -CPH22
  • Buy an assignment from
  • us today and save 22%!
  • Enter the discount code: CPH22
toggle