COMP 2421 Computer OrganizationMIPS Programming AssignmentI. OBJECTIVESThe 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.II. ASSIGNMENT DESCRIPTIONWrite 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 “0” (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 23Binary: 00000000000000000000000000010111Quaternary: 0000000000000113Octal: 00000000027Continue? (1=Yes/0=No) (assume that the user inputs 1)Enter a number: (assume the user inputs 24)Input number is 24Binary: 00000000000000000000000000011000Quaternary: 0000000000000120Octal: 00000000030Continue? (1=Yes/0=No) (assume that the user inputs 0)Bye!III. WHAT TO SUBMIT1) Your program code. Store the code in a file and name it as \ p1_XXXXXXXX.s", where \XXXXXXXX" represents your 8-dight student number (the last letter is not needed).2) At the beginning of the program code file, you should write a “readme” section to explain briefly how the program runs and what your design is. In addition, any other important/special information which user should know before running the program代 写COMP 2421 Computer OrganizationStatistics should also be included in the paragraph.3) Along with the program code, you should properly write comments for your code so that other programmers can easily follow your code.4) Upload the file to Blackboard. No other form of submission will be accepted. DO NOT zip the file.IV. ASSESSMENTYour program will be tested on QtSpim. Note that QtSpim will be configured as ignoring the branch delay slots (so that you can ignore this point in your program).The program will be assessed from these two aspects:Correctness (Total 70 points). program can be successfully loaded (10 pts). input handling (10 pts). number conversion (30 pts). result output (10 pts). repetition (10 pts)Documentation (Total 30 points). description of the program and comments (20 pts). code formatting and style (you are suggested to follow the style of the codes in the lab materials) (10 pts)The following programs serve as the hints for you to complete this assignment. You are strongly encouraged to understand the functionalities of these programs before starting your own program. Please note that these programs are just used for illustration, you may not need to use them exactly in your own program. In addition, the materials in the labs are also good sources for your consideration.(1) This example illustrates how to capture a string from the console and then to store it in a memory location (here in the example, it is “buffer”)..text.globl mainmain:la v0, 4syscall la a1, buffer li a0, replyli a0, bufferli v0, 10syscall.dataask: .asciiz "\n Enter string: "reply: .asciiz "\n You wrote: "buffer: .space 10COMP 2421 Computer Organization MIPS Programming Assignment I. OBJECTIVESThe 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 bit