Question: Q2) You are tasked to calculate a specific algebraic expansion, i.e. compute the value of f for the expression. This is similar to Project

Q2) You are tasked to calculate a specific algebraic expansion, i.e. compute the value of f for the

Q2) You are tasked to calculate a specific algebraic expansion, i.e. compute the value of f for the expression. This is similar to Project 1 Part A, but this time with floating point numbers. f = (0.1xAXB) + (0.3xC) - (0.4D) 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 and output f as a floating-point number, using syscall for output. HINT: For multiplying the integers A and B. you may use your own self-written multiplication loops. Then convert AxB, C, and D from the integer data format to Floating Point Data Format using appropriate instructions, and afterwards use mul.s & add.s/sub.s instructions to calculate per the algebraic expression given. Sample output for Part B is: Enter 4 integers for A, B, C, D respectively: 15 9 21 3 f = 18.6 The submitted program shall provide outputs in exactly the sequence and format shown above. To receive full credit, no additional superfluous outputs shall occur.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The question appears to be a programming assignment that requires writing MIPS assembly code to compute a specific algebraic expression using floating... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!