Question: CDA-3101 MIPS Assembly Programming Write the following code segment in MIPS assembly language code: If X != 1 then Y = X + X; X

CDA-3101 MIPS Assembly Programming

  1. Write the following code segment in MIPS assembly language code:

If X != 1 then

Y = X + X;

X = 0;

else;

Y = Y + 1;

Prompt the user to enter the value of x and y and display the result on the console window.

  1. Write a program using a loop that multiplies two positive numbers (3 and 6) by using repeated addition. For example, to multiply 3 x 6, the program would add 3 six times, or 3 + 3 + 3 + 3 + 3 + 3

  1. Write a MIPS program to find the sum of squares from 1 to n. Where n=10.

For example, the sum of squares for 10 is as follows:

12+22+32++n2=385

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 Accounting Questions!