Question: Write a MIPS assembly language program that adds two arrays (element-by-element addition) and prints their sum. For instance, if the two arrays are: a =
Write a MIPS assembly language program that adds two arrays (element-by-element addition) and prints their sum. For instance, if the two arrays are: a = | 2 | 4 | 6 | 8 | 10| 12| 14| 16| 18| 20| b = |-1 | 0 | 1 |-2 | 0 | 2 |-3 | 0 | 3 |-4 | then their sum is: c = | 1 | 4 | 7 | 6 | 10| 14| 11| 16| 21| 16| All three arrays should be of size at least 10. You may initialize a and b using the .word directive in your programs .data section. Print out the element of the sum in a single line, labeled and with values separated by spaces. The line should be terminated by a character. For instance, if the arrays a and b are as above, the output will look like: The sum is: 1 4 7 6 10 14 11 16 21 16
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
