Question: Following is a simple program to add two integers. Write this code into MARS and answer the following questions. .data num1: .word 54 num2: .word

Following is a simple program to add two integers. Write this code into MARS and answer the following questions. .data num1: .word 54 num2: .word 40 .text lw $so, num1 lw $s 1, num2 add $s2, $s0,$s1 li Sv0.1 move $a0,$s2 syscall a. What is the address and size of num1 and num2? b. What is the address of the instruction Iw$50,num 1 c. What is the machine code for instruction add $s2,$s0,$s1 d. What is the purpose of instruction li $v0,1 e. Why do we need to use the instruction move $a0,$s2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
