Question: Write an MIPS assembly program that finds the sum of the digits of a non - negative, decimal integer that are multiples of a singledigit

Write an MIPS assembly program that finds the sum of the digits of a non-negative, decimal integer that are multiples of a singledigit, positive integer n. At the end of the program, this sum should appear in register $3.
The program should assume that the values for register $1 and register $2 have been set by the twoints front end, where register $1 contains the decimal integer and register $2 contains the value of n.
For example, when running the program with the twoints front end and entering the following decimal values:
value for register $1: 6337194
value for register $2:3
at the end of the program, register $3 should contain 0x00000015 since there are four digits that are multiples of 3, and 6+3+3+9=2110=015.
 Write an MIPS assembly program that finds the sum of the

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!