Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are tasked to use the same positive integers from Part A to also compute: h = f/g; i = (f+g) MOD h_quotient f =

You are tasked to use the same positive integers from Part A to also compute:

h = f/g; i = (f+g) MOD h_quotient

f = AC^3 - 3C^2 + BD^2 - 4B

g = A^2C +B^2D^2

More formally, write MIPS code to output the result of above expression of h and i without using any built-in MIPS/MARS instructions for multiplication or division. The values already entered for Part A for a, b, c, and d shall be used. Output the value of h and i in {quotient with remainder} in a format as separate decimal integers. Indicate the denominator for the remainder.

Note: To receive credit, no multiplication, no division, and no shift instructions shall be used. Namely, none of {mul, mul.d, mul.s, mulo, mulou, mult, multu, mulu, div, divu, rem, sll, sllv, sra, srav, srl, srlv} or else a zero score will result. Thus, it is to compose your own division technique. In addition, use of a loop is required for credit to realize the division code. It part of the project points to design a way to realize division using a loop.

Hint: You can refer to the definition of division and how division works. For example, given a positive integer X, and a positive integer Y where X>Y then the division X/Y is computed such that unique integers Q and R satisify X=( Y * Q + R) where 0 R < Y. The value Q is called the quotient and R is called the remainder. Some examples are:

{X = 7, Y = 2} then 7 = 2 * 3 + 1 so Q=3 and R=1 {X = 8, Y = 4} then 8 = 4 * 2 + 0 so Q=2 and R=0 {X = 13, Y = 5} then 13 = 5 * 2 + 3 so Q=2 and R=3

Enter 4 integers for A,B,C,D respectively: 15 9 21 3

f_ten = 49026

f_two = 00000000000000001011111110000010

g_ten = 13122

g_two = 00000000000000000011001101000010

Part B would additionally provide the following outputs:

h_quotient = 3

h_remainder = 9660

i_mod = 0

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 SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

Types of physical Maps?

Answered: 1 week ago

Question

Explain Intermediate term financing in detail.

Answered: 1 week ago

Question

Types of cultural maps ?

Answered: 1 week ago

Question

Discuss the various types of leasing.

Answered: 1 week ago

Question

What do they not do so well?

Answered: 1 week ago