in MIPS like an assembly language not in a C or any other higher-level language. Write a function 𝐴𝑉𝐴(&𝑋,&𝑌,&𝑍,𝑛,𝑠,𝑡) to

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

in MIPS like an assembly language not in a C or any other higher-level language. Write a function 𝐴𝑉𝐴(&𝑋,&𝑌,&𝑍,𝑛,𝑠,𝑡) to

Post by answerhappygod »

in MIPS like an assembly language not in a C or any otherhigher-level language.
Write a function 𝐴𝑉𝐴(&𝑋,&π‘Œ,&𝑍,𝑛,𝑠,𝑑) to perform thefollowing absolute value vector addition, such that 𝑋𝑖=|π‘Œπ‘–|+|𝑍𝑖|+2×𝑠+𝑑; π‘“π‘œπ‘Ÿ 0≀𝑖 β‰€π‘›βˆ’1 where &𝑋,&π‘Œ, and &𝑍refer to the array 𝑋,π‘Œ,𝑍’s starting address, 𝑛 is the size of thearray, and 𝑠 and 𝑑 are integers. Please use the stack to pass thesesix parameters. Also, write main programs that call the 𝐴𝑉𝐴function on the following data sets (note: please prepare twoseparate program files, one for each data set) β€’ 𝑛 = 5, 𝑠=2, 𝑑=1, π‘Œ= {1, 2, 3, 4, 5}, and 𝑍 = {βˆ’5,βˆ’4,βˆ’3,βˆ’2,βˆ’1} β€’ 𝑛=10, 𝑠=3, 𝑑=2,π‘Œ={βˆ’1, 3, βˆ’5, 7, βˆ’9, 2, βˆ’4, 6, βˆ’8, 10}, and 𝑍={1,2,3,4,5,6,7,8,9,10} (For each data set, the main program shouldfirst print out π‘Œ and 𝑍 arrays, and then to calculate 𝑋, andfinally prints out 𝑋 array.)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply