Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In MIPS language, Please make sure it is working corectly. Will vote! You ( probably ) used syscalls 3 5 and 3 4 in the

In MIPS language, Please make sure it is working corectly. Will vote!
You (probably) used syscalls 35 and 34 in the last lab. Libraries and operating systems
have many functions like these (or syscall 1, or 5, etc). Someone had to write it. Today you are that someone. The old someone was up too late and our multiply instruction broke. Write a replacement, and make sure its not slow.
Prgm1) Prompt the user to enter 2 base-10 numbers and save them to data memory.
Then using add/shift method, multiply the two numbers together. You CANT use mul
directly. Output the result using syscall 1 to the screen. There is no credit if your code
will do more than 32 iterations for some input (i.e. no slow, n*m =
n+n+n+n+n+n+n+n+n+n+n+n+n+n+n+n+n+n+n+n+n+n+...).
Prgm2) Print the answer from Prgm1 in base-32. Stick to using only the t-registers when you can. (If you use an integer to ASCII character mapping that we learned in the previous lecture, you will be able to easily implement this function.)
Notes:
By base-32 I mean like hex (base-16) but with groups of 5 bits instead of 4 from Least
Significant Bit (LSB), so we use letters up to V. Start by thinking about how you would do
syscall 1,35, or 34.
For example, 01011101000101010100010000111100(in 32 bit)
(Grouping 5 bits from LSB)01011101000101010100010000111100
(Conversion into base-32)1 E H A H 1 S

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions