Question
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
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 “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 23
Binary: 00000000000000000000000000010111
Quaternary: 0000000000000113
Octal: 00000000027
Continue? (1=Yes/0=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/0=No) (assume that the user inputs 0)
Find and simplify f (x + h). f(x)=3-4x
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started