Chat with us, powered by LiveChat

calculate a specific algebraic expansion, i.e. compute the value of f and g for the expression: f =( A4 − 4B3 + 3C 2 − 2D).

Words: 128
Pages: 1
Subject: Uncategorized

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 =( A4 − 4B3 + 3C 2 − 2D)
  • g =( AB2 + C 2D3 )

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.