Question: How do I do this using C coding? How do I do this using C coding? WEEK 5: Project 1 Part A You are tasked

How do I do this using C coding?

How do I do this using C coding? How do I do

How do I do this using C coding?

WEEK 5: Project 1 Part A You are tasked to calculate a specific algebraic expansion, i.e. compute the value of f and g for the expression: f = (A+ 4B3 + 3C2 2D) g = (ABP + c2D3) without using any intrinsic multiplication instructions, subroutines, and function calls. More formally, 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=(A4-4B3+3C2-2D) and g=(AB2+C2D3) using your own self-written multiplication routine. The program will then output f and g in decimal and binary, using syscall routines for each output. Note: To receive credit, no multiplication, no division, and no shift instructions shall be used. Namely, do not use any of mul, mul.d, mul.s, mulo, mulou, mult, multu, mulu, div, divu, rem, sll, sllv, sra, srav, srl, srlv}. The goal to compose your own division technique. In addition, use of a loop is required for credit to realize the multiplication code. Do not use Macros, Subroutines, or Functions in this project. Sample output for Part A is: Enter 4 integers for A,B,C,D respectively: 15 f_ten = 49026 f_two = 00000000000000001011111110000010 g_ten = 13122 g_two = 00000000000000000011001101000010 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 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 Databases Questions!