Question: 6. Consider the following MIPS ISA code. addi $8, $0, 2 add $8, $8, $8 After executing these instructions, what will be in $8? a.
6. Consider the following MIPS ISA code.
| addi $8, $0, 2 add $8, $8, $8
|
After executing these instructions, what will be in $8?
a. 00000000 00000000 00000000 00000001
b. 00000000 00000000 00000000 00000100
c. 00000000 00000000 00000000 00000010
d. 00000000 00000000 00000000 00000011
7. Which of the following is an R type instruction?
a. add
b. beq
c. addi
d. sw
8.
| addi $8, $0, 5 sw $8, 4($16) addi $16, $16, 4 lw $9, 0($16) |
Consider the following code: Assume $16 has a valid RAM address.
After executing the above code in sequence, which value will be in $9?
a. 5
b. 16 + 4 =20
c. $16 + 4
d. 9
9. Consider the following code: Assume $16 has the starting address of the array A.
| lw $8, 0($16) sw $8, 4($16) |
Which of the following Java code describes the above MIPS code.
a. A[8] = A[16]
b. A[0] = A[1]
c. A[1] = A[0]
d. A[A[16]+4] = A[8]
10. Which of the following gives the RTL description of the MIPS code, sw $8, 4($16)
a. Mem[R[8]] R[16] + 0
b. Mem[R[16] + 4] R[8]
c. R[8] mem[R[16] + 4]
d. R[16] mem[R[8] + 4]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
