subject
Engineering, 06.04.2020 16:03 dmgcity

You are tasked to calculate a specific algebraic expansion, i. e. compute the value of f and g for the expression:

f = (0.1×A4) - (0.2×B3) + (0.3×C2) - (0.4×D)

g = (0.1×AB2) + (0.2×C2D3)

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 and g using your own self-written multiplication routine. The program will then output f and g as floating point numbers, using syscall routines for each output. 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 necessary to compose your own multiplication technique. In addition, use of Subroutines is required for credit to realize the multiplication code.

Sample output for Part A is:

Enter 4 integers for A, B, C, D respectively:

15

9

21

3

f = 5047.8

g = 2502.9

The submitted program shall provide outputs in exactly the sequence and format shown above. To receive full credit, no additional superfluous outputs shall occur.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 03.07.2019 15:10
Apiston-cylinder with a volume of 0.25 m3 holds 1 kg of air (r 0.287 k/kgk) at a temperature of 100 c. heat transfer to the cylinder causes an isothermal expansion of the piston until the volume triples. how much heat is added to the piston-cylinder?
Answers: 3
question
Engineering, 04.07.2019 03:10
What precautions should you take to prevent injuries when dealing with heavy loads?
Answers: 1
question
Engineering, 04.07.2019 18:10
Journeyman training is usually related (clo2) a)-to specific tasks b)-to cost analysis of maintenance task c)-to control process to ensure quality d)-to installation of machinery
Answers: 2
question
Engineering, 04.07.2019 19:10
An electric kettle is made out of stainless steel, weighs two pounds (when empty) and is equipped with a heating element that consumes 2 kw of electricity. assuming that the water and the kettle are at the same uniform temperature at any moment of time, calculate the shortest possible time to bring 2 quarts of water from room temperature to the onset of boiling
Answers: 2
You know the right answer?
You are tasked to calculate a specific algebraic expansion, i. e. compute the value of f and g for t...
Questions
question
Mathematics, 05.09.2019 06:10
question
Social Studies, 05.09.2019 06:10
Questions on the website: 13722361