Engineering
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.

answer
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, johnthienann58
Thermal stresses are developed in a metal when its a) initial temperature is changed b) final temperature is changed c) density is changed d) thermal deformation is prevented e) expansion is prevented f) contraction is prevented
Answers: 2
image
Engineering, 04.07.2019 19:10, kimmy6973
What is creep? what is stress relaxation?
Answers: 1
image
Engineering, 06.07.2019 02:30, emiller6462
Plot schematically the tensile stress versus strain curves for a typical thermoplastic material at a temperature below its glass transition temperature (tg and at a temperature above its tg, respectively. do the same for a typical thermosetting material. list in a table any differences or similarities between the two materials at t> tg and t < tg, respectively, and relate them to the structures of the two types of polymers
Answers: 3
image
Engineering, 06.07.2019 04:30, jess2652
Calculate the equilibrium concentration of vacancies per cubic meter in pure aluminum at 500°c. assume that the energy of formation of a vacancy in pure aluminum is 0.76 ev. what is the vacancy fraction at 650°c.
Answers: 3
Do you know the correct 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: