Question
first: Convert the following C codes into MIPS Assembly codes: int sum = a + b + 10; Consider that value of a is in
first:
Convert the following C codes into MIPS Assembly codes:
int sum = a + b + 10;
Consider that value of a is in register $t1. Here b is a memory location and you will use register $t2 to load its value from the memory. Here sum is also a memory location and you will have to store the result at this memory location.
second :
Convert the following C codes into MIPS Assembly codes:
int f = a * b + c - d;
Consider that value of a is in register $t1, value of b is in register $t2, value of c is in register $t3, and value of d is in register $t4. Variable f is register t0. You dont need to use lw or sw assembly instructions. Also consider the result is a 32 bit number.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started