Download presentation
Presentation is loading. Please wait.
Published byLogan Ball Modified over 9 years ago
1
CS334: Number Systems&& Mars simulator Lab 1_2
2
Ins.Ebtesam AL-Etowi Quizzes/Participation/Absence 5% Logisim/MIPS Programming5% CPU Design Project10% Email: ebtesam.jaber@hotmail.com Website: http://ebtesamal-etowi.weebly.com cs334
3
Ins.Ebtesam AL-Etowi Contents: Exercises && HW solution. Mars simulator.
4
Ins.Ebtesam AL-Etowi Perform the binary subtraction. Did signed overflow occur? determined whether or not overflow occurred. 11101000 -00010011 Perform the binary addition. Did signed overflow occur? determined whether or not overflow occurred. 01101110 00011010 Exercises 10001000 111010101 11101101 + discarde solution You are given the following two numbers in two ’ s complement representation:
5
solution Ins.Ebtesam AL-Etowi H.W solution
6
simulator Mars 4.2 Ins.Ebtesam AL-Etowi Download the Mars simulator from http://www.cs.missouristate.edu/MARS/ Step 1: Step 2: Launch the Mars simulator. Step 3: Click on the Edit tab on the top left (in this pane, you'll see your assembly language program. Well, after you've created it). Step 4: Go to File and click on New, to start a new program. Step 5: Let's start with a simple program.
7
Ins.Ebtesam AL-Etowi
8
MIPS assembly language Ins.Ebtesam AL-Etowi Registers 32 general-purpose registers register preceded by $ in assembly language instruction Program Structure data declaration section followed by program code section
9
Cont..))MIPS assembly language Ins.Ebtesam AL-Etowi Data Declarations placed in section of program identified with assembler directive.data Code placed in section of text identified with assembler directive.text contains program code (instructions).
10
Cont..))MIPS assembly language Ins.Ebtesam AL-Etowi Comments anything following # on a line # This comment Data Declarations format for declarations: name: storage_type value(s( example var1:.word 3 # create a single integer variable with initial value 3
11
Ins.Ebtesam AL-Etowi Arithmetic Instructions most use 3 operands. all operands are registers; no RAM or indirect addressing. operand size is word (4 bytes). Cont..))MIPS assembly language
12
General Example Ins.Ebtesam AL-Etowi
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.