Dale & Lewis Chapter 5 Computing components. Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction.

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

The CPU The Central Presentation Unit What is the CPU?
The Fetch – Execute Cycle
Microprocessors.
Central Processing Unit
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.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
LMC Little Moron Computer
Memory - Registers Instruction Sets
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
The central processing unit and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
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.
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.
Chapter 4 The Von Neumann Model
Chapter 8: The Very Simple Computer
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
The structure COMPUTER ARCHITECTURE – The elementary educational computer.
Computer Organization CSC 405 (VSC) Very Simple Computer.
Computer Architecture Memory, Math and Logic. Basic Building Blocks Seen: – Memory – Logic & Math.
Computer Science 101 Computer Systems Organization ALU, Control Unit, Instruction Set.
DH2T 34 – HNC Computer Architecture 1 Lecture 14 The Fetch-Decode-Execute Cycle [1]. © C Nyssen/Aberdeen College 2003 All images © C Nyssen/Aberdeen College.
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
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
Dale & Lewis Chapter 5 Computing components
Designing a CPU –Reading a programs instruction from memory –Decoding the instruction –Executing the instruction –Transferring Data to/From memory / IO.
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.
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.
Instruction Memory value Description ADD1xx Add the value stored at memory address xx to the value in the accumulator register SUB2xx Subtract the value.
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;
SAP1 (Simple-As-Possible) Computer
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Gunjeet Kaur Dronacharya Group of institutions
Chapter 4 The Von Neumann Model
CHAPTER 6: The Little Man Computer
Computer Science 210 Computer Organization
Lesson Objectives A note about notes: Aims
Lecture on Microcomputer
Chapter 4 The Von Neumann Model
Computer Architecture
Chapter 4 The Von Neumann Model
Computer Science 210 Computer Organization
The Processor and Machine Language
The Basic Organization of Computers T.Jeya M.Sc., M.Phil Assistant Professor, Department of CS, SAC Women’s College. Cumbum. Tamilnadu.
Computer Science 210 Computer Organization
CS149D Elements of Computer Science
Making Programming Friendlier
Programmer’s View of the EAGLE
The Little Man Computer
THE FETCH-EXECUTE CYCLE.
Computer Architecture
Chapter 4 The Von Neumann Model
The Stored Program Computer
GCSE OCR 1 The CPU Computer Science J276 Unit 1
Program Execution.
Basic components Instruction processing
A Level Computer Science Topic 5: Computer Architecture and Assembly
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
Chapter 4 The Von Neumann Model
Little Man Computer.
Presentation transcript:

Dale & Lewis Chapter 5 Computing components

Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction register (IR) – 8 bits (op code + address) −Memory Address Register (MAR) – 5 bits  Main Memory −Memory Data Register (MDR) – 8 bits (byte addressable) −Accumulator (A or Acc) – 8 bits

Instructions Instruction format: 3-bit op code, 5-bit address Instructions and their op codes op codeInstruction 000 HALT (HLT) 001 LOAD (LDA) 010 STORE (STA) 011 ADD (ADD) 100 SUBTRACT (SUB) 101 BRANCH (BR) 110 BRANCH ON ZERO (BRZ) 111 BRANCH ON POSITIVE (BRP)

Types of instructions Data movement −Move data between memory and CPU −Move data between different memory locations −Input, output Arithmetic and logic operations −Integer arithmetic −Comparing two quantities −Shifting or rotating bits in a quantity −Testing, comparing and converting bits Program control −Starting a program −Halting a program −Skipping to another location −Testing data to decide whether to skip to another instruction

Instructions LOAD instruction (LDA) −PC  MAR −MDR  IR −IR [address]  MAR −MDR  A −PC + 1  PC ADD instruction (ADD) −PC  MAR −MDR  IR −IR [address]  MAR −A + MDR  A −PC + 1  PC STORE instruction (STA) −PC  MAR −MDR  IR −A  MDR −IR [address]  MAR −PC + 1  PC HALT instruction (HLT) −PC  MAR −MDR  IR −stop FETCH – DECODE – GET DATA – EXECUTE

FETCH Address of next instruction is transferred from PC to MAR and the instruction is located in the memory

FETCH Instruction is copied from memory to the MDR

DECODE Decode the instruction

EXECUTE Execute the instruction – control unit sends signals to appropriate devices to carry out execution of the instruction

A small computer program LOADA ADDB STOREC HLT ADATA BDATA CDATA Program Assembly language Main memory Address Contents op code Data

etc… AddressContents PC IR Acc MAR MDR CPU

etc… AddressContents PC IR Acc MAR MDR CPU The program starts

etc… AddressContents PC IR Acc MAR MDR CPU Fetch 1 st instruction

etc… AddressContents PC IR Acc MAR MDR CPU Decode 1 st instruction: LOAD A

etc… AddressContents PC IR Acc MAR MDR CPU Execute1 st instruction: LOAD A

etc… AddressContents PC IR Acc MAR MDR CPU Advance PC

etc… AddressContents PC IR Acc MAR MDR CPU Fetch 2 nd instruction

etc… AddressContents PC IR Acc MAR MDR CPU Decode 2 nd instruction: ADD B

etc… AddressContents PC IR Acc MAR MDR CPU Execute 2 nd instruction: ADD B

etc… AddressContents PC IR Acc MAR MDR CPU Advance PC, etc…