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 19:30
When using the ohmmeter function of a digital multimeter, the leads are placed in what position relative to the component being tested? a. parallel b. control c. series d. line
Answers: 3
question
Engineering, 04.07.2019 18:10
The mass flow rate of the fluid remains constant in all steady flow process. a)- true b)- false
Answers: 1
question
Engineering, 04.07.2019 18:10
Assuming compressible flow of air and that the measurements are done at flagstaff a pitot static tube that gives the difference of total and static pressure measures 0.35 m of mercury. what is the velocity of air? assume the temperature to be 300k. (submit your excel or matlab calculation sheet)
Answers: 1
question
Engineering, 04.07.2019 19:10
With increases in magnification, which of the following occur? a. the field of view decreases. b. the ambient illumination decreases. c. the larger parts can be measured. d. the eyepiece must be raised.
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
Questions on the website: 13722363