Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MIPS Instructions 1. Provide the sequence (one or more) of MIPS instructions that performs: (Use assembly language NOT labels with branch instructions) a. increments register

MIPS Instructions

1. Provide the sequence (one or more) of MIPS instructions that performs: (Use assembly language NOT labels with branch instructions)

a. increments register $23 by 5000;

b. load register $23 with value -1000

c. put value 456 in a word at memory location 0x8004

d. increments a word in memory location 4000 by 0xCDE

e. x [10] = x [100] + x [101], assuming x [0] an integer at memory location 2000; Note x is an array of integers; C declaration: int x [200];

f. a = b * c, assuming a, b and c are integer variables in memory locations 3000, 3996 and 3992, respectively; C declarations: a, b, c;

g. x = y * w m assuming x, y and w are floating point variables in memory locations 8000, 7996 and 7992, respectively; C declarations: float x,y,z

h. if ( x => y) goto XYZ

Assume that variable x corresponds to word at memory address 0x1000, and variable y to word at memory address 0x70000. The instruction with label XYZ is after the branch instruction and there are 100 instructions between those two instructions.

i. if ( x

Assume that variable x corresponds to word at memory address 0x1000, and variable y to word at memory address 0x7000. The instruction at XYZ is before the branch instruction and there are 1000 instructions between those two instructions.

Problems a - i above are unrelated.

2. For the following MIPS code determine a bit pattern for each instruction.

XYZ: LW $8,30($2)

ADDI $2, $8, -7

DIV $2, $30

MFLO $2

BEQ $3, $5, ABC

ADDI $2, $8, -4

ABC:

SW $2, -2($5)

BNE $5, $7, XYZ

THIS IS MY ATTEMPT AT ANSWERING THE QUESTIONS. PLEASE REVIEW FOR ERRORS AND EXPLAIN WHAT AND WHY IS WRONG. Thanks!

image text in transcribed

image text in transcribed

23,6(sscoS , tL23 , Lew 23) (-ics c o) 806H YOOQ CDE

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

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions