Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this MIPS ASSEMBLEY CODE. YOU CAN ONLY USE LOOPS NO OTHER FUNCTIONS ARE ALLOWED. READ THE WHAT NOT TO USE SECTION!!!!

I need help with this MIPS ASSEMBLEY CODE. YOU CAN ONLY USE LOOPS NO OTHER FUNCTIONS ARE ALLOWED. READ THE WHAT NOT TO USE SECTION!!!!
You are tasked to calculate a specific algebraic expansion, i.e., compute the value of f and g
for the expression:
f=(5**B**D+A)
g=(D**D-C**A)
without using any native multiplication instructions, subroutines, and function calls. More
formally, write MIPS assembly code that accepts four positive integers A, B, C, and D as input
parameters. The code shall execute in MARS to prompt the user to enter four positive integers
represented in decimal, each separated by the Enter key. The program shall calculate
f=(5BD+A) and g=(DD-CA) using your own self written multiplication routine. The program
will then output f and g in decimal and binary, using syscall for each output. (Hint: use syscall
35 to print in binary)
What not to use: any of {mul, mul.d, mul.s, mulo, mulou, mult, multu, mulu, div, divu, rem,
sll,sllv, sra, srav, srl, srlv}. The goal to compose your own division technique. In addition, use of
a loop is required for credit to realize the multiplication code. Do not use Macros, Subroutines,
or Functions in this project.
Sample output for Part A is:
Enter 4 integers for A,B,C,D respectively:
7
10
5
17
f_ten =857
f_two =00000000000000000000001101011001
g_ten =254
g_two =00000000000000000000000011111110
image text in transcribed

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

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions

Question

Find the sample median for the data described in Example 2.3b.

Answered: 1 week ago

Question

What are the stages of project management? Write it in items.

Answered: 1 week ago

Question

3. Explain the forces that influence how people handle conflict

Answered: 1 week ago