Assemble proj-auto-test.asm and execute. Make sure to turn on 'Assembles all files in directory' and 'Initialize program counter to global main if defined' option in MARS tool.
Report of Arithmetic Implemented By MIPS
XXX-X-XXXX-XXXX-X/XX/$XX.00 ©20XX IEEE
Abstract—This cs47 report is about by using MIPS language and logical procedures, we make the calculation to solve the operations. This report included diagrams for requirement and design, code snippet, containing objective and all detailed screenshot to explain how to get the process for this project.
Introduction (Heading 1)
This project is using MARS simulator environment which is an assembler of MIPS to perform the calculation of basic mathematic operation. It is basic on the MPIS logic operation. The goal of this project is understanding how digital logic can be used to implement a basic calculator through logical operators.
This project are operated by the following steps:
1.Open MARS and implement the modules to design the mathematics operation
2.Complete the procedures and verify each other files
3.Run and compare the results to get correct conclusion
The goal of this project is understand how digital logic can be used to implement a basic calculator through logical operators.
Prapareation and set up
Praperation: software and file
Download MARS simulator and the file from canvas and unzip the files to make sure everything be all set.
We use the MARS 4.5 software version and the Link is: http://courses.missouristate.edu/KenVollmar/mars/
The files download from canvas named CS47ProjectI.zip.
After unzip CS47ProjectI.zip, there are six files by following:
This has all important macros required for test.
This need to be implemented for all logical arithmetic procedures.
3.cs47_proj_alu_normal.asm
This need to be implemented for all normal arithmetic procedures.
4.cs47_proj_macro.asm
This includes the macro which required during calculating
5.cs47_proj_procs.asm
This includes all print procedures.
6.proj-auto-text.asm
This used to text if the arithmetic modules get correct.
Fig1: the files after unzipping
Open six files by MARS
1. open Mars and click File to implement these six files
Fig2: to open files
Fig3: find the files and open
Adjustment MARS enveriment
Fig4: Turn on them to show the details and to make sure the files can be successfully executed.
aAAAAA
When everything is ready, the much harder part need to be done which is to see the requirement in every file. Then follow the requirement to write the code.
Fig: the symbol of each Boolean algebraic operation.
In cs47_proj_alu_logical.asm, all logical operations are put in there to calculate the mathematical operations in logical. Such as XNOR, NAND, NOT, NOR, AND and OR.
Fig: there are 3 kinds of arguments (a0, a1, a2) and 2 kinds of returns(v0,v1).
In cs47_proj_alu_normal.asm, all normal arithmetic operations are included in there, such as ADD, SUBTRACT, DIVIDE and MULTIPLY.
Fig: there are 3 kinds of arguments (a0, a1, a2) and 2 kinds of returns(v0,v1)Which is the same as cs47_proj_alu_logical.asm.
Then explain the mean of each register.
1.Register $a0: the first operand in calculation
2.Register $a1: the second operand in calculation
3.Register $a2: the operator in calculation. which are symbols represented to ‘+’, ‘-’, ‘*’, ‘/’.
a. when $a2 represented to ‘+’, the procedure need to jump the addition section. Cause add means the sum of two operations.
b. when $a2 represented to ‘-’, the procedure need to jump the subtraction section. Cause subtract means the difference of two operations.
c. when $a2 represented to ‘*’, the procedure needs to jump the multiplication section. Cause subtract means the product of two operations.
d. when $a2 represented to ‘/’, the procedure needs to jump the division section. Cause subtract means the quotient of two operations.
4.Register $v0: a storage, to store the result from addition and subtraction.
5.Register $v1: different multiplication has different means. When multiplication, it contains hi; when division, it contains remainder.
Fig: implementation of cs47_proj_alu_normal.asm
Next, back to logical.asm, it was the logical arithmetic procedure. It calculates every mathematical procedure by logical operation. Also, it needs the basic logical procedure which is similar to the normal.asm.
Consider restoring the results that other register cannot change except $v0 and $v1:
Also, the same operation should be done when we want to do more. Therefore, shift $sp back to the place that it stay before.
Now explain every procedure during calculation.
For example: ADD
In this method, is the sum of two registers for $a0 and $a1. $a2 is the operator on the calculation: ‘+’.
Fig: the truth table and basic identifies
Write begain there
Transl. J. Magn. Japan, vol. 2, pp. 740–741, August 1987 [Digests 9th Annual Conf. Magnetics Japan, p. 301, 1982].
M. Young, The Technical Writer’s Handbook. Mill Valley, CA: University Science, 1989.
We suggest that you use a text box to insert a graphic (which is ideally a 300 dpi TIFF or EPS file, with all fonts embedded) because, in an MSW document, this method is somewhat more stable than directly inserting a picture.
To have non-visible rules on your frame, use the MSWord “Format” pull-down menu, select Text Box > Colors and Lines to choose No Fill and No Line.