Question: Thaks Ne BONUS (DO NOT MARK ON SCANTRON) 1. Consider the following MIPS machine code OR consider the equivalent MIPS assembly: beq 50, $0, 0

 Thaks Ne BONUS (DO NOT MARK ON SCANTRON) 1. Consider the

Thaks Ne BONUS (DO NOT MARK ON SCANTRON) 1. Consider the following MIPS machine code OR consider the equivalent MIPS assembly: beq 50, $0, 0 test: beq $0, $0, test 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 $o 2. Which of the following is the RTL description of the above beq instruction? a. IF (RIoInn R[O]) PC PC-0 ELSE PC PC + 4 b. IF (RIO! " R101) PC PC + 4 ELSE PC PC-0 c. IF(R[0] ". R101) PCPC +0 ELSE PCPC+4 3. Consider the following MIPS machine code. bne $0, $0, 2 addi Sto, $0, 5 addi $t1, $0, 10 What will be in $to and $t1 after the above program is executed? a. $to 5, $t1 is unknown because 3d statement will not be executed b. $t1 10, $to is unknown because 2hd statement will not be executed c. Sto-5, St1-10 4. Consider the following code: What will be in $s0 after the program is executed? addi Sto, $0, 3 add $s0, $0, 0 addi Sto, $0, 3 add $so, $O, 0 addi $to, Sto,-1 add $so, $s0, Sto bne Sto, $0, -2 OR doloop: addi $to, to, -1 add $s0, Ss0, $to bne to, $0, doloop a. b. 3 C. d. Program will not terminate- it will loop forever

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!