SlideShare a Scribd company logo
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

More Related Content

What's hot (20)

PPTX
General register organization (computer organization)
rishi ram khanal
 
PPTX
Micro Programmed Control Unit
Kamal Acharya
 
PPTX
Computer registers
DeepikaT13
 
PPT
Arithmetic Logic Unit (ALU)
Student
 
PPT
Instruction Set Architecture (ISA)
Gaditek
 
PPTX
Computer architecture control unit
Mazin Alwaaly
 
PDF
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
samirbharat77
 
PPTX
Pipelining and vector processing
Kamal Acharya
 
PPTX
Risc and cisc
dipaknandankar
 
PPTX
arithmetic logic unit
Shimak Sharook
 
PDF
ARM Architecture
Dwight Sabio
 
PPT
Microprocessor ppt
swaminath kanhere
 
PPTX
Logical, Shift, and Rotate Instruction
Badrul Alam
 
PPTX
Input output interface
Christ University
 
PPT
Introduction to msp430
Harsha herle
 
PPT
Flynns classification
Yasir Khan
 
PPTX
Instruction pipeline: Computer Architecture
InteX Research Lab
 
PPTX
MicroProgrammed Explained .
Muhammad Umar
 
PPT
Instruction format
Sanjeev Patel
 
PDF
hardwired control unit ppt
SushmithaAcharya7
 
General register organization (computer organization)
rishi ram khanal
 
Micro Programmed Control Unit
Kamal Acharya
 
Computer registers
DeepikaT13
 
Arithmetic Logic Unit (ALU)
Student
 
Instruction Set Architecture (ISA)
Gaditek
 
Computer architecture control unit
Mazin Alwaaly
 
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
samirbharat77
 
Pipelining and vector processing
Kamal Acharya
 
Risc and cisc
dipaknandankar
 
arithmetic logic unit
Shimak Sharook
 
ARM Architecture
Dwight Sabio
 
Microprocessor ppt
swaminath kanhere
 
Logical, Shift, and Rotate Instruction
Badrul Alam
 
Input output interface
Christ University
 
Introduction to msp430
Harsha herle
 
Flynns classification
Yasir Khan
 
Instruction pipeline: Computer Architecture
InteX Research Lab
 
MicroProgrammed Explained .
Muhammad Umar
 
Instruction format
Sanjeev Patel
 
hardwired control unit ppt
SushmithaAcharya7
 

Viewers also liked (20)

PPT
Chapter 1
Ashhad Kamal
 
PPT
Assembly Language Lecture 1
Motaz Saad
 
PDF
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Bilal Amjad
 
PDF
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Bilal Amjad
 
PPTX
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Bilal Amjad
 
PPT
Assembly Language Lecture 4
Motaz Saad
 
PPT
Assembly Language Lecture 2
Motaz Saad
 
PDF
assembly language programming and organization of IBM PC" by YTHA YU
Education
 
PPTX
Register & Memory
Education Front
 
PPT
Assembly Language Lecture 5
Motaz Saad
 
PPT
Assembly language programming_fundamentals 8086
Shehrevar Davierwala
 
PPT
Assembly Language Lecture 3
Motaz Saad
 
PPT
Assembly language programming(unit 4)
Ashim Saha
 
PDF
Assembly language 8086
John Cutajar
 
PPTX
8086 microprocessor-architecture-120207111857-phpapp01
jemimajerome
 
PPTX
Data Representation
Education Front
 
PPTX
Introduction To Stack
Education Front
 
PPTX
Introduction To Data Structures.
Education Front
 
PPTX
Computer Evolution
Education Front
 
PDF
Coal 2 - concepts in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Chapter 1
Ashhad Kamal
 
Assembly Language Lecture 1
Motaz Saad
 
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 ...
Bilal Amjad
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Bilal Amjad
 
Assembly Language Lecture 4
Motaz Saad
 
Assembly Language Lecture 2
Motaz Saad
 
assembly language programming and organization of IBM PC" by YTHA YU
Education
 
Register & Memory
Education Front
 
Assembly Language Lecture 5
Motaz Saad
 
Assembly language programming_fundamentals 8086
Shehrevar Davierwala
 
Assembly Language Lecture 3
Motaz Saad
 
Assembly language programming(unit 4)
Ashim Saha
 
Assembly language 8086
John Cutajar
 
8086 microprocessor-architecture-120207111857-phpapp01
jemimajerome
 
Data Representation
Education Front
 
Introduction To Stack
Education Front
 
Introduction To Data Structures.
Education Front
 
Computer Evolution
Education Front
 
Coal 2 - concepts in Assembly Programming
Muhammad Taqi Hassan Bukhari
 
Ad

Similar to Processor Basics (20)

PPTX
Computer organizations and assembly language
KamranNazakat1
 
PPTX
Chapter 3 Assembly level machine organization Assembly level machine organiza...
shumawakjira26
 
PPTX
Lecture004BasicsofthedProcessor (1).pptx
AnumAshraf18
 
PPTX
UNIT -1 COMPUTER ORGANIZATION (1).pptxxc
bhaskarsai499
 
PDF
cse211 power point presentation for engineering
VishnuVinay6
 
PPTX
CSA PPT UNIT 1.pptx
sukhpreetsingh295239
 
PPTX
Basic Computer Organization and Design
Kamal Acharya
 
PPTX
instruction codes
SangeethaSasi1
 
PPTX
computer Architecture
umardanjumamaiwada
 
PPTX
The Basic Organization of Computers
Tallat Satti
 
PPTX
Unit IV Fundamentals of Computer Organization.pptx
ramyacaffine
 
PDF
3. IICT_Lecture 03_Computer Org Personal
National College of Business Administration and Economics
 
PDF
Chapter 3 computer organization and artpdf
Mohammed472103
 
PDF
APznzaboj9CF_9DQRT2HR-lWEYeLjr197Vw_ZUktUfDvP5Qqd8SL2ZSNwpIwVoC6MN9lqvglTXM11...
rohithzach
 
PPT
Computer Organization and Architecture.
CS_GDRCST
 
PDF
Basic Computer Organization and Design
mekind
 
PPTX
instruction cycle
faiqa saleem
 
PPTX
CAO-Unit-I.pptx
ClassicFUKRA
 
PPT
Computer Architecture notes by Beenish Lecture 4.ppt
beenish75
 
Computer organizations and assembly language
KamranNazakat1
 
Chapter 3 Assembly level machine organization Assembly level machine organiza...
shumawakjira26
 
Lecture004BasicsofthedProcessor (1).pptx
AnumAshraf18
 
UNIT -1 COMPUTER ORGANIZATION (1).pptxxc
bhaskarsai499
 
cse211 power point presentation for engineering
VishnuVinay6
 
CSA PPT UNIT 1.pptx
sukhpreetsingh295239
 
Basic Computer Organization and Design
Kamal Acharya
 
instruction codes
SangeethaSasi1
 
computer Architecture
umardanjumamaiwada
 
The Basic Organization of Computers
Tallat Satti
 
Unit IV Fundamentals of Computer Organization.pptx
ramyacaffine
 
3. IICT_Lecture 03_Computer Org Personal
National College of Business Administration and Economics
 
Chapter 3 computer organization and artpdf
Mohammed472103
 
APznzaboj9CF_9DQRT2HR-lWEYeLjr197Vw_ZUktUfDvP5Qqd8SL2ZSNwpIwVoC6MN9lqvglTXM11...
rohithzach
 
Computer Organization and Architecture.
CS_GDRCST
 
Basic Computer Organization and Design
mekind
 
instruction cycle
faiqa saleem
 
CAO-Unit-I.pptx
ClassicFUKRA
 
Computer Architecture notes by Beenish Lecture 4.ppt
beenish75
 
Ad

More from Education Front (20)

PPT
Improving Pronunciation
Education Front
 
PPTX
Generic Software Process Models
Education Front
 
PPTX
2- Dimensional Arrays
Education Front
 
PPTX
Problem Sloving
Education Front
 
PPTX
Problem Solving - 1
Education Front
 
PPTX
Process Models
Education Front
 
PPTX
Process Models
Education Front
 
PPTX
Introduction to Algorithm
Education Front
 
PPT
Revised Process of Communication
Education Front
 
PPT
Importance of Language in Communication
Education Front
 
PPT
Lecture1 (SE Introduction)
Education Front
 
PPTX
Lecture 2 (Software Processes)
Education Front
 
PPTX
Introduction to data structure
Education Front
 
PPTX
Facing Today’s Communication Challenges
Education Front
 
PPTX
Data Representation
Education Front
 
PPTX
Introduction To EMU
Education Front
 
PPTX
Lecture 2: Facing Today’s Communication Challenges.
Education Front
 
PPTX
Effective communication skills
Education Front
 
PPTX
Introduction to Presentation Skills
Education Front
 
PPTX
Multiple Drug Resistance and Antibiotic Misuse in Urdu.
Education Front
 
Improving Pronunciation
Education Front
 
Generic Software Process Models
Education Front
 
2- Dimensional Arrays
Education Front
 
Problem Sloving
Education Front
 
Problem Solving - 1
Education Front
 
Process Models
Education Front
 
Process Models
Education Front
 
Introduction to Algorithm
Education Front
 
Revised Process of Communication
Education Front
 
Importance of Language in Communication
Education Front
 
Lecture1 (SE Introduction)
Education Front
 
Lecture 2 (Software Processes)
Education Front
 
Introduction to data structure
Education Front
 
Facing Today’s Communication Challenges
Education Front
 
Data Representation
Education Front
 
Introduction To EMU
Education Front
 
Lecture 2: Facing Today’s Communication Challenges.
Education Front
 
Effective communication skills
Education Front
 
Introduction to Presentation Skills
Education Front
 
Multiple Drug Resistance and Antibiotic Misuse in Urdu.
Education Front
 

Recently uploaded (20)

PDF
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PPTX
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
PDF
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
PPTX
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
PPTX
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
PPTX
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
PPTX
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
PPTX
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
PPTX
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
Design Thinking basics for Engineers.pdf
CMR University
 
Hashing Introduction , hash functions and techniques
sailajam21
 
MRRS Strength and Durability of Concrete
CivilMythili
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
Thermal runway and thermal stability.pptx
godow93766
 
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 

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