Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

for the memory location in the table below,write 2.6 The table below shows 32-bit values of an array stored in memory For the memory locations

for the memory location in the table below,write
image text in transcribed
2.6 The table below shows 32-bit values of an array stored in memory For the memory locations in the table below, write pseudocode to move the array locations around so that they are sorted lowest to highest. Use temporary variable names Templ, Temp2, Temp3, etc. as needed. Don't try to write in MIPS assembly, write in C, for example: A[ 1 ] A[ 2 ] or Templ A[1] or AI1]-Templ a. Assume that this particular machine uses byte-addressable RAM and a word size of four bytes exactly as we have discussed in class. Complete the table below first and then write code to implement the final column. Present Value Byte Address &24 &28 &32 Array Index New From Array Value Index Page 1 of 7 COSC 2440 Computer Organization and Architecture &36 &40 A13 b. [5] For the memory locations in the table above, write MIPS code to sort the data from lowest to highest, placing thelowest value in the smallest memory location. Use a minimum number of MIPS instructions, Assume the base address of Array is stored in register $so Hint: Remember you'll be repeatedly moving the contents around of a word of memory starting at some 4-byte multiple added to $so. So the first is o($so) and putting that value into $to, for example, would be a line of MIPS code that looks like this: lw $to, 0 (Ss0) Minimize instructions, not temporary variables. I was able to sort the array in 10 instructions, and the line above was my first line of code

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_2

Step: 3

blur-text-image_3

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

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago