SlideShare une entreprise Scribd logo
1  sur  21
CSC 222: Computer Organization 
& Assembly Language 
5 – Processor Basics 
Instructor: Ms. Nausheen Majeed
Outline 
 Basic Operational Concepts 
 Processor Clock 
 Instruction Representation 
 Instruction Cycle 
2
References 
 Chapter 1, Ytha Yu and Charles Marut, “Assembly Language 
3 
Programming and Organization of IBM PC” 
 Chapter 3, William Stallings, “Computer Organization & Architecture” 
 Chapter 2, Subrata Ghoshal, “Computer Organization & 
Architecture”
Basic Operational Concepts
Machine Instruction Elements 
 Each instruction must have elements that contain the 
information required by the CPU for execution. 
 These elements can be: 
5 
 Operation code: Specifies the operation to be performed (e.g.. 
ADD, I/O). The operation is specified by a binary code, known 
as the operation code, or opcode. 
 Source operand reference: The operation may involve one or 
more source operands, that is, operands that are inputs for the 
operation. 
 Result operand reference: The operation may produce a 
result. Also called destination operand. 
 Next instruction reference: This tells the CPU where to fetch 
the next instruction. 
Reference: http://cnx.org/content/m29425/latest/
Instruction Representation 
 Within the computer, each instruction is represented by a 
sequence of bits. 
 16 bits instruction 
6 
 4 bit opcode, 6 bit operand 1, 6 bit operand 2 
 4 bit opcode, 12 bit operand 
 32 bits instruction 
 64 bits instruction 
Figure: A Simple Instruction Format
Contd.. 
 Binary representations of machine instructions is difficult 
to remember. 
 Use a symbolic representation of machine instructions. 
 Opcodes are represented by abbreviations, called 
mnemonics, that indicate the operation. Common 
examples include: 
7
Instruction Types 
 Data processing: Arithmetic and logic instructions 
 Data storage: Memory instructions 
 Data movement: I/O instructions 
 Transfer of Control: Test and branch instructions 
8
No. of Addresses in an Instruction 
 Three addresses 
9 
 Operand 1, operand 2, result 
 Two addresses 
 Source 
 Destination 
 One addresses 
 Source or Destination 
 Zero address 
 Zero-address instructions are applicable to a special 
memory organization, called a Stack. A stack is a last-in-first- 
out set of locations.
Types of Operands 
 Machine instructions operate on data. 
 The most important general categories of data are: 
 Addresses 
 Numbers 
 Characters 
 Logical data 
10
Basic Operations – Processor 
 Execute the software by fetching instruction from memory 
 Look for any external signal and react accordingly 
 Input signals from keyboard or mouse etc. 
11
Processor Clock 
 Heart of any processor 
 Simple digital signals at equal time intervals 
 Alternate On Off states 
 All activity within the CPU is synchronized with the edges 
(rising or falling) of this clock signal. 
Rising Edge Falling Edge 
Reference: http://www.plantation-productions. 
12 
com/Webster/www.artofasm.com/Linux/HTML/SystemOrganizationa4.html
Program Counter (a.k.a. Binary Counter) 
 With every falling edge or rising edge (depending upon processor) of 
clock signal, the counter is incremented by one. 
 Width varies from processor to processor 
 The contents of PC are used as target address for the memory area 
13 
Microprocessor 
Read 
Address 
Memory 
Control Unit 
(CU) 
PC 
Data Buffer 
Memory 
Read 
Memory address 
Data from Memory 
Data 
Figure: Reading from memory
Basic Instruction Cycle 
 Fetch  Decode  Execute 
 Fetch 
1. Fetch an instruction from memory 
2. Decode the instruction to determine the operation 
3. Fetch data from memory if necessary 
 Execute 
4. Perform the operation on the data 
5. Store the result in memory if needed 
14
Contd.. 
 Internal CPU Registers used in instruction cycle: 
 Program Counter (PC) = Address of instruction 
 Instruction Register (IR) = Instruction being executed 
 Accumulator (AC) = Temporary Storage 
15
Computer Components: Top Level View Contd.. 
16
Detailed Steps 
 Address in the Program Counter register 
 Program Counter (PC) holds address of next instruction to fetch 
 Fetch the instruction from the memory 
 Increment the Program Counter 
 Unless told otherwise 
 Instruction loaded into Instruction Register (IR) 
 Decode the type of instruction 
 Fetch the operands 
 Execute the instruction 
 Store the results 
17
Example Program Execution 
18
Instruction Execution Cycle 
PC Program (RAM) 
I-1 I-2 I-3 I-4 
I-1 
Instruction 
Queue 
op1 
Data op2 
(RAM) 
fetch 
registers 
ALU 
store the output 
decode 
execute 
19
Instruction Cycle State Diagram 
20
Contd.. 
 Instruction Fetch 
 Read instruction from memory into processor 
 Instruction Operation Decoding 
 Determine the type of operation to be performed and 
21 
operand(s) to be used. 
 Operand Address Calculation 
 If operation involves reference to an operand in memory or I/O, 
then determine the address of operand. 
 Operand Fetch 
 Fetch from memory or read from I/O 
 Data Operation 
 Perform the operation 
 Operand Store 
 Write into memory or out to I/O if required

Contenu connexe

Tendances (20)

Registers
RegistersRegisters
Registers
 
Direct access memory
Direct access memoryDirect access memory
Direct access memory
 
Computer registers
Computer registersComputer registers
Computer registers
 
Memory interleaving
Memory interleavingMemory interleaving
Memory interleaving
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly language
 
Micro programmed control
Micro programmed controlMicro programmed control
Micro programmed control
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
 
Dma
DmaDma
Dma
 
Processors and its Types
Processors and its TypesProcessors and its Types
Processors and its Types
 
Memory mapping
Memory mappingMemory mapping
Memory mapping
 
Comuputer processor
Comuputer processorComuputer processor
Comuputer processor
 
Assembly Language
Assembly LanguageAssembly Language
Assembly Language
 
process control block
process control blockprocess control block
process control block
 
Pentium processor
Pentium processorPentium processor
Pentium processor
 
SRAM DRAM
SRAM DRAMSRAM DRAM
SRAM DRAM
 
Operand and Opcode | Computer Science
Operand and Opcode | Computer ScienceOperand and Opcode | Computer Science
Operand and Opcode | Computer Science
 
Unit 4-booth algorithm
Unit 4-booth algorithmUnit 4-booth algorithm
Unit 4-booth algorithm
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
 
Introduction to parallel processing
Introduction to parallel processingIntroduction to parallel processing
Introduction to parallel processing
 

En vedette

Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1Motaz Saad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Bilal Amjad
 
Assembly Language Lecture 4
Assembly Language Lecture 4Assembly Language Lecture 4
Assembly Language Lecture 4Motaz Saad
 
Assembly Language Lecture 2
Assembly Language Lecture 2Assembly Language Lecture 2
Assembly Language Lecture 2Motaz Saad
 
assembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUassembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUEducation
 
Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5Motaz Saad
 
Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086Shehrevar Davierwala
 
Assembly Language Lecture 3
Assembly Language Lecture 3Assembly Language Lecture 3
Assembly Language Lecture 3Motaz Saad
 
Assembly language 8086
Assembly language 8086Assembly language 8086
Assembly language 8086John Cutajar
 
8086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp018086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp01jemimajerome
 
Introduction To Data Structures.
Introduction To Data Structures.Introduction To Data Structures.
Introduction To Data Structures.Education Front
 
Central processing unit
Central processing unitCentral processing unit
Central processing unitKumar
 

En vedette (20)

Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
 
Assembly Language Lecture 4
Assembly Language Lecture 4Assembly Language Lecture 4
Assembly Language Lecture 4
 
Assembly Language Lecture 2
Assembly Language Lecture 2Assembly Language Lecture 2
Assembly Language Lecture 2
 
assembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUassembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YU
 
Register & Memory
Register & MemoryRegister & Memory
Register & Memory
 
Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5
 
Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086Assembly language programming_fundamentals 8086
Assembly language programming_fundamentals 8086
 
Assembly Language Lecture 3
Assembly Language Lecture 3Assembly Language Lecture 3
Assembly Language Lecture 3
 
Assembly language 8086
Assembly language 8086Assembly language 8086
Assembly language 8086
 
8086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp018086 microprocessor-architecture-120207111857-phpapp01
8086 microprocessor-architecture-120207111857-phpapp01
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Introduction To Stack
Introduction To StackIntroduction To Stack
Introduction To Stack
 
Introduction To Data Structures.
Introduction To Data Structures.Introduction To Data Structures.
Introduction To Data Structures.
 
Computer Evolution
Computer EvolutionComputer Evolution
Computer Evolution
 
Coal 2 - concepts in Assembly Programming
Coal 2 - concepts in Assembly ProgrammingCoal 2 - concepts in Assembly Programming
Coal 2 - concepts in Assembly Programming
 
Central processing unit
Central processing unitCentral processing unit
Central processing unit
 

Similaire à Processor Basics

Similaire à Processor Basics (20)

cse211 power point presentation for engineering
cse211 power point presentation for engineeringcse211 power point presentation for engineering
cse211 power point presentation for engineering
 
CSA PPT UNIT 1.pptx
CSA PPT UNIT 1.pptxCSA PPT UNIT 1.pptx
CSA PPT UNIT 1.pptx
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
 
instruction codes
instruction codesinstruction codes
instruction codes
 
computer Architecture
computer Architecturecomputer Architecture
computer Architecture
 
The Basic Organization of Computers
The Basic Organization of ComputersThe Basic Organization of Computers
The Basic Organization of Computers
 
Chapter 3 computer organization and artpdf
Chapter 3 computer organization and artpdfChapter 3 computer organization and artpdf
Chapter 3 computer organization and artpdf
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
 
instruction cycle
instruction cycle instruction cycle
instruction cycle
 
CAO-Unit-I.pptx
CAO-Unit-I.pptxCAO-Unit-I.pptx
CAO-Unit-I.pptx
 
Microprocessor systems (4)
Microprocessor systems (4)Microprocessor systems (4)
Microprocessor systems (4)
 
Bca examination 2015 csa
Bca examination 2015 csaBca examination 2015 csa
Bca examination 2015 csa
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)
 
Assembly language
Assembly languageAssembly language
Assembly language
 
Intro to cao &store program
Intro to cao &store programIntro to cao &store program
Intro to cao &store program
 
COA.pptx
COA.pptxCOA.pptx
COA.pptx
 
ICTCoreCh11
ICTCoreCh11ICTCoreCh11
ICTCoreCh11
 
03. top level view of computer function & interconnection
03. top level view of computer function & interconnection03. top level view of computer function & interconnection
03. top level view of computer function & interconnection
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 

Plus de Education Front

Generic Software Process Models
Generic Software Process ModelsGeneric Software Process Models
Generic Software Process ModelsEducation Front
 
Introduction to Algorithm
Introduction to AlgorithmIntroduction to Algorithm
Introduction to AlgorithmEducation Front
 
Revised Process of Communication
Revised Process of CommunicationRevised Process of Communication
Revised Process of CommunicationEducation Front
 
Importance of Language in Communication
Importance of Language in CommunicationImportance of Language in Communication
Importance of Language in CommunicationEducation Front
 
Lecture1 (SE Introduction)
Lecture1 (SE Introduction)Lecture1 (SE Introduction)
Lecture1 (SE Introduction)Education Front
 
Lecture 2 (Software Processes)
Lecture 2 (Software Processes)Lecture 2 (Software Processes)
Lecture 2 (Software Processes)Education Front
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structureEducation Front
 
Facing Today’s Communication Challenges
Facing Today’s Communication ChallengesFacing Today’s Communication Challenges
Facing Today’s Communication ChallengesEducation Front
 
Lecture 2: Facing Today’s Communication Challenges.
Lecture 2: Facing Today’s Communication Challenges.Lecture 2: Facing Today’s Communication Challenges.
Lecture 2: Facing Today’s Communication Challenges.Education Front
 
Effective communication skills
Effective communication skillsEffective communication skills
Effective communication skillsEducation Front
 
Introduction to Presentation Skills
Introduction to Presentation SkillsIntroduction to Presentation Skills
Introduction to Presentation SkillsEducation Front
 
Multiple Drug Resistance and Antibiotic Misuse in Urdu.
Multiple Drug Resistance and Antibiotic Misuse in Urdu.Multiple Drug Resistance and Antibiotic Misuse in Urdu.
Multiple Drug Resistance and Antibiotic Misuse in Urdu.Education Front
 

Plus de Education Front (20)

Improving Pronunciation
Improving PronunciationImproving Pronunciation
Improving Pronunciation
 
Generic Software Process Models
Generic Software Process ModelsGeneric Software Process Models
Generic Software Process Models
 
2- Dimensional Arrays
2- Dimensional Arrays2- Dimensional Arrays
2- Dimensional Arrays
 
Problem Sloving
Problem SlovingProblem Sloving
Problem Sloving
 
Problem Solving - 1
Problem Solving - 1Problem Solving - 1
Problem Solving - 1
 
Process Models
Process ModelsProcess Models
Process Models
 
Process Models
Process ModelsProcess Models
Process Models
 
Introduction to Algorithm
Introduction to AlgorithmIntroduction to Algorithm
Introduction to Algorithm
 
Revised Process of Communication
Revised Process of CommunicationRevised Process of Communication
Revised Process of Communication
 
Importance of Language in Communication
Importance of Language in CommunicationImportance of Language in Communication
Importance of Language in Communication
 
Lecture1 (SE Introduction)
Lecture1 (SE Introduction)Lecture1 (SE Introduction)
Lecture1 (SE Introduction)
 
Lecture 2 (Software Processes)
Lecture 2 (Software Processes)Lecture 2 (Software Processes)
Lecture 2 (Software Processes)
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Facing Today’s Communication Challenges
Facing Today’s Communication ChallengesFacing Today’s Communication Challenges
Facing Today’s Communication Challenges
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Introduction To EMU
Introduction To EMUIntroduction To EMU
Introduction To EMU
 
Lecture 2: Facing Today’s Communication Challenges.
Lecture 2: Facing Today’s Communication Challenges.Lecture 2: Facing Today’s Communication Challenges.
Lecture 2: Facing Today’s Communication Challenges.
 
Effective communication skills
Effective communication skillsEffective communication skills
Effective communication skills
 
Introduction to Presentation Skills
Introduction to Presentation SkillsIntroduction to Presentation Skills
Introduction to Presentation Skills
 
Multiple Drug Resistance and Antibiotic Misuse in Urdu.
Multiple Drug Resistance and Antibiotic Misuse in Urdu.Multiple Drug Resistance and Antibiotic Misuse in Urdu.
Multiple Drug Resistance and Antibiotic Misuse in Urdu.
 

Dernier

Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxchumtiyababu
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersMairaAshraf6
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 

Dernier (20)

Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 

Processor Basics

  • 1. CSC 222: Computer Organization & Assembly Language 5 – Processor Basics Instructor: Ms. Nausheen Majeed
  • 2. Outline  Basic Operational Concepts  Processor Clock  Instruction Representation  Instruction Cycle 2
  • 3. References  Chapter 1, Ytha Yu and Charles Marut, “Assembly Language 3 Programming and Organization of IBM PC”  Chapter 3, William Stallings, “Computer Organization & Architecture”  Chapter 2, Subrata Ghoshal, “Computer Organization & Architecture”
  • 5. Machine Instruction Elements  Each instruction must have elements that contain the information required by the CPU for execution.  These elements can be: 5  Operation code: Specifies the operation to be performed (e.g.. ADD, I/O). The operation is specified by a binary code, known as the operation code, or opcode.  Source operand reference: The operation may involve one or more source operands, that is, operands that are inputs for the operation.  Result operand reference: The operation may produce a result. Also called destination operand.  Next instruction reference: This tells the CPU where to fetch the next instruction. Reference: http://cnx.org/content/m29425/latest/
  • 6. Instruction Representation  Within the computer, each instruction is represented by a sequence of bits.  16 bits instruction 6  4 bit opcode, 6 bit operand 1, 6 bit operand 2  4 bit opcode, 12 bit operand  32 bits instruction  64 bits instruction Figure: A Simple Instruction Format
  • 7. Contd..  Binary representations of machine instructions is difficult to remember.  Use a symbolic representation of machine instructions.  Opcodes are represented by abbreviations, called mnemonics, that indicate the operation. Common examples include: 7
  • 8. Instruction Types  Data processing: Arithmetic and logic instructions  Data storage: Memory instructions  Data movement: I/O instructions  Transfer of Control: Test and branch instructions 8
  • 9. No. of Addresses in an Instruction  Three addresses 9  Operand 1, operand 2, result  Two addresses  Source  Destination  One addresses  Source or Destination  Zero address  Zero-address instructions are applicable to a special memory organization, called a Stack. A stack is a last-in-first- out set of locations.
  • 10. Types of Operands  Machine instructions operate on data.  The most important general categories of data are:  Addresses  Numbers  Characters  Logical data 10
  • 11. Basic Operations – Processor  Execute the software by fetching instruction from memory  Look for any external signal and react accordingly  Input signals from keyboard or mouse etc. 11
  • 12. Processor Clock  Heart of any processor  Simple digital signals at equal time intervals  Alternate On Off states  All activity within the CPU is synchronized with the edges (rising or falling) of this clock signal. Rising Edge Falling Edge Reference: http://www.plantation-productions. 12 com/Webster/www.artofasm.com/Linux/HTML/SystemOrganizationa4.html
  • 13. Program Counter (a.k.a. Binary Counter)  With every falling edge or rising edge (depending upon processor) of clock signal, the counter is incremented by one.  Width varies from processor to processor  The contents of PC are used as target address for the memory area 13 Microprocessor Read Address Memory Control Unit (CU) PC Data Buffer Memory Read Memory address Data from Memory Data Figure: Reading from memory
  • 14. Basic Instruction Cycle  Fetch  Decode  Execute  Fetch 1. Fetch an instruction from memory 2. Decode the instruction to determine the operation 3. Fetch data from memory if necessary  Execute 4. Perform the operation on the data 5. Store the result in memory if needed 14
  • 15. Contd..  Internal CPU Registers used in instruction cycle:  Program Counter (PC) = Address of instruction  Instruction Register (IR) = Instruction being executed  Accumulator (AC) = Temporary Storage 15
  • 16. Computer Components: Top Level View Contd.. 16
  • 17. Detailed Steps  Address in the Program Counter register  Program Counter (PC) holds address of next instruction to fetch  Fetch the instruction from the memory  Increment the Program Counter  Unless told otherwise  Instruction loaded into Instruction Register (IR)  Decode the type of instruction  Fetch the operands  Execute the instruction  Store the results 17
  • 19. Instruction Execution Cycle PC Program (RAM) I-1 I-2 I-3 I-4 I-1 Instruction Queue op1 Data op2 (RAM) fetch registers ALU store the output decode execute 19
  • 21. Contd..  Instruction Fetch  Read instruction from memory into processor  Instruction Operation Decoding  Determine the type of operation to be performed and 21 operand(s) to be used.  Operand Address Calculation  If operation involves reference to an operand in memory or I/O, then determine the address of operand.  Operand Fetch  Fetch from memory or read from I/O  Data Operation  Perform the operation  Operand Store  Write into memory or out to I/O if required