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 14:10
Line joining liquid phase with liquid and solid phase mixture is known as: a) liquidus b) solidus c) tie line d) none of the mentioned
Answers: 2
question
Engineering, 04.07.2019 18:10
Coiled springs ought to be very strong and stiff. si3n4 is a strong, stiff material. would you select this material for a spring? explain.
Answers: 2
question
Engineering, 06.07.2019 03:10
Air is flows through an adiabatic nozzle with an inlet pressure of 400 psia at a temperature of 300°f and a velocity of 20 ft/s. the outlet pressure is 40 psia and the velocity is 800 ftl/s. determine the outlet temperature of the air using: a) property tables b) specific heat (using the specific heat value for air at 300°f)
Answers: 3
question
Engineering, 06.07.2019 03:30
Give three differences between corrosion of metals and the corrosion of ceramics? what is static fatigue?
Answers: 1
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.02.2021 21:00
question
Mathematics, 05.02.2021 21:00
question
Arts, 05.02.2021 21:00
question
English, 05.02.2021 21:00
question
Mathematics, 05.02.2021 21:00
question
Social Studies, 05.02.2021 21:00
Questions on the website: 13722362