CSCE 212: Intro to Computer Architecture
Project #4
Write a MIPS assembly code that accepts four positive integers A, B, C, and D as input parameters and compute the below f and g expressions:
f=(0.1A4)-(0.2B3)+(0.3C2)-(0.4D) g= (0.1AB2)+(0.2C2D3)
The code should be executed in MARS to prompt the user to enter four positive integers, each separated by the Enter key. The program should calculate f and g using multiplication procedures and output f and g as floating-point numbers by using syscall routines for each output.
Note: No multiplication, division, and shift instructions { mul, mul.d, mul.s, mulo, mulou, mult, multu, mulu, div, divu, rem, sll, sllv, sra, srav, srl, srlv} are
allowed to be used. Thus, it is necessary to compose your own multiplication by using loops. In addition, you must use procedures to realize the multiplications.
Sample output for Part A is:
Enter 4 integers for A,B,C,D respectively:
15
9
21
3
f= 5050.392 g= 2502.6116
To receive full credit, the submitted program shall provide outputs as shown above.
Programming
[SOLVED] MIPS assembly computer architecture CSCE 212: Intro to Computer Architecture
$25
File Name: MIPS_assembly_computer_architecture_CSCE_212:_Intro_to_Computer_Architecture.zip
File Size: 715.92 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.