Instruction execution and ALU

Slides:



Advertisements
Similar presentations
The Fetch – Execute Cycle
Advertisements

Machine cycle.
PIPELINE AND VECTOR PROCESSING
Central Processing Unit
Arithmetic Logic Unit (ALU)
2.3) Example of program execution 1. instruction  B25 8 Op-code B means to change the value of the program counter if the contents of the indicated register.
The CPU. Parts of the CPU Control Unit Arithmetic & Logic Unit Registers.
Computer Systems. Computer System Components Computer Networks.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
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.
Basic Computer Organization, CPU L1 Prof. Sin-Min Lee Department of Computer Science.
Dale & Lewis Chapter 5 Computing components. Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction.
1 Sec (2.3) Program Execution. 2 In the CPU we have CU and ALU, in CU there are two special purpose registers: 1. Instruction Register 2. Program Counter.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Basic Operational Concepts of a Computer
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.
Computer Architecture and the Fetch-Execute Cycle
Computer Architecture and the Fetch-Execute Cycle
CPU Design. Introduction – The CPU must perform three main tasks: Communication with memory – Fetching Instructions – Fetching and storing data Interpretation.
The Central Processing Unit (CPU) and the Machine Cycle.
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.
Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute.
1 Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can be specified with register transfer statements.
Computer Science 101 Computer Systems Organization ALU, Control Unit, Instruction Set.
Fetch-execute cycle.
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.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
1.4 Representation of data in computer systems Instructions.
Dale & Lewis Chapter 5 Computing components
More on Pipelining 1 CSE 2312 Computer Organization and Assembly Language Programming Vassilis Athitsos University of Texas at Arlington.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
More on Pipelining 1 CSE 2312 Computer Organization and Assembly Language Programming Vassilis Athitsos University of Texas at Arlington.
CMSC 104, Lecture 061 Stored Programs A look at how programs are executed.
Designing a CPU –Reading a programs instruction from memory –Decoding the instruction –Executing the instruction –Transferring Data to/From memory / IO.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
Central Processing Unit Decode Cycle. Central Processing Unit Current Instruction Register (CIR) I1 The fetch cycle has transferred an instruction from.
CPUz 4 n00bz.
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.
Chapter 5 Computer Organization TIT 304/TCS 303. Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can.
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;
ECE 4110–5110 Digital System Design
Lecture 13 - Introduction to the Central Processing Unit (CPU)
CPU Organisation & Operation
Five Execution Steps Instruction Fetch
Data Representation – Instructions
The fetch-execute cycle
The Processor and Machine Language
Functional Units.
CS149D Elements of Computer Science
Computer Organization and ASSEMBLY LANGUAGE
Intel 8080 Processor The 8080 was an 8-bit processor
Figure 8.1 Architecture of a Simple Computer System.
CPU Key Revision Points.
The Little Man Computer
THE FETCH-EXECUTE CYCLE.
GCSE OCR 1 The CPU Computer Science J276 Unit 1
Program Execution.
The Von Neumann Machine
Computer Concept and Practice
CPU Structure and Function
THE FETCH-EXECUTE CYCLE.
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.
Computer Architecture
CS 111 – Sept. 16 Machine language examples Instruction execution
COMPUTER ARCHITECTURE
Sec (2.3) Program Execution.
Little Man Computer.
Presentation transcript:

Instruction execution and ALU Dr. Wurood Albayati

CPU Organisation & Operation Begin Are there any instruction wating execution ? Fetch the next instruction Execute the instruction interrupt requiring service? Transfer control to interrupt handling program Fetch Cycle Execute Cycle Yes No

Example : A = B + C LOAD R2, B Copy the contents of memory location designated by B into Register 2 ADD R2, C Add the contents of the memory location designated by C to the contents of Register 2 and put the result back into Register 2 STORE R2, A Copy the contents of Register 2 into the memory location designated by A. Each of these assembly instructions needs to be encoded into binary for execution by (CPU) Instruction to be represented specific Instruction format We can represent the above Assembly instruction using 16 bits word as below.

To execute the program, instructions + data  main memory To execute the program, instructions + data  main memory. We’ll place our 3-instruction program in memory starting at address 080H and we’ll place the variables A,B & C at memory words 200H, 201H, and 202H ---- prior to program execution. Memory Address Memory Assembly Instruction 080    1A01 LOAD R2, [201H] 081 3A02 ADD R2, [202H] 082 2A00 STORE R2, [200H] … 200 00 A = 0 201 09 B = 9 202 06 C = 6 Fetch-Execute Cycle Fetch the Instruction Increment the Program Counter Decode the Instruction Fetch the Operands Perform the Operation Store the results Repeat forever

[080] Load R2,[201] 1A01 080 081 09 Read Load Read [201]

[081] ADD R2,[202] 15 06 ADD 9 1A01 9 3A02 081 Read Load Input2, 202 082 09 06 Read Load Input2, 202 ADD LoaD R2, iNPUT1