Question: Write a MIPS program that processes an array by applying an averaging filter to it. An averaging filter works like this: create a new array

Write a MIPS program that processes an array by applying an averaging filter to it. An averaging filter works like this: create a new array where each element at index J is the average of the three elements from the old array at indexes J-1, J, and J+1. .data

size: .word 12

array: .word 50,53,52,49,48,51,99,45,53,47,47,50

result: .word 0,0,0,0,0,0,0,0,0,0,0,0 In the above, the second element of the result is the average of 50, 53, and 52. The first and last elements of the new array are copies of the corresponding first and last elements of the old array. Use all integer arithmetic.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!