MIPS Assembly ############################################################### ############################################################### ############################################################### # PART 2 (local minimum points) # Write a function in MIPS assembly that takes an array of # integers and finds local minimum points. i.e., points that if # the input entry is smaller than both adjacent entries. The # output is an array of the same size of the input array. The # output point is 1 if the corresponding input entry is a # relative minimum, otherwise 0. (You should ignore the output # array's boundary items, set to 0.) # # For example, # # the input array of integers is {1, 3, 2, 4, 6, 5, 7, 8}. Then, # the output array of integers should be {0, 0, 1, 0, 0, 1, 0, 0} # # (Note: The first/last entry of the output array is always 0 # since it's ignored, never be a local minimum.) # $a0: The base address of the input array # $a1: The base address of the output array with local minimum points # $a2: Size of array find_local_minima: ############################ Part 2: your code begins here ### ############################ Part 2: your code ends here ### jr $ra
MIPS Assembly
###############################################################
###############################################################
###############################################################
# PART 2 (local minimum points)
# Write a function in MIPS assembly that takes an array of
# integers and finds local minimum points. i.e., points that if
# the input entry is smaller than both adjacent entries. The
# output is an array of the same size of the input array. The
# output point is 1 if the corresponding input entry is a
# relative minimum, otherwise 0. (You should ignore the output
# array's boundary items, set to 0.)
#
# For example,
#
# the input array of integers is {1, 3, 2, 4, 6, 5, 7, 8}. Then,
# the output array of integers should be {0, 0, 1, 0, 0, 1, 0, 0}
#
# (Note: The first/last entry of the output array is always 0
# since it's ignored, never be a local minimum.)
# $a0: The base address of the input array
# $a1: The base address of the output array with local minimum points
# $a2: Size of array
find_local_minima:
############################ Part 2: your code begins here ###
############################ Part 2: your code ends here ###
jr $ra
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)