Write an arithmetic unit and related self testing in mips


Write an arithmetic unit and related self testing in MIPS assembly as following. Put all the source codes in a directory and compress them into a zip file and upload. Grader should be able to download your zip file, unzip it and directly load it into MARS for final machine code generation and run - without any error. 1. The over all program should ask user for two integer numbers (a, b) and target arithmetic operation (+,-,*./) and will print the result of the operation with a comment if the result produced is correct or not. 2. Write add_normal, sub_normal, mul_normal and div_normal procedures which all takes $a0 and $a1 as two argument integers and returns the operation results in $v0 (and in $v1 for Hi result in mul or div). All these *_normal uses only native arithmetic operation of MIPS. 3. Write add_logic, sub_logic, mul_logic and div_logic procedures which all takes $a0 and $a1 and two argument integer and returns the operation results in $v0 (and in $v1 for Hi result in mul or div). All these *_logic uses only native logic operation of MIPS. They implement arithmetic operation using logic algorithm taught in CS47. 4. Write two procedure au_normal and au_logic which takes two integers and one operation code for +,-,* and / in $a0, $a1 and $a2. These two procedure returns results in $v0 and $v1 ($v1 contains the Hi value of the result from * or /). The main program (Label must be 'main') calls au_logic to determine the result and print the result as it gets back from the au_logic. This au_logic uses all the *_logic procedures implemented in #3. The main program also calls au_normal procedure to determine golden result and compare it with the result obtained from au_logic to determine pass or fail. It prints the result pass / fail. This au_normal uses all the *_normal procedure implemented in #2.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write an arithmetic unit and related self testing in mips
Reference No:- TGS01244119

Expected delivery within 24 Hours