Question: Exercise 1 Write the MIPS program that prints the sum of all integer numbers from mum 1 to num2 where a mi and nu m2



Exercise 1 Write the MIPS program that prints the sum of all integer numbers from mum 1 to num2 where a mi and nu m2 are integers and entered by the user: For exemplo, che sorror www72 and 28 then en program should show the sum a. 35, Exeral. 2: Write the MIPS program that computes the area of a rectangle given the width and the height. The width and height are read from the standard input after prompting the user, and then the program computes the area and prints it on the standard output. Here's an example scenario: Enter width (integer): 2 Enter height (integer): 4 Rectangle's area is 8 Modify the program so that it also calculates and prints the perimeter (i.e., sum of all sides) of the rectangle. Thus, after modification, the example scenario would become: Enter width (integer): 2 Enter height (integer); 4 Rectangle's area is 8 Its perimeter is 12 Exercise 3: Write the following sequence of code into MIPS assembler: a=a+b+c-d+5; Assume that a, b, c, d are stored in registers Ss1-$84. Exercise 4: Convert the following C code into MIPS: ATO)=5: All)= A[0]+a; A[2]- A[1]+A[0]; A[3]= A[4]=a+5; A151= A[3] + A[4]3 CHA[51 - 43 a is in Sso. b is in Ssi base address of A in Ss2 Exercise 5: Given the following register values: Ss1 = 0000 0000 0000 0101 Ss2 = 0000 0000 0000 0011 Ss3 = 0000 0001 0000 1000 Ss4= 1111 0000 0000 0011 What are the values of registers SsIto $s4 after executing the following MIPS instructions: $1$.1.8 $2.5.1.8.2 - $23.8.3.2 SUA. $.4.2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
