Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit

Slides:



Advertisements
Similar presentations
The CPU The Central Presentation Unit What is the CPU?
Advertisements

The Fetch – Execute Cycle
Machine cycle.
Computer Architecture and the Fetch-Execute Cycle
Arithmetic Logic Unit (ALU)
Microprocessor.  The CPU of Microcomputer is called microprocessor.  It is a CPU on a single chip (microchip).  It is called brain or heart of the.
Processor Function Topic 3.
The CPU. Parts of the CPU Control Unit Arithmetic & Logic Unit Registers.
The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
Memory - Registers Instruction Sets
Stored Program Concept: The Hardware View
The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
Elements of the Computer (How a processor works)
Dale & Lewis Chapter 5 Computing components. Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction.
Overview von Neumann Model Components of a Computer Some Computer Organization Models The Computer Bus An Example Organization: The LC-3.
The Computer Processor
Lecture 13 - Introduction to the Central Processing Unit (CPU)
CPU Fetch/Execute Cycle
Computer Science 210 Computer Organization The Instruction Execution Cycle.
A-Level Computing#BristolMet Session Objectives#5 MUST identify different buses and registers used in a CPU SHOULD describe the use of buses to send information.
SAP1 (Simple-As-Possible) Computer
Stack Stack Pointer A stack is a means of storing data that works on a ‘Last in first out’ (LIFO) basis. It reverses the order that data arrives and is.
Computer Architecture and the Fetch-Execute Cycle
Computer Architecture and the Fetch-Execute Cycle
The CPU Central Processing Unit. 2 Reminder - how it fits together processor (CPU) memory I/O devices bus.
Chapter 4 The Von Neumann Model
Computer Architecture Lecture 09 Fasih ur Rehman.
Chapter 8: The Very Simple Computer
Fetch-execute cycle.
Computer Systems - Registers. Starter… Discuss in pairs the definition of the following Control Unit Arithmetic and Logic Unit Registers Internal clock.
D75P 34 – HNC Computer Architecture
Computer Structure & Architecture 7b - CPU & Buses.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Machine 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.
Computer Systems Organization
System Unit Working of CPU. The CPU CPU The CPU CPU stands for central processing unit. it is brain of computer It is most important component of the.
Dale & Lewis Chapter 5 Computing components
Chapter 3: Computer Organization Fundamentals
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Computer Architecture Lecture 4 by Engineer A. Lecturer Aymen Hasan AlAwady 17/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
Structure and Role of a Processor
CPUz 4 n00bz.
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
Lec 4-2 Five operations of the machine cycle Fetch- fetch the next program instruction from memory. (PC+1); instruction to IR Decode- decode the instruction.
3.1.4 Hardware a. describe the function and purpose of the control unit, memory unit and ALU (arithmetic logic unit) as individual parts of a computer;
Computer Operation What basic hardware components are inside a personal computer?
OCR GCSE Computer Science Teaching and Learning Resources
Chapter 10: Computer systems (1)
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Lesson Objectives A note about notes: Aims
Chapter 4 The Von Neumann Model
Computer Architecture
Chapter 4 The Von Neumann Model
System Architecture 1 Chapter 2.
The Processor and Machine Language
Chapter 4 The Von Neumann Model
Functional Units.
Systems Architecture I (CS ) Lecture 2: A Simplified Computer
The Little Man Computer
THE FETCH-EXECUTE CYCLE.
Chapter 4 The Von Neumann Model
The Stored Program Computer
GCSE OCR 1 The CPU Computer Science J276 Unit 1
THE FETCH-EXECUTE CYCLE.
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.
Computer Architecture
Presentation transcript:

Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit Input/ Output Unit CPU Data Bus

Control Unit Arithmetic Logic Unit Memory Unit Input/ Output Unit MAR Instruction Decoder PC Arithmetic Logic Unit Memory Unit Input/ Output Unit IR

Memory Unit Arithmetic Logic Unit Control Unit Input/ Output Unit MAR Address Decoder MAR Main Store Arithmetic Logic Unit Control Unit Input/ Output Unit MDR

Arithmetic/Logic Unit Control Unit Main Memory Input/ Output Unit SR ACC

Model Computer MAR Instruction Decoder PC SR ACC IR MDR Address Decoder MAR Instruction Decoder PC SR ACC IR MDR

Registers A register is a single storage unit where data is stored temporary for a special purpose MAR holds the address of the memory location to be accessed MDR holds the data item read from or written to the specified memory location

Registers PC holds the address of the next instruction to be fetched from the main store IR holds the current instruction fetched from the main store while it is being decoded

Registers ACC holds the data item to be processed or the results of the most recent operations in the ALU SR holds a set of condition flags which describe the status of the most recent operation carried out by the ALU

Programming the CPU 00001 : Load the contents in memory location 11111 into the accumulator 00010 : Store the contents in the accumulator in the memory location 11101

Fetch Cycle PC is set to 00001 initially MAR is loaded with 00001 00111111 00001 01011110 1 00001 01000001

Fetch Cycle Address decoder selects the memory location 00001 2 00111111 00001 01011110 1 00001 01000001

Fetch Cycle The instruction in location 00001 is loaded into MDR 2 00111111 00001 01011110 1 00001 3 01000001 00111111

Fetch Cycle The instruction is then copied to IR 2 00111111 00001 01011110 1 00001 3 01000001 00111111 00111111 4

Execution Cycle PC is set to 00010 The instruction is decoded 00111111 00001 LDA 01011110 5 00010 01000001 00111111

Execution Cycle MAR is set to 11111 00111111 11111 LDA 01011110 6 5 00010 01000001 00111111

Execution Cycle The address decoder selects the location 11111 7 00111111 11111 LDA 01011110 6 5 00010 01000001 00111111

Execution Cycle The data in location 11111 is loaded into MDR 7 00111111 11111 LDA 01011110 6 5 00010 01000001 00111111 8 01000001

Execution Cycle The data is then copied to ACC 7 00111111 11111 LDA 01011110 6 5 00010 01000001 01000001 00111111 8 01000001 9

Fetch Cycle 00111111 00010 01011110 1 00010 01000001 01000001

Fetch Cycle 2 00111111 00010 01011110 1 00010 01000001 01000001

Fetch Cycle 2 00111111 00010 01011110 1 00010 3 01000001 01000001 01011110

Fetch Cycle 2 00111111 00010 01011110 1 00010 3 01000001 01000001 01011110 01011110 4

Execution Cycle 00111111 00010 STA 01011110 5 00011 01000001 01000001 00111110 00111110

Execution Cycle 00111111 11110 STA 01011110 6 5 00011 01000001 01000001 00111110 00111110

Execution Cycle MAR PC 7 00111111 11110 STA 01011110 6 5 00011 01000001 01000001 00111110 01000001

Execution Cycle 7 00111111 11110 STA 01011110 6 5 00011 01000001 01000001 00111110 01000001 8

Execution Cycle 8 00111111 11110 STA 01011110 6 5 00011 01000001 01000001 01000001 00111110 9 01000001 7

SMC Instruction Set LDA load accumulator with memory STA store accumulator in memory ADD add memory to accumulator SUB subtract memory from accumulator DEC decrement memory by 1 JMP unconditional jump BNE branch if negative STP stop

SMC Instruction Set LDA LoaD Accumulator with memory STA STore Accumulator in memory ADD ADD memory to accumulator SUB SUBtract memory from accumulator DEC DECrement memory by 1 JMP unconditional JuMP BNE Branch if NEgative STP SToP

Fetch/Execution Cycle Address in PC is sent to MAR Address decoder interpret the address in MAR and locate the specified memory location Control signal ( read ) is issued Contents in specified location are deposited into MDR Contents is then sent to IR Execute the instruction held in IR

Example program #1 00001 LDA 11111 00010 ADD 11110 00011 STA 11101 Address Instruction 1 00001 LDA 11111 00010 ADD 11110 00011 STA 11101 00100 STP 2 3 4

Example program #2 00001 LDA 11111 00010 SUB 11110 00011 BNE 00110 Address Instruction 1 00001 LDA 11111 00010 SUB 11110 00011 BNE 00110 00100 LDA 11111 00101 JMP 00111 00110 LDA 11110 00111 STA 11101 01000 STP 2 3 4 5 6 7 8