Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6. 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]

6. 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]

7. Which of the following is the equivalent machine code for the MIPS ISA code, add $8, $9, $9? [hint: the fn-code of add is 32]

a. 000000 01001 01001 01000 00000 100000

b. 000000 01000 01001 01001 00000 100000

c. 000000 10001 10001 10000 00000 100010

d. 000001 10001 10001 10000 00000 100000

8. Which is the following is an equivalent MIPS ISA code for the following MIPS machine code given in hex digits, 01294020?

a. addi $9, $9, 4 //addis op-code is 34

b. lw $9, 4($9) //sws op-code is 35

c. add $8, $9, $9 //adds fn-code is 32

d. sub $8, $9, $9 //subs fn-code is 36

9.

test: beq $0, $0, test

beq $0, $0, 0

Consider the following MIPS machine code:

OR consider the equivalent MIPS assembly:

Which of the following is true?

a. The program will terminate without doing anything

b. The program will not terminate- it will loop forever

c. The program check whether $0 contains 0, otherwise it will assign o to $0

d. Cannot predict- depends on the current value in $0

10. Which of the following is the RTL description of the above beq instruction?

a. IF (R[0] == R[0]) PC PC 0 ELSE PC PC + 4

b. IF (R[0] == R[0]) PC PC + 4 ELSE PC PC 0

c. IF (R[0] == R[0]) PC PC + 0 ELSE PC PC + 4

d. IF (R[0] == R[0]) R[0] R[0] - 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions