Suppose we have two arrays A[10] and B[10]. Write a MIPS code that does the following: It compares A[i] and B[i]. If A[i] 8; no swap 2-2; no swap 20>10; no swap 33; no swap 5 5 10 10 8 2 5 5 2 8 8 8 8...


Please solve in one hour.


Suppose we have two arrays A[10] and B[10]. Write a MIPS code that does the following:<br>It compares A[i] and B[i]. If A[i] <B[i], it swaps their values. Otherwise, there is no swap. There is an example<br>below. Suppose the addresses of A[0] and B[0] are in registers t0 and t1, respectively.<br>Inputs<br>A<br>В<br>Outputs<br>A<br>B<br>5<6; swap<br>10>8; no swap<br>2<5; swap<br>8=8; no swap<br>-5<4; swap<br>4>-2; no swap<br>20>10; no swap<br>3<5; swap<br>10<11;swap<br>5>3; no swap<br>5<br>5<br>10<br>10<br>8<br>2<br>5<br>5<br>2<br>8<br>8<br>8<br>8<br>-5<br>4<br>4<br>-5<br>4<br>-2<br>4<br>-2<br>20<br>10<br>20<br>10<br>3<br>5<br>5<br>3<br>10<br>11<br>11<br>10<br>3<br>

Extracted text: Suppose we have two arrays A[10] and B[10]. Write a MIPS code that does the following: It compares A[i] and B[i]. If A[i] 8; no swap 2<5; swap="" 8="8;" no="" swap=""><4; swap="" 4="">-2; no swap 20>10; no swap 3<5; swap=""><11;swap 5="">3; no swap 5 5 10 10 8 2 5 5 2 8 8 8 8 -5 4 4 -5 4 -2 4 -2 20 10 20 10 3 5 5 3 10 11 11 10 3

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here