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

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 19:20, mariahmimibrooks
Liquid flows at steady state at a rate of 2 lb/'s through a pump, which operates to raise the elevation of the liquid 100 ft from control volume inlet to exit. the liquid specific enthalpy at the inlet is 40.09 btu/lb and at the exit is 40.94 btub. the pump requires 3 btu/s of power to operate. if kinetic energy effects are negligible and gravitational acceleration is 32.174 tt/s, the heat transfer rate associated with this steady state process is most closely 1)-2,02 btu/s from the liquid to the surroundings 2)-3.98 btu/s from the surroundings to the liquid. 3)-4.96 btu/s from the surroundings to the liquid. 4)-1.04 btu/s from the liquid to the surroundings.
Answers: 2
image
Engineering, 06.07.2019 02:30, heavenwagner
A12 mm diameter shaft runs in a plain cylindrical bush 30 mm long that is located in an 18 mm diameter hole in a housing. the shaft-inner bush fit is h8 f and the outer bush-housing fit is h7-p6. make a fully cimensioned sketch of the bush with tolerances. find the maximum and minimum clearance or interference for both fits on the inner and outer diameters of the bush
Answers: 3
image
Engineering, 06.07.2019 02:30, sandy2597
Precipitation hardening can be achieved in many light alloys by a three-step heat treatment. what is carried out and what is the purpose at each step? why is such a treatment necessary based on the nucleation and growth theory of phase transformation. compare this treatment with tempering martensite for carbon steels (similarities and differences).
Answers: 1
image
Engineering, 06.07.2019 04:10, idjfjcjs584
Along steel shaft of 10 cm diameter is austenised at 870°c and then quenched in a liquid at 30oc. the average surface heat transfer coefficient is 2000 w/m2. °c. the relevant thermophysical properties of the shaft are: p=7800 kg/m", k=20 w/mk, cp=0.46 kj/kg. k calculate: a)-the time required for the center temperature to drop to 200°c. b)-the temperature at half-radius at that moment. c)-the amount of heat that had been transferred to the liquid by that time per meter length of the shaft
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 in other subjects:

Konu
Mathematics, 08.04.2021 21:50
Konu
Social Studies, 08.04.2021 21:50
Konu
History, 08.04.2021 21:50
Konu
Mathematics, 08.04.2021 21:50
Konu
Mathematics, 08.04.2021 21:50