Phillipa Gill phillipa@cs.toronto.edu SCI 199 Y Tutorial Sept. 14, 2009 Phillipa Gill phillipa@cs.toronto.edu.

Slides:



Advertisements
Similar presentations
Computer Architecture and the Fetch-Execute Cycle
Advertisements

Instruction Set Architecture Classification According to the type of internal storage in a processor the basic types are Stack Accumulator General Purpose.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 1: Bits, bytes and a simple processor dr.ir. A.C. Verschueren.
Project Testing; Processor Examples. Project Testing --thorough, efficient, hierarchical --done by “independent tester” --well-documented, repeatable.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
Elements of the Computer (How a processor works)
1 CS Programming Languages Random Access Machines Jeremy R. Johnson.
Computer Structure.
Machine level architecture Computer Architecture Basic units of a Simple Computer.
Computer Architecture and the Fetch-Execute Cycle
Computer Architecture and the Fetch-Execute Cycle
Computer Organization - 1. INPUT PROCESS OUTPUT List different input devices Compare the use of voice recognition as opposed to the entry of data via.
The structure COMPUTER ARCHITECTURE – The elementary educational computer.
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
CS 111 – Sept. 15 Chapter 2 – Manipulating data by performing instructions “What is going on in the CPU?” Commitment: –Please read through section 2.3.
Indira Gandhi National Open University presents. A Video Lecture Course: Computer Platforms.
Computer Architecture CSE 3322 Lecture 2 NO CLASS MON Sept 1 Course WEB SITE crystal.uta.edu/~jpatters.
Computer Architecture CSE 3322 Lecture 3 Assignment: 2.4.1, 2.4.4, 2.6.1, , Due 2/3/09 Read 2.8.
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
The Little-Man Computer Damian Gordon. The Little-Man Computer Most computer architectures conform to the so-called von Neuman Architecture. This means.
An Adder A Subtractor. A and B are the inputs of the adder/ subtractor R is the output of the adder/ subtractor F is the control to tell it to add or.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Von Neumann Architecture Stored-Program Architecture.
Instruction Memory value Description ADD1xx Add the value stored at memory address xx to the value in the accumulator register SUB2xx Subtract the value.
Computer Science 210 Computer Organization Machine Language Instructions: Control.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
Stored Program Concept Learning Objectives Learn the meaning of the stored program concept The processor and its components The fetch-decode-execute and.
Computers’ Basic Organization
MIPS Instruction Set Advantages
Control Unit Lecture 6.
Stored program concept
Computer Systems – Memory & the 3 box Model
Chapter 4 The Von Neumann Model
Lesson Objectives A note about notes: Aims
Chapter 4 The Von Neumann Model
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
Instructions at the Lowest Level
System Architecture 1 Chapter 2.
The Processor and Machine Language
Chapter 4 The Von Neumann Model
Functional Units.
Systems Architecture I (CS ) Lecture 1: Random Access Machines
Computer Science 210 Computer Organization
Introduction to Computer Engineering
Computer Architecture and the Fetch-Execute Cycle
Sequencing, Selection, and Loops in Machine Language
Computer Architecture
Chapter 4 The Von Neumann Model
Black Boxes and Abstraction or A quick run through how computers work
The Stored Program Computer
GCSE OCR 1 The CPU Computer Science J276 Unit 1
Computer Concept and Practice
CPU Structure CPU must:
CS501 Advanced Computer Architecture
A Top-Level View Of Computer Function And Interconnection
Information Representation: Machine Instructions
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
OCR GCSE (9-1) Computer Science (J276)
Computer Architecture Assembly Language
Introduction to Computer Engineering
Introduction to Computer Engineering
Systems Architecture I (CS ) Lecture 1: Random Access Machines
CPSC 171 Introduction to Computer Science
Introduction to Computer Engineering
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
Presentation transcript:

Phillipa Gill phillipa@cs.toronto.edu SCI 199 Y Tutorial Sept. 14, 2009 Phillipa Gill phillipa@cs.toronto.edu

Von Neumann Architecture OS Programs Data Memory Control Unit Arithmetic Logic Unit Accumulator Input Output

General Purpose Machines As opposed to fixed purpose E.g., your calculator is not a word processor or gaming console Machine can be used to solve problems using programs stored in memory

Example Program: Problem Input: a value X, a list A with length N Output: the position in the list where X resides if X is in the list. 0 otherwise. Example: A = 2,4,6,5,10 if X is 6 this program will return 3

Example Program: Code ANSWER=0 I=1 WHILE ANSWER = 0 and I <= N IF X=A(I) then ANSWER = I I=I+1 ENDWHILE OUTPUT ANSWER

Example Program: Memory 1000 X 1001 N 1002 I 1003 ANSWER 2000 A 2001 … 2000 + N-1

Example Program: Memory (2) Write-constant-into-memory 0,1003 % set ANSWER=0 Write-constant-into-memory 1,1002 % set I=1 Get-memory 1001 %put N into accumulator Subtract-memory 1002 % compute N-I Conditional-jump-on-negative 16 %if N-I was negative Get-memory 2000 % get value of A(I) Subtract-memory 1000 % compute A(I) – X Conditional-jump-on-zero 14 % if A(I)-X=0 Get-memory 6 % load word 6 into memory Add-constant 1 % increment address in word 6 Get-memory 1002 % load I

Example Program: Memory (3) Get-memory 6 % load word 6 into memory Add-constant 1 % increment address in word 6 Get-memory 1002 % load I Add-constant 1 % increment I Jump 6 % go back to start of loop Get-memory 1002 % get value of I Put-memory 1003 %put this value into 1003 (answer) Output 1003 % output answer

Issues Code can modify itself! The above code changes the statement: Get-memory 6 % load word 6 into memory Add-constant 1 % increment address in word 6 The above code changes the statement: Get-memory 2000 into Get-memory 2001 Why is this a bad idea? Recent developments have tried to fix this