MARIE: An Introduction to a Simple Computer

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

Machine cycle.
Chapter 1. Basic Structure of Computers
Stored Program Architecture
Adding the Jump Instruction
CPU Review and Programming Models CT101 – Computing Systems.
The Microprocessor and its Architecture
 Suppose for a moment that you were asked to perform a task and were given the following list of instructions to perform:
IT253: Computer Organization Lecture 6: Assembly Language and MIPS: Programming Tonga Institute of Higher Education.
1 COMS 361 Computer Organization Title: Instructions Date: 9/28/2004 Lecture Number: 10.
CPS 101 Introduction to Computational Science Wensheng Shen Department of Computational Science SUNY Brockport.
1 A Balanced Introduction to Computer Science, 2/E David Reed, Creighton University ©2008 Pearson Prentice Hall ISBN Chapter 14 Inside.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Stored Program Concept: The Hardware View
LAB 9 Simulator Chap 14 REED. Datapath Simulator accompanying the text is a datapath simulator a.k.a. the Knob & Switch Computer developed by Grant Braught.
CEG 320/520: Computer Organization and Assembly Language Programming1 CEG 320/520 Computer Organization and Assembly Language Programming.
Computer Organization
Lecture 3. Diff b/w RAM and Registers Registers are used to hold data immediately applicable to the operation at hand Registers are used to hold data.
1 4.2 MARIE This is the MARIE architecture shown graphically.
ECP2036 Microprocessor and Interfacing Registers Control & Status Registers Program Counter User-Visible Registers Instruction Register... General-Purpose.
ITEC 352 Lecture 12 ISA(3). Review Buses Memory ALU Registers Process of compiling.
Chapter 4 MARIE: An Introduction to a Simple Computer.
Lecture 15 Today’s lecture MARIE programming Assembler
Assembly Language A Brief Introduction. Unit Learning Goals CPU architecture. Basic Assembler Commands High level Programming  Assembler  Machine Language.
The Central Processing Unit (CPU) and the Machine Cycle.
A Simple Computer Architecture Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
Lecture 14 Today’s topics MARIE Architecture Registers Buses
MARIE: An Introduction to a Simple Computer. 2 MARIE Our model computer, the Machine Architecture that is Really Intuitive and Easy, MARIE, was designed.
Chapter 7 Low-Level Programming Languages (slides modified by Erin Chambers)
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
COMPILERS CLASS 22/7,23/7. Introduction Compiler: A Compiler is a program that can read a program in one language (Source) and translate it into an equivalent.
1.4 Representation of data in computer systems Instructions.
Dale & Lewis Chapter 5 Computing components
1 The Instruction Set Architecture September 27 th, 2007 By: Corbin Johnson CS 146.
Lecture Overview Introduction Instruction processing A simple program
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Representation of Data - Instructions Start of the lesson: Open this PowerPoint from the A451 page – Representation of Data/ Instructions How confident.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
Chapter 14 Inside the Computer - the von Neumann Architecture
OCR GCSE Computer Science Teaching and Learning Resources
Today’s Agenda Exam 2 Part 2 (11:15am-12:30pm)
Machine and Assembly Language
Control Unit Lecture 6.
Computer Science 210 Computer Organization
Lesson Objectives A note about notes: Aims
A Closer Look at Instruction Set Architectures
von Neumann Architecture CPU
Computer Organization & Assembly language
System Architecture 1 Chapter 2.
The fetch-execute cycle
Figure 8.1 Architecture of a Simple Computer System.
Computer Organization and ASSEMBLY LANGUAGE
CSCI206 - Computer Organization & Programming
MARIE: An Introduction to a Simple Computer
Figure 8.1 Architecture of a Simple Computer System.
Systems Architecture I (CS ) Lecture 2: A Simplified Computer
ECEG-3202 Computer Architecture and Organization
von Neumann Architecture CPU
Unit 12 CPU Design & Programming
MARIE: An Introduction to a Simple Computer
A Discussion on Assemblers
ECE 352 Digital System Fundamentals
The Von Neumann Machine
Computer Architecture Assembly Language
Computer Architecture
COMPUTER ARCHITECTURE
Algoritmos y Programacion
Presentation transcript:

MARIE: An Introduction to a Simple Computer

Lecture Overview A simple program A discussion on assemblers Extending our ISA

What does this program do? A Simple program A simple program The figure below shows a program written in assembly language for MARIE What does this program do?

A Simple program A simple program This program simply adds to numbers and stores the result in the main memory. It loads the value stored at the location address 10416 into AC (the value is 002316 = 3510), ), (2*161+3*160) or 0000 0000 0010 0011 =35) It adds this value to the value stored at the location address 10516 (the value is FFE916 = (-23)10), (1111 1111 1110 1001)=0000 0000 0001 0110+1 =-23) Stores the sum into the location address 10616. So what will be stored in the location address 10616? Now let us discover what happens during each “Fetch, decode, execute” cycle.

Lecture Overview A simple program A discussion on assemblers Extending our ISA

An Assembler is used to translate assembly language into machine code A discussion on Assemblers What do Assemblers do Assembly language can be understood by the programmer but not the computer! Assembly language must be converted into Machine Codes (binary codes) before being executed or even stored in the main memory. An Assembler is used to translate assembly language into machine code It reads a source file (assembly program) and convert it to an object file (Machine code) Assembler VS Compiler An assembler translates each mnemonic instruction (written in assembly) to exactly one machine code. With compilers, this is not usually the case

Remember - Registers and Buses MARIE Remember - Registers and Buses The Data path in MARIE is shown in this figure Note that a data word (that is an instruction) in the main memory travels a relatively long path before achieving the IR!

Remember - The Fetch-Decode-Execute cycle Instruction processing Remember - The Fetch-Decode-Execute cycle MARIE, like any other computer architecture, follow the basic machine cycle: the fetch, decode, and execute cycle Fetch Decode Execute

Remember - The Von Neumann model Chapter 1: Introduction Remember - The Von Neumann model Fetch PC indicates the iteration number CU fill the instruction register Instruction 1 Instruction 2 Instruction 3 Instruction 3 Data 1 Data 2 Instruction 4 … … 2. Decode what ALU should do (add, multiply, …)? Fill registers with needed data … Instruction N

Remember - The Von Neumann model 3. Execute Execute the instruction Place the results in registers or memory Instruction 1 Instruction 2 Instruction 3 Instruction 3 Data 1 Data 2 Instruction 4 Result … … … Instruction N

The Instruction Set Architecture MARIE The Instruction Set Architecture The fundamental MARIE instructions are:

A discussion on Assemblers What do Assemblers do Going back to our simple program, what really happens inside the CPU during each fetch, decode, execute cycle? Load 104:

A discussion on Assemblers What do Assemblers do Add 105: Store 106:

A discussion on Assemblers What do Assemblers do An assembler directive is an instruction that is not supposed to be translated into machine code In assembly language we can also use labels in order to clarify the program Example: base 16 is the default base when writing assembly program for MARIE, to specify the used base we can use “constant directives” such as DEC (decimal) or HEX (Hexadecimal)