Description
Semester: V
Experiment No. 5: Matrix operations
5 a) Matrix addition
Input: 2 matrices stored in memory (8-bit elements – in row major order), Size of matrices (row1, column1, row2, column2).
Output: Sum of matrices.
Hints:
Perform the addition only if row1=row2 and column1=column2, else exit.
5 b) Matrix subtraction
Input: 2 matrices stored in memory (8-bit elements – in row major order), Size of matrices (row1, column1, row2, column2).
Output: Difference of matrices.
Hints:
Perform the subtraction only if row1=row2 and column1=column2, else exit. No need to take the 2’s complement if the difference is negative.




Reviews
There are no reviews yet.