SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

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