Skip to content

gabrieldim/Assembly-MIPS-Instruction-Set

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Writing assembly program with the MIPS instruction set

Write an assembly program in MIPS that for a given two vectors, as arrays of integers, will calculate their sum and their scalar product.

Example: 𝑣1 = (1; 3; βˆ’7) 𝑣2 = (4; βˆ’2; βˆ’1)
sum of vectors β†’ 𝑣1 + 𝑣2 = [1 + 4; 3 + (βˆ’2); (βˆ’7) + (βˆ’1)] = (5; 1; βˆ’8)
scalar product β†’ 𝑣1 βˆ— 𝑣2 = 1 βˆ— 4 + 3 βˆ— (βˆ’2) + (βˆ’7) βˆ— (βˆ’1) = 4 - 6 + 7 = 5

Example (for index number 123456):
Input: 268501280 3 1 3 -7 4 -2 -1

memory address for storing the vector of the sum Size of vectors vector 1 vector 2
268501280 3 - 1, 3, -7 4, -2, -1

About

Assembly program with the MIPS instruction set

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published