Question
Please try to answer all. I have no idea on MIPS. MIPS ASSEMBLY 10. Which of the following can be used to place 5 in
Please try to answer all. I have no idea on MIPS.
MIPS ASSEMBLY
10. Which of the following can be used to place 5 in $8?
a. li $8, 5
b. addi $8, $0, 5
c. ori $8, $0, 5
d. all
11. MIPS assembly include instructions addi and subi. But, subi is a pseudocode- that is, there is no native MIPS machine code for subi. Which of the following MIPS ISA code is equivalent to subi $8, $8, 5?
a. sub $8, $8, $5
b. addi $8, $8, -5
c. add $8, $8, -5
d. ori $8, $8, -5
12. MIPS assembly include a pseudocode move to copy the contents of a register to another register; for example, move rd, rs will copy the contents of rs to rd ( i.e. R[rd] R[rs] ). Which of the following MIPS machine code (ISA code) can be used in place of the pseudocode move $8, $9 ?
a. addu $8, $0, $9
b. add $8, $0, $9
c. addi $8, $9, 0
d. all of the above
13. Consider the following JAVA code. Suppose x is in $t0 and y is in $t1, which of the following MIPS ISA code sequence will be equivalent to the above JAVA code?
a. ori $t0, $0, 5 add $t1, $t0, $t0
b. add $t0, $5, 0 addi $t0, $t1, $t1
c. int x, 5, 0 mul y, 2 , x
d. add $t0, $t0, 5 add $t1, $t1, 0
14. Consider the following MIPS ISA code. What will be in $8 after the last they both are executed in the given order?
a. 8
b. 16
c. 2
d. 4
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