Stored Program Architecture

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

The CPU The Central Presentation Unit What is the CPU?
Machine cycle.
Computer Architecture and the Fetch-Execute Cycle
Machine & Assembly Language. Machine Language  Computer languages cannot be read directly by the computer – they are not in binary.  All commands need.
1 A Balanced Introduction to Computer Science, 2/E David Reed, Creighton University ©2008 Pearson Prentice Hall ISBN Chapter 14 Inside.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
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.
Elements of the Computer (How a processor works)
Computer Organization and Assembly language
Processor Types And Instruction Sets Barak Perelman CS147 Prof. Lee.
The CPU The Central Presentation Unit Language Levels Fetch execute cycle Processor speed.
CPU Registers PC Arith Logic Unit Bus Interface I/O Bridge System bus Memory bus Main Memory USB Controller Graphics Adapter Disk Controller I/O Bus Mouse.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
Computer Structure.
Intro to CS Chapt 2 Data Manipualtion 1 Data Manipulation How is data manipulated inside a computer? –How is data input? –How is it stored? –How is it.
CS 1308 Computer Literacy and the Internet Computer Systems Organization.
Levels of Architecture & Language CHAPTER 1 © copyright Bobby Hoggard / material may not be redistributed without permission.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Introduction to Computing Systems from bits & gates to C & beyond The Von Neumann Model Basic components Instruction processing.
Von Neumann Machine Objectives: Explain Von Neumann architecture:  Memory –Organization –Decoding memory addresses, MAR & MDR  ALU and Control Unit –Executing.
CPU How It Works. 2 Generic Block Diagram CPU MemoryInputOutput Address Bus Data Bus.
The Central Processing Unit (CPU) and the Machine Cycle.
Chapter 5 Computing Components. 5-2 Chapter Goals List the components and their function in a von Neumann machine Describe the fetch-decode-execute cycle.
General Concepts of Computer Organization Overview of Microcomputer.
Computer Architecture Memory, Math and Logic. Basic Building Blocks Seen: – Memory – Logic & Math.
1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization.
Computer Science 101 Computer Systems Organization ALU, Control Unit, Instruction Set.
CMSC 150 PROGRAM EXECUTION CS 150: Wed 1 Feb 2012.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer Structure & Architecture 7b - CPU & Buses.
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
CS 1308 Computer Literacy and the Internet. Objectives In this chapter, you will learn about:  The components of a computer system  Putting all the.
Dale & Lewis Chapter 5 Computing components
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Computer operation is of how the different parts of a computer system work together to perform a task.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
Software Design and Development Computer Architecture Computing Science.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Chapter 14 Inside the Computer - the von Neumann Architecture
Control Unit Lecture 6.
Edexcel GCSE Computer Science Topic 15 - The Processor (CPU)
Inside the Computer The von Neumann Architecture
von Neumann Architecture CPU
Microprocessor and Assembly Language
Computer Architecture
The Processor and Machine Language
Functional Units.
von Neumann Architecture CPU
MARIE: An Introduction to a Simple Computer
GCSE OCR 1 The CPU Computer Science J276 Unit 1
Program Execution.
The Von Neumann Machine
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.
Instruction execution and ALU
OCR GCSE (9-1) Computer Science (J276)
Computer Architecture
Presentation transcript:

Stored Program Architecture Lecture 9

The von-Neumann Architecture Stored Program Concept - Storing instructions in memory along with data Memory Processor - CPU Input/Output devices

I/O input/output devices enable the user to interact with the computer input devices – keyboards, mice, scanners, … output devices – display screens, speakers, printers, …

Main Memory Main memory is a large number of memory locations. Each location is accessible via an address. It holds: Data Active programs - instructions for the CPU. Storing the instructions for the cpu in memory called the stored program concept (Von Neumann) . Program is stored in the machine language (binary) that corresponds to the circuitry of that processor.

Memory Programmer writes a program in a high level language that is easy to understand, like Java, C++ or JavaScript. Program is translated into machine language by a compiler or interpreter. The binary code is stored in the main memory along with the data.

CPU – Central Processing Unit ALU - arithmetic/logic unit circuitry for arithmetic and logic operations (e.g. addition, comparison, OR) CU - control unit fetches instructions from memory decodes the instruction executes the instruction registers – memory locations built into the CPU (to provide fast access) hold data for immediate use by ALU

Bus Just like it sounds. What does a bus do? Buses are circuits over which data travels Buses connect parts of the the CPU and main memory Takes time to get data from main memory, so it’s slower than registers.

CPU CPU acts as the brain of the computer it fetches data and instructions from memory it executes the instructions it stores results back to memory (Be patient for a few slides)

Control Unit The control unit fetches instructions from memory decodes the instruction executes the instruction The control unit has two important registers: PC- program counter - contains the address in main memory of the next instruction IR- instruction register - holds the instruction that is currently executing

Machine cycle The control unit fetches from main memory the instruction whose address is in the program counter. The instruction is stored in the instruction register and the program counter is incremented to the next instruction address. decodes the instruction to understand what needs to be done. executes the instruction by performing the operation on the data.

The above three steps are repeated until the end of the stored program. A computer can execute millions of instructions per second.

Example S’pose the control unit is executing an instruction to add two numbers: obtain first value from memory and store in a register obtain second value from memory and store in a register use the addition circuitry to add the two numbers in the registers and place the result in a register store the result in main memory

HW Please read chap 14 and bring book to class for lab 9 The next few slides are preparation for the lab. They are a continuation of the Addition Example

Assembly language 0: LOAD R0 5 // R0 = M[5] 1: LOAD R1 6 // R1 = M[6] 2: ADD R2 R0 R1 // R2 = R0 + R1 3: STORE 7 R2 // M[7] = R2 4: HALT // HALT 5: 9 // 9 data value 6: 1 // 1 data value 7: 0 // will hold result

Machine Language (no spaces) 0: 100000010 00 00101 // R0 = M[5] 1: 100000010 01 00110 // R1 = M[6] 2: 1010000100 10 00 01 // R2 = R0 + R1 3: 100000100 10 00111 // M[7] = R2 4: 1111111111111111 // HALT 5: 0000000000001001 // 9 data value 6: 0000000000000001 // 1 data value 7: 0000000000000000 // will hold result

Simulator Machine Language 1st two instructions – select ALU operation and registers to operate on next 3 instructions – control flow of data. Store should be location 5. last instruction – marks the end of instruction sequence

Program Execution example: machine language program for adding two numbers in memory program execution: program counter is initialized: PC = 0 instruction at memory location 0 is fetched, PC is incremented to 1 instruction is decoded and CPU cycle is executed: load contents of memory location 5 into RO next instruction is fetched at location 1, PC is incremented to 2 instruction is decoded and CPU cycle is executed: load contents of memory location 6 into R1 next instruction at memory location 2 is fetched, PC is incremented to 3 instruction is decoded and CPU cycle is executed: add contents of R0 and R1, store result in R2 next instruction at location 3 is fetched, PC is incremented to 4 instruction is decoded and CPU cycle is executed: copy contents of R2 into memory location 7 next instruction at location 4 is fetched, PC is incremented to 5 instruction is decoded and CPU cycle is executed: halt instruction  program ends