SlideShare a Scribd company logo
1 of 6
Central Processing Unit 1 Lecture 23
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Overview
 Introduction
 General Register Organization
 Stack Organization
 Instruction Formats
 Addressing Modes
 Data Transfer and Manipulation
 Program Control and Program Interrupt
 Reduced Instruction Set Computer
Central Processing Unit 2 Lecture 23
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
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
Central Processing Unit 3 Lecture 23
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
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
0
1
2
3
4
63
FULL EMPTY
SP
DR
Flags
Stack pointer
6 bits
Central Processing Unit 4 Lecture 23
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
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
Central Processing Unit 5 Lecture 23
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Reverse Polish Notation
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 * +
• Arithmetic Expressions: A + B
3 3 12 12 12 12 42
4 5 5
6
30
3 4 * 5 6 * +
Central Processing Unit 6 Lecture 23
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
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

More Related Content

What's hot

Data Manipulation
Data ManipulationData Manipulation
Data Manipulation
Asfi Bhai
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architecture
Subesh Kumar Yadav
 
Register Organization and Instruction cycle
Register Organization and Instruction cycleRegister Organization and Instruction cycle
Register Organization and Instruction cycle
Muhammad Ameer Mohavia
 

What's hot (20)

Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulation
 
Data Manipulation
Data ManipulationData Manipulation
Data Manipulation
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architecture
 
Register Organization and Instruction cycle
Register Organization and Instruction cycleRegister Organization and Instruction cycle
Register Organization and Instruction cycle
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operation
 
Instruction Level Parallelism Compiler optimization Techniques Anna Universit...
Instruction Level Parallelism Compiler optimization Techniques Anna Universit...Instruction Level Parallelism Compiler optimization Techniques Anna Universit...
Instruction Level Parallelism Compiler optimization Techniques Anna Universit...
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
 
Bca 2nd sem-u-3-basic computer programming and micro programmed control
Bca 2nd sem-u-3-basic computer programming and micro programmed controlBca 2nd sem-u-3-basic computer programming and micro programmed control
Bca 2nd sem-u-3-basic computer programming and micro programmed control
 
Precessor organization
Precessor organizationPrecessor organization
Precessor organization
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
 
Datapath Design of Computer Architecture
Datapath Design of Computer ArchitectureDatapath Design of Computer Architecture
Datapath Design of Computer Architecture
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulation
 
Computer Architecture - Program Execution
Computer Architecture - Program ExecutionComputer Architecture - Program Execution
Computer Architecture - Program Execution
 

Viewers also liked

Basic Processing Unit
Basic Processing UnitBasic Processing Unit
Basic Processing Unit
Slideshare
 
Stereotypes of Asians in the U.S. and Blacks in Japan
Stereotypes of Asians in the U.S. and Blacks in JapanStereotypes of Asians in the U.S. and Blacks in Japan
Stereotypes of Asians in the U.S. and Blacks in Japan
Steve Silver
 
Alternative Lifestyles
Alternative LifestylesAlternative Lifestyles
Alternative Lifestyles
SophiiaZ
 
Alternative lifesyles
Alternative lifesylesAlternative lifesyles
Alternative lifesyles
ribenaberry
 
Unit 3 basic processing unit
Unit 3   basic processing unitUnit 3   basic processing unit
Unit 3 basic processing unit
chidabdu
 

Viewers also liked (20)

Csa stack
Csa stackCsa stack
Csa stack
 
Basic Processing Unit
Basic Processing UnitBasic Processing Unit
Basic Processing Unit
 
Stereotypes of Asians in the U.S. and Blacks in Japan
Stereotypes of Asians in the U.S. and Blacks in JapanStereotypes of Asians in the U.S. and Blacks in Japan
Stereotypes of Asians in the U.S. and Blacks in Japan
 
Lecture 36
Lecture 36Lecture 36
Lecture 36
 
Lecture 34
Lecture 34Lecture 34
Lecture 34
 
Lecture 19
Lecture 19Lecture 19
Lecture 19
 
Lecture 20
Lecture 20Lecture 20
Lecture 20
 
Alternative Lifestyles
Alternative LifestylesAlternative Lifestyles
Alternative Lifestyles
 
Lecture 40
Lecture 40Lecture 40
Lecture 40
 
Cache memory
Cache memoryCache memory
Cache memory
 
Lecture 39
Lecture 39Lecture 39
Lecture 39
 
Alternative lifesyles
Alternative lifesylesAlternative lifesyles
Alternative lifesyles
 
Lecture 41
Lecture 41Lecture 41
Lecture 41
 
Memory mapping techniques and low power memory design
Memory mapping techniques and low power memory designMemory mapping techniques and low power memory design
Memory mapping techniques and low power memory design
 
Unit 3 basic processing unit
Unit 3   basic processing unitUnit 3   basic processing unit
Unit 3 basic processing unit
 
Lecture 47
Lecture 47Lecture 47
Lecture 47
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network Layer
 
Memory organisation ppt final presentation
Memory organisation ppt final presentationMemory organisation ppt final presentation
Memory organisation ppt final presentation
 
Computer architecture
Computer architecture Computer architecture
Computer architecture
 
Computer organization
Computer organizationComputer organization
Computer organization
 

Similar to Lecture 23

Ch8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALUCh8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALU
RNShukla7
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)
Mahesh Kumar Attri
 
Central processing unit
Central processing unitCentral processing unit
Central processing unit
Kumar
 
Central processing unit
Central processing unitCentral processing unit
Central processing unit
Kumar
 

Similar to Lecture 23 (20)

Cpu unit
Cpu unitCpu unit
Cpu unit
 
CPU Register Organization.ppt
CPU Register Organization.pptCPU Register Organization.ppt
CPU Register Organization.ppt
 
Ch8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALUCh8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALU
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)
 
pdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptpdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.ppt
 
Central processing unit
Central processing unitCentral processing unit
Central processing unit
 
Central processing unit
Central processing unitCentral processing unit
Central processing unit
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
UNIT-3.pptx
UNIT-3.pptxUNIT-3.pptx
UNIT-3.pptx
 
Central processor organization
Central processor organizationCentral processor organization
Central processor organization
 
Top 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tipsTop 10 Oracle SQL tuning tips
Top 10 Oracle SQL tuning tips
 
COA.pptx
COA.pptxCOA.pptx
COA.pptx
 
Computer Organization and 8085 microprocessor notes
Computer Organization and 8085 microprocessor notesComputer Organization and 8085 microprocessor notes
Computer Organization and 8085 microprocessor notes
 
4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]
 
4bit PC report
4bit PC report4bit PC report
4bit PC report
 
Chapter8.ppt
Chapter8.pptChapter8.ppt
Chapter8.ppt
 
Arithmetic & Logic Unit
Arithmetic & Logic UnitArithmetic & Logic Unit
Arithmetic & Logic Unit
 
Central processor organization
Central processor organizationCentral processor organization
Central processor organization
 
PLSQL Advanced
PLSQL AdvancedPLSQL Advanced
PLSQL Advanced
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 

More from RahulRathi94 (14)

Lecture 44
Lecture 44Lecture 44
Lecture 44
 
Lecture 43
Lecture 43Lecture 43
Lecture 43
 
Lecture 42
Lecture 42Lecture 42
Lecture 42
 
Lecture 38
Lecture 38Lecture 38
Lecture 38
 
Lecture 37
Lecture 37Lecture 37
Lecture 37
 
Lecture 35
Lecture 35Lecture 35
Lecture 35
 
Lecture 21
Lecture 21Lecture 21
Lecture 21
 
Lecture 18
Lecture 18Lecture 18
Lecture 18
 
Lecture 17
Lecture 17Lecture 17
Lecture 17
 
Lecture 16
Lecture 16Lecture 16
Lecture 16
 
Lecture 15
Lecture 15Lecture 15
Lecture 15
 
Lecture 14
Lecture 14Lecture 14
Lecture 14
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

Lecture 23

  • 1. Central Processing Unit 1 Lecture 23 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Overview  Introduction  General Register Organization  Stack Organization  Instruction Formats  Addressing Modes  Data Transfer and Manipulation  Program Control and Program Interrupt  Reduced Instruction Set Computer
  • 2. Central Processing Unit 2 Lecture 23 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT 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
  • 3. Central Processing Unit 3 Lecture 23 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT 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 0 1 2 3 4 63 FULL EMPTY SP DR Flags Stack pointer 6 bits
  • 4. Central Processing Unit 4 Lecture 23 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT 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
  • 5. Central Processing Unit 5 Lecture 23 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Reverse Polish Notation 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 * + • Arithmetic Expressions: A + B 3 3 12 12 12 12 42 4 5 5 6 30 3 4 * 5 6 * +
  • 6. Central Processing Unit 6 Lecture 23 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT 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