Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming 2(4090): Write a MIPS code to compute the sum of N numbers such that each sum skips over certain numbers. Ask the user for

image text in transcribed

Programming 2(4090): Write a MIPS code to compute the sum of N numbers such that each sum skips over certain numbers. Ask the user for how many numbers to skip (give option of 1-4) and then proceed to compute the sum Sum(x1) -N1 + N2+ N3 +... Sum(x2) - N1 + N3 + N5 +.... Sum(x3)- N1 + N4 + N7 + Sum(x4)- N1 + N5 N9 +.... Sum(x1) determines the sum of all numbers, Sum(x2) determines the sum of numbers skipped by 2, Sum(x3) determines the sum of numbers skipped by 3 and so on. Assume the numbers as given below where N1 100, N2-7, N311, N4 25 and so on. .data .strA: Numbers: .byte 100, -7, 11, 25, -66, 99, -1, 34, 12, 22, -2, -7, 100, 11, 4, 67, 2,-90, 22, 2, 56, 3, -89, 12, -10, 21, 10, -25, -6, 9, 111, 34, 12, 22, -2, -17, 100, 111, -4, 7, 14, -19, -2, 29, 36, 31, 79, 2 .asciiz "Please enter your choice to skip numbers (1-4)In" .globl main .text main: # Your fully commented program starts here

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

50 Tips And Tricks For MongoDB Developers Get The Most Out Of Your Database

Authors: Kristina Chodorow

1st Edition

1449304613, 978-1449304614

More Books

Students also viewed these Databases questions