CPU performs the bulk of data processing operations CPU performs the bulk of data processing operations The CPU is made up of three parts. They are Control.

Slides:



Advertisements
Similar presentations
Microprocessors and Interfacing
Advertisements

Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
Major components of CPU
There are two types of addressing schemes:
ARITHMETIC LOGIC SHIFT UNIT
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.
C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title : Overview of Stack.
1BA3 G Lacey Lecture 51 Evaluating mathematical expressions  How do computers evaluate x + y or any mathematical expression ?  Answer : “Reverse Polish.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 1: Bits, bytes and a simple processor dr.ir. A.C. Verschueren.
Instruction Set Architecture & Design
Reverse Polish Expressions Some general observations about what they are and how they relate to infix expressions. These 9 slides provide details about.
Chapter 8 CPU Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
Stack  A stack is a linear data structure or abstract data type for collection of items, with the restriction that items can be added one at a time and.
Lecture 18 Last Lecture Today’s Topic Instruction formats
205 : Computer Organization and Architecture
Objectives of these slides:
Stack Data Structure By : Imam M Shofi. What is stack? A stack is a limited version of an array. A stack is a limited version of an array. New elements,
Comp 245 Data Structures Stacks. What is a Stack? A LIFO (last in, first out) structure Access (storage or retrieval) may only take place at the TOP NO.
Data Structures: CSCI 362 – Stack Implementation Data Structures: CSCI 362 – Stack Implementation lecture notes adapted from Data Structures with C++ using.
Stack Applications.
Lecture 17 Today’s Lecture –Instruction formats Little versus big endian Internal storage in the CPU: stacks vs. registers Number of operands and instruction.
Chapter 10 The Stack Stack: An Abstract Data Type An important abstraction that you will encounter in many applications. We will describe two uses:
CPU Registers – Page 1 of 35CSCI 4717 – Computer Architecture CSCI 4717/5717 Computer Architecture Topic: CPU Registers Reading: Stallings, Sections 10.3,
8.3 Stack Organization Stack: A storage device that stores information in such a manner that the item stored last is the first item retrieved. Also called.
Instruction Set Architecture
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.
Chap. 9 Instruction Set Architecture. Computer Architecture Concepts Instruction format –Opcode field Specify the operation to be performed –Address field.
Chapter 5 A Closer Look at Instruction Set Architectures.
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
COMPUTER ARCHITECURE INSTRUCTION SET ARCHITECTURE.
M. Mateen Yaqoob The University of Lahore Spring 2014.
Computer Structure & Architecture 7b - CPU & Buses.
CPU The Central Processing Unit (CPU), has 3 main parts: Control Unit Arithmetic and Logic Unit Registers. These components are connected to the rest.
Copyright © Curt Hill Stacks An Useful Abstract Data Type.
CHP-3 STACKS.
University of Tehran 1 Microprocessor System Design Omid Fatemi Machine Language Programming
Computer Architecture Lecture 4 by Engineer A. Lecturer Aymen Hasan AlAwady 17/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
Operand Addressing And Instruction Representation Tutorial 3.
CH-8 CENTRAL PROCESSING UNIT -BY ESHA S. SHAH 1.  CENTRAL PROCESSING UNIT Introduction General Register Organization Stack Organization Instruction Formats.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
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.
Logic and Computer Design Fundamentals
8085 Microprocessor Architecture
BLOCK DIAGRAM OF INTEL 8085.
Overview of Instruction Set Architectures
COMPSCI 107 Computer Science Fundamentals
MEMORY REPRESENTATION OF STACKS
SUBJECT:COMPUTER ORGANISATION SUBJECT CODE: B.E. 4th SEMESTER
Stack application: postponing data usage
STACK CHAPTER 03 Developed By :- Misha Ann Alexander Data Structures.
Visit for more Learning Resources
PART II STACK APPLICATIONS
Overview Introduction General Register Organization Stack Organization
Computer Organization and Design
The Processor and Machine Language
Computer Architecture
Prepared By:- Parminder Mann
Stacks, Queues, and Deques
CENTRAL PROCESSING UNIT
Chapter 8 Central Processing Unit
CENTRAL PROCESSING UNIT
Central Processing Unit
Addressing mode summary
Central Processing Unit.
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Prepared By:- Bhim Singh
Instruction execution and ALU
Computer Operation 6/22/2019.
Stacks A stack is an ordered set of elements, for which only the last element placed into the stack is accessible. The stack data type is also known as.
Presentation transcript:

CPU performs the bulk of data processing operations CPU performs the bulk of data processing operations The CPU is made up of three parts. They are Control unit, ALU and resisters The CPU is made up of three parts. They are Control unit, ALU and resisters CPU is the brain of a computer CPU is the brain of a computer

CONTROL REGISTER SET ALU

Register Registers are the memory locations for storing data temporary for the data processing time.

Arithmetic Logic Unit (ALU) R1 R2 R3 R4 R5 R6 R7 MUX B MUX A 3 X 8 Decoder INPUT A Bus B Bus R3 -> R1 + R2 R1 Select value of R1 R2 Select value of R2 8 bit REGISTER SEL B SEL A SEL D OPR Output

Encoding for register selection fields BINARY CODESEL ASEL BSEL D Input R1 R2 R3 R4 R5 R6 R7 INPUT R1 R2 R3 R4 R5 R6 R7 INPUT R1 R2 R3 R4 R5 R6 R7

A stack is a storage device that stores information in such a manner that the item stored last is the first item retrieved. A stack is a storage device that stores information in such a manner that the item stored last is the first item retrieved. Stack is a LIFO (Last In First Out ) list. Stack is a LIFO (Last In First Out ) list. The register that hold the address of the stack called a stack pointer (SP) The register that hold the address of the stack called a stack pointer (SP) The operation of inserting items to a stack is called push deletion operation is called pop The operation of inserting items to a stack is called push deletion operation is called pop

C B A SP FULLEMPTY Now the value of SP is 3. because C is the top of the stack.

SP SP+1 // Increment stack pointer M[SP] DR // Write item on top of stack If(SP==0) then // Check the stack is full (FULL 1) EMPTY 0 // Stack not empty

DR M[SP] // read item on top of stack [SP] SP-1 // Decrement stack pointer If(SP==0) then // Check the stack is empty (EMPTY 1) FULL 0 // set the Stack not full

The common arithmetic expressions are written in Infix notation, operators written between the operands. The common arithmetic expressions are written in Infix notation, operators written between the operands. A * B + C * D A * B + C * D In prefix or (Polish notation) operators before the operands ( +AB) In prefix or (Polish notation) operators before the operands ( +AB) In postfix or (Reverse Polish notation) operators after the operands (AB+) In postfix or (Reverse Polish notation) operators after the operands (AB+)

A * B + C * D Infix format A B * C D * + prefix format (Reverse polish) The stack perform the Reverse polish notation. For example : Consider the arithmetic operation :- (3*4) + (5*6) In reverse polish notation :- 3 4 * 5 6* +

* 5 6 * + STACK operations to evaluate 3 *4 +5*6

The no of address fields in The instruction format is depends on the internal organization of the registers in a CPU. The no of address fields in The instruction format is depends on the internal organization of the registers in a CPU. 3 types of CPU Organizations :- 3 types of CPU Organizations :- 1.Single Accumulator organization 2.General register organization 3.Stack organization

Types of address instructions Three address instruction Mainly used in register operations Example x= (a+b)*(c+d) ADD R1, A, B R1<-M[A]+M[B] ADD R2, C, DR2<-M[C]+M[D] MUL X, R1, R2R1*R2

Two address instruction Mainly used in register operations Example x= (a+b)*(c+d) MOV R1, A R1<-M[A] ADD R1, BR1<-R1+M[B] MOVE R2, C R2<-M[C] ADD R2, DR2<-R2+M[D] MUL R1, R2R1<- R1*R2 MOV X, R1M[X]<-R1

One address instruction Mainly used in accumulator registers Example x= (a+b)*(c+d) LOAD A AC <-M[A] ADD BAC <-AC+M[B] STORE T M[T]<-AC LOAD C AC <-M[C] ADD DAC <-AC+M[D] MUL TAC <- AC*M[T] STORE XM[X] <-AC

Zero address instruction used in STACK registers. Push and pop are the operations. TOS is the top of the stack. Example x= (a+b)*(c+d) PUSH A TOS <- A PUSH B TOS <- B ADDTOS <- (A+B) PUSH C TOS <- A PUSH D TOS <- B ADD TOS <- (C+D) MUL TOS <- (C+D) * (A+B) POP X M[X] <-TOP