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

PDF
Processor Organization
PPT
how hardware and software works together
PDF
Cache replacement policies,cache miss,writingtechniques
PPTX
Basic computer architecture
PPTX
Structure of operating system
PPTX
Computer Organization
PPT
Memory Addressing
PPTX
Von Neumann Architecture
Processor Organization
how hardware and software works together
Cache replacement policies,cache miss,writingtechniques
Basic computer architecture
Structure of operating system
Computer Organization
Memory Addressing
Von Neumann Architecture

What's hot (20)

PPTX
Parallel Processing Presentation2
PPTX
System programming vs application programming
PPTX
Memory Organization
PPTX
Memory organization
PPTX
Harvard architecture
PPT
multiprocessors and multicomputers
PPT
3. Coprocessor.ppt
PPT
Unit 4 memory system
PPT
Assembly language programming(unit 4)
PPTX
PPTX
ADDRESSING MODE
PPTX
Computer organization and architecture.pptx
PPTX
Addressing modes
PPT
Programming with 8085-Microprocessor and interfacing
PDF
CS6401 Operating Systems
PPT
PPTX
File access method
PPT
Chapter 4 The Processor
PDF
High performance computing tutorial, with checklist and tips to optimize clus...
PPT
Computer architecture pipelining
Parallel Processing Presentation2
System programming vs application programming
Memory Organization
Memory organization
Harvard architecture
multiprocessors and multicomputers
3. Coprocessor.ppt
Unit 4 memory system
Assembly language programming(unit 4)
ADDRESSING MODE
Computer organization and architecture.pptx
Addressing modes
Programming with 8085-Microprocessor and interfacing
CS6401 Operating Systems
File access method
Chapter 4 The Processor
High performance computing tutorial, with checklist and tips to optimize clus...
Computer architecture pipelining
Ad

Viewers also liked (20)

PPT
Chapter 1
PPT
Assembly Language Lecture 1
PPT
Assembly Language Basics
PDF
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
PDF
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
PPTX
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
PPT
Assembly Language Lecture 4
PPT
Assembly Language Lecture 2
PDF
assembly language programming and organization of IBM PC" by YTHA YU
PPTX
Register & Memory
PPT
Assembly Language Lecture 5
PPT
Assembly language programming_fundamentals 8086
PPT
Assembly Language Lecture 3
PDF
Assembly language 8086
PPTX
8086 microprocessor-architecture-120207111857-phpapp01
PPTX
Data Representation
PPTX
Introduction To Stack
PPTX
Introduction To Data Structures.
PPTX
Computer Evolution
PDF
Coal 2 - concepts in Assembly Programming
Chapter 1
Assembly Language Lecture 1
Assembly Language Basics
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 4 (Introduction ...
Assembly Language Lecture 4
Assembly Language Lecture 2
assembly language programming and organization of IBM PC" by YTHA YU
Register & Memory
Assembly Language Lecture 5
Assembly language programming_fundamentals 8086
Assembly Language Lecture 3
Assembly language 8086
8086 microprocessor-architecture-120207111857-phpapp01
Data Representation
Introduction To Stack
Introduction To Data Structures.
Computer Evolution
Coal 2 - concepts in Assembly Programming
Ad

Similar to Processor Basics (20)

PPTX
Computer organizations and assembly language
PPTX
Lecture004BasicsofthedProcessor (1).pptx
PDF
CO Unit 3.pdf (Important chapter of coa)
PPTX
Part Four The CPU architecture in .pptx
PPT
coa Chapter 2 final edited*Minimum 40 characters required.ppt
PPTX
Chapter 3 Assembly level machine organization Assembly level machine organiza...
PDF
Instruction execution cycle _
PPTX
basicfunctionalunit-190124043726555.pptx
PPT
lecture 1(1).ppt
PDF
Unit 3 - Computer Organization .pdf
PPTX
Central Processing Unit
PPTX
lecture2.pptx
PPT
Introduction to C programing for problem
PPT
Computer organisation Module 1.ppt
PPT
Data path of Computer Architecture ALU and other components
PPTX
chapter 1 -Basic Structure of Computers.pptx
PPTX
Register Organization and Instruction cycle
PPTX
Machine language program execution 1.1.2.pptx
PDF
Central processing unit i
PPT
Introduction to-microprocessor
Computer organizations and assembly language
Lecture004BasicsofthedProcessor (1).pptx
CO Unit 3.pdf (Important chapter of coa)
Part Four The CPU architecture in .pptx
coa Chapter 2 final edited*Minimum 40 characters required.ppt
Chapter 3 Assembly level machine organization Assembly level machine organiza...
Instruction execution cycle _
basicfunctionalunit-190124043726555.pptx
lecture 1(1).ppt
Unit 3 - Computer Organization .pdf
Central Processing Unit
lecture2.pptx
Introduction to C programing for problem
Computer organisation Module 1.ppt
Data path of Computer Architecture ALU and other components
chapter 1 -Basic Structure of Computers.pptx
Register Organization and Instruction cycle
Machine language program execution 1.1.2.pptx
Central processing unit i
Introduction to-microprocessor

More from Education Front (20)

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

Recently uploaded (20)

PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
composite construction of structures.pdf
PPTX
UNIT 4 Total Quality Management .pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
additive manufacturing of ss316l using mig welding
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Digital Logic Computer Design lecture notes
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
PPT on Performance Review to get promotions
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
composite construction of structures.pdf
UNIT 4 Total Quality Management .pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Lecture Notes Electrical Wiring System Components
additive manufacturing of ss316l using mig welding
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Digital Logic Computer Design lecture notes
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Operating System & Kernel Study Guide-1 - converted.pdf
Embodied AI: Ushering in the Next Era of Intelligent Systems
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
bas. eng. economics group 4 presentation 1.pptx
PPT on Performance Review to get promotions
OOP with Java - Java Introduction (Basics)
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx

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