Answered You can hire a professional tutor to get the answer.

QUESTION

It is required to write a MIPS assembly program that does the following:(i) Ask the user to enter the base of an input number (2-16).

It is required to write a MIPS assembly program that does the following:(i) Ask the user to enter the base of an input number (2-16). Your program should givean error if the entered base is outside the given range and ask the user to reenter thebase.(ii) Read the entered number in the specified base. Your program should report an errormessage if an invalid digit is entered. Write a procedure for reading a number in agiven base.(iii) Ask the user to enter the base he wants the number to be converted to (2-16). Yourprogram should give an error if the entered base is outside the given range and askthe user to reenter the base.(iv) Print the number in the required base. Only the significant digits have to be printed.Write a procedure for printing the number in the required base.A sample execution of the program is shown below:Enter the base of the input number: 10Enter a number in base 10: 20Enter the base of the output number: 2The entered number in base 2 is: 10100Enter the base of the input number: 16Enter a number in base 16: 5AEnter the base of the output number: 2The entered number in base 2 is: 1011010Enter the base of the input number: 2Enter a number in base 2: 11011Enter the base of the output number: 10The entered number in base 10 is: 27

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question