Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume that A and B are arrays with elements of the arrays as 4 - byte integers and registers $ 5 6 and $ 5

Assume that A and B are arrays with elements of the arrays as 4-byte integers and registers $56 and $57 contain the base address of A and B, respectively. Assume A(i)=100+i for )=100,A(1)=(101,dots; and B(i)=i for i=0,1, dots10(i.e,B()=,B(1)-1,dots. Let registers $s,$s1,$s2,$s3 have the initial values of 0,0,2,2, respectively.
Loop: sll $to, $sO,2
add $ to $, $, $s6
Iw $t3,0($to)
add $t4,$t3,3
sw $t4,0($+0)
sll $t1, $s1,2
add $t1,$t1,$s7
Iw $+5,0($+1)
add $t3,$t3,$t5
sw $t3,0($t1)
addi $s0,$s0,1
addi $s1,$s1,1
addi $$3,$$3,-1
bne $$3,$0, LOOP
Exit: ...
After completing the loop, the values of A and B are
A(0)=
A(1)=
.A(2)=
,A(3)=
B(0)=
,B(1)=,B(2)=
B(3)=
image text in transcribed

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

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago