Question: code in MIPS please 1 OBJECTIVES The objective of this assignment is to practice some simple programming tasks by using the MIPS assembly language using

 code in MIPS please 1 OBJECTIVES The objective of this assignmentis to practice some simple programming tasks by using the MIPS assembly

code in MIPS please

1 OBJECTIVES The objective of this assignment is to practice some simple programming tasks by using the MIPS assembly language using QtSpim. This program allows a user to input an integer. Then, the program prints out the corresponding number in different number systems including: i) Binary, ii) Quaternary, and iii) Octal. After completing the assignment, student should be able to understand the followings: how a program reads data and prints them out through the console window in different formats; (Sample code will be provided to show the operations. You need to understand how system calls work properly.) how the content of a register at the bit level can be read and how to use bitwise operations to perform logical transformations; how labels (as main memory addresses) and constants are declared and used in a program; how loop structures are used. 2 ASSIGNMENT DESCRIPTION Write a program in MIPS assembly language that realizes the following functionalities: (1) Prompt a message in the Console to ask for an integer. (It is assumed that the input type is correct, i.e., the input must be an integer.) (2) Capture the input and store the number in a register. (3) Use your own algorithm to convert the value stored in the register. (Note that you may store the output as a string or in an array.) (4) Print out the results (i.e., the binary number, quaternary number and octal number) on the console. (5) Ask if the user wants to "Continue" by inputting either 1 or o (1=Yes and 0=No). (6) If Yes, repeat steps "(1) to (5)" again. (7) If No, terminate the program properly. The following is a sample of input and output of the program: Enter a number: (assume the user inputs 23) Input number is 23 Binary: 00000000000000000000000000010111 Quaternary: 0000000000000113 Octal: 00000000027 Continue? (1=Yes/O=No) (assume that the user inputs 1) Enter a number: (assume the user inputs 24) Input number is 24 Binary: 00000000000000000000000000011000 Quaternary: 0000000000000120 Octal: 00000000030 Continue? (1=Yes/O=No) (assume that the user inputs 0) Bye

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!