Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 4 : Performance & Pipelining ( 2 5 points ) Given an integer array A in memory with the base address stored in register

Problem 4: Performance & Pipelining (25 points)
Given an integer array A in memory with the base address stored in register $s1, the following
MIPS code is executed. Register $s0 contains the variable b. Assume that register $s2 is used for
output. The content of array A is {0,1,5,7,9,11,6,3,7,2} where A[0]?=0 and A[9]=2. The
variable b=5.
addi $t0,$s1,20
1oop: 1w $t1,0($t0)
beg $t1,$s0, L1
addi $t0,$t0,-4
bne $t0,$s1,100 p
L1: add $s2, $zero, $zero
beg $t0,$s1, exit
addi. $ s2, $zero, 1
exit:
a)[6 points] Describe in one sentence what this code does.
b)[3 points] What is the final value in $s2?
c) points
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

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

1. Use questioning to check your understanding.

Answered: 1 week ago