Overview Introduction General Register Organization Stack Organization

Slides:



Advertisements
Similar presentations
Chapter 8: Central Processing Unit
Advertisements

Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
Major components of CPU
CSC 3650 Introduction to Computer Architecture Time: 3:30 to 6:30Meeting Days: WLocation: Oxendine 1237B Textbook: Essentials of Computer Architecture,
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.
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
Reverse Polish Expressions Some general observations about what they are and how they relate to infix expressions. These 9 slides provide details about.
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
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.
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:
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.
Chapter 5 A Closer Look at Instruction Set Architectures.
Central Processing Unit. MAJOR COMPONENTS OF CPU.
COMPUTER ARCHITECURE INSTRUCTION SET ARCHITECTURE.
ECE 265 – LECTURE 5 The M68HC11 Basic Instruction Set 12/8/ ECE265.
Lecture 1: Review of Computer Organization
CHP-3 STACKS.
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.
PHY 201 (Blum)1 Stacks Based in part on material from Chapters 4 & 5 in Computer Architecture by Nicholas Carter.
Stack Operations Dr. Hadi AL Saadi.
Review Use of Stack Introduction Stack in our life Stack Operations
Overview of Instruction Set Architectures
Part of the Assembler Language Programmers Toolbox
Overview Introduction General Register Organization Stack Organization
Overview Register Transfer Language Register Transfer
Infix to postfix conversion
Gunjeet Kaur Dronacharya Group of institutions
The Stack.
Introduction to microprocessor (Continued) Unit 1 Lecture 2
ECE 3430 – Intro to Microcomputer Systems
SUBJECT:COMPUTER ORGANISATION SUBJECT CODE: B.E. 4th SEMESTER
Lab 3 - Branching & Subroutines
Introduction of microprocessor
Overview Introduction General Register Organization Stack Organization
ECE 3430 – Intro to Microcomputer Systems
Overview Introduction General Register Organization Stack Organization
Stack application: postponing data usage
Visit for more Learning Resources
PART II STACK APPLICATIONS
Overview Introduction Data representation Fixed Point Representation
Overview Peripheral Devices Input-Output Interface
Computer Organization and Design
CS-401 Assembly Language Programming
Processor Organization and Architecture
Chapter 10 The Stack.
Arithmetic using a stack
Introduction to Assembly Language
Prepared By:- Parminder Mann
Stacks, Queues, and Deques
CS-401 Computer Architecture & Assembly Language Programming
CENTRAL PROCESSING UNIT
Chapter 8 Central Processing Unit
CENTRAL PROCESSING UNIT
FIGURE 9-1 Graph for Example of Conversion from Infix to RPN
ECEG-3202 Computer Architecture and Organization
A Closer Look at Instruction Set Architectures Chapter 5
ECEG-3202 Computer Architecture and Organization
Queue Applications Lecture 31 Mon, Apr 9, 2007.
Computer System Overview
Queue Applications Lecture 31 Tue, Apr 11, 2006.
Central Processing Unit.
Prepared By:- Bhim Singh
Chapter 10 Instruction Sets: Characteristics and Functions
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:

Overview Introduction General Register Organization Stack Organization Central Processing Unit 1 Lecture 23 Overview Introduction General Register Organization Stack Organization Instruction Formats Addressing Modes Data Transfer and Manipulation Program Control and Program Interrupt Reduced Instruction Set Computer CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT

Stack Organization Stack Stack Organization Central Processing Unit 2 Lecture 23 Stack Organization Stack Very useful feature for nested subroutines, nested interrupt services Also efficient for arithmetic expression evaluation Storage which can be accessed in LIFO Pointer: SP Only PUSH and POP operations are applicable Stack Organization Register Stack Organization Memory Stack Organization CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT

Register Stack Organization Central Processing Unit 3 Lecture 23 Register Stack Organization Push, Pop operations /* Initially, SP = 0, EMPTY = 1, FULL = 0 */ PUSH POP SP SP + 1 DR M[SP] M[SP] DR SP SP  1 If (SP = 0) then (FULL 1) If (SP = 0) then (EMPTY 1) EMPTY 0 FULL 0 A B C 1 2 3 4 63 FULL EMPTY SP DR Flags Stack pointer 6 bits CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT

Memory Stack Organization Central Processing Unit 4 Lecture 23 Memory Stack Organization - A portion of memory is used as a stack with a processor register as a stack pointer - PUSH: SP  SP - 1 M[SP]  DR - POP: DR  M[SP] SP  SP + 1 Memory with Program, Data, and Stack Segments 4001 4000 3999 3998 3997 3000 Data (operands) Program (instructions) 1000 PC AR SP stack - Most computers do not provide hardware to check stack overflow (full stack) or underflow (empty stack)  must be done in software CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT

Reverse Polish Notation Central Processing Unit 5 Lecture 23 Reverse Polish Notation Arithmetic Expressions: A + B A + B Infix notation + A B Prefix or Polish notation A B + Postfix or reverse Polish notation - The reverse Polish notation is very suitable for stack manipulation Evaluation of Arithmetic Expressions Any arithmetic expression can be expressed in parenthesis-free Polish notation, including reverse Polish notation (3 * 4) + (5 * 6)  3 4 * 5 6 * + 3 12 42 4 5 6 30 * + CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT

Processor Organization Central Processing Unit 6 Lecture 23 Processor Organization In general, most processors are organized in one of 3 ways Single register (Accumulator) organization Basic Computer is a good example Accumulator is the only general purpose register General register organization Used by most modern computer processors Any of the registers can be used as the source or destination for computer operations Stack organization All operations are done using the hardware stack For example, an OR instruction will pop the two top elements from the stack, do a logical OR on them, and push the result on the stack CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT