Question: Write a MIPS program to add two matrices and store the result in memory starting at address given in s4. The matrices are of the

Write a MIPS program to add two matrices and store the result in memory starting at address given in s4. The matrices are of the size 2 X 3 each. The two matrices are stored starting at two memory locations whose addresses are given in two registers, s2 and s3. Each number in the matrix is represented in signed 2s complement form.

Deliverables:

The Code with detailed comments

Flowchart of the

Short description of the approach and the program flow

Simulation input(s) and results

Part 2: For two matrices that are stored at starting addresses given by s0 and s1 respectively, with M1 of size 2 X 3 and M2 is of size 3 X 2; perform the multiplication of M1 X M2 and store the result in memory starting at address given in s5. Each number in the matrix is represented in signed 2s complement form.

Deliverables:

The Code with detailed comments

Flowchart of the

Short description of the approach and the program flow

Simulation input(s) and results

skeleton.s file

.globl main .globl initialize .data matrix1: .word 5, 6, 2, 7, 8, 1 matrix2: .word 3, 7, 2, 8, 9, 0 matrix3: .word 5, 6, 2, 7, 8, 1 matrix4: .word 3, 7, 2, 8, 9, 0 .text #In your code DO NOT CHANGE $s0 - $s3 unless you know how to restore the values. main: jal initialize # Used to load matrices addresses into corresponding registers # DO NOT TOUCH initialize: la $s2, matrix1 la $s3, matrix2 la $s0, matrix3 la $s1, matrix4 

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!