Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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? The program will terminate without doing anything The program will not terminate- it will loop forever The program check whether $0 contains 0, otherwise it will assign o to $0 Cannot predict- depends on the current value in So a b. c. d. 2. Which of the following is the RTL description of the above beq instruction? a. IF (RIO! .. RIO) PC PC-0 ELSE PC PC + 4 b. IF (RIO! R101) PC PC + 4 ELSE PC PC-0 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. Sto 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. C. d. 3 Program will not terminate- it will loop forever

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

Recommended Textbook for

AutoCAD Database Connectivity

Authors: Scott McFarlane

1st Edition

0766816400, 978-0766816404

More Books

Students also viewed these Databases questions

Question

1. How will you, as city manager, handle these requests?

Answered: 1 week ago