SlideShare a Scribd company logo
1 of 8
Basic Computer Orgsnization and Design 1 Lecture 11
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Overview
Instruction Codes
 Computer Registers
 Computer Instructions
 Timing and Control
 Instruction Cycle
 Memory Reference Instructions
 Input-Output and Interrupt
 Complete Computer Description
Basic Computer Orgsnization and Design 2 Lecture 11
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Introduction
• Every different processor type has its own design (different registers, buses,
microoperations, machine instructions, etc)
• Modern processor is a very complex device
• It contains
– Many registers
– Multiple arithmetic units, for both integer and floating point calculations
– The ability to pipeline several consecutive instructions to speed execution
– Etc.
• However, to understand how processors work, we will start with a
simplified processor model
Basic Computer Orgsnization and Design 3 Lecture 11
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Basic Computer
• The Basic Computer has two components, a processor and memory
• The memory has 4096 words in it
– 4096 = 212, so it takes 12 bits to select a word in memory
• Each word is 16 bits long
CPU RAM
0
4095
015
Basic Computer Orgsnization and Design 4 Lecture 11
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Instruction
 Program
 A sequence of (machine) instructions
 (Machine) Instruction
 A group of bits that tell the computer to perform a specific operation
(a sequence of micro-operation)
 The instructions of a program, along with any needed data are stored in
memory
 The CPU reads the next instruction from memory
 It is placed in an Instruction Register (IR)
 Control circuitry in control unit then translates the instruction into the
sequence of microoperations necessary to implement it
Basic Computer Orgsnization and Design 5 Lecture 11
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Instruction Format
 A computer instruction is often divided into two parts
 An opcode (Operation Code) that specifies the operation for that
instruction
 An address that specifies the registers and/or locations in memory to
use for that operation
 In the Basic Computer, since the memory contains 4096 (= 212) words, we
needs 12 bit to specify which memory address this instruction will use
 In the Basic Computer, bit 15 of the instruction specifies the addressing
mode (0: direct addressing, 1: indirect addressing)
 Since the memory words, and hence the instructions, are 16 bits long, that
leaves 3 bits for the instruction’s opcode
Opcode Address
Instruction Format
15 14 12 0
I
11
Addressing
mode
Basic Computer Orgsnization and Design 6 Lecture 11
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Addressing Mode
• The address field of an instruction can represent either
– Direct address: the address in memory of the data to use (the address of the operand), or
– Indirect address: the address in memory of the address in memory of the data to use
• Effective Address (EA)
– The address, that can be directly used without modification to access an operand for a
computation-type instruction, or as the target address for a branch-type instruction
0 ADD 45722
Operand457
1 ADD 30035
1350300
Operand1350
+
AC
+
AC
Direct addressing Indirect addressing
Basic Computer Orgsnization and Design 7 Lecture 11
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Processor Register
 A processor has many registers to hold instructions, addresses, data, etc
 The processor has a register, the Program Counter (PC) that holds the
memory address of the next instruction to get
Since the memory in the Basic Computer only has 4096 locations,
the PC only needs 12 bits
 In a direct or indirect addressing, the processor needs to keep track of
what locations in memory it is addressing: The Address Register (AR) is
used for this
The AR is a 12 bit register in the Basic Computer
 When an operand is found, using either direct or indirect addressing, it
is placed in the Data Register (DR). The processor then uses this value as
data for its operation
 The Basic Computer has a single general purpose register – the
Accumulator (AC)
Basic Computer Orgsnization and Design 8 Lecture 11
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Processor Register
 The significance of a general purpose register is that it can be referred to in
instructions
e.g. load AC with the contents of a specific memory location; store the contents of AC
into a specified memory location
 Often a processor will need a scratch register to store intermediate results
or other temporary data; in the Basic Computer this is the Temporary
Register (TR)
 The Basic Computer uses a very simple model of input/output (I/O)
operations
Input devices are considered to send 8 bits of character data to the processor
The processor can send 8 bits of character data to output devices
 The Input Register (INPR) holds an 8 bit character gotten from an input
device
 The Output Register (OUTR) holds an 8 bit character to be send to an
output device

More Related Content

What's hot

Computer Organization
Computer OrganizationComputer Organization
Computer Organizationanishgoel
 
Data Manipulation
Data ManipulationData Manipulation
Data ManipulationAsfi Bhai
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5Umang Gupta
 
Computer organization
Computer organizationComputer organization
Computer organizationishapadhy
 
Процессорын архитектур
Процессорын архитектурПроцессорын архитектур
Процессорын архитектурMuuluu
 
Instruction set and instruction execution cycle
Instruction set and instruction execution cycleInstruction set and instruction execution cycle
Instruction set and instruction execution cycleMkaur01
 
Computer architecture
Computer architectureComputer architecture
Computer architectureneclinux
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.CS_GDRCST
 
Computer organisation
Computer organisationComputer organisation
Computer organisationMohd Arif
 

What's hot (20)

Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Input & Output
Input & OutputInput & Output
Input & Output
 
Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
Data Manipulation
Data ManipulationData Manipulation
Data Manipulation
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5
 
Computer organization
Computer organizationComputer organization
Computer organization
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Lecture 38
Lecture 38Lecture 38
Lecture 38
 
Lecture 27
Lecture 27Lecture 27
Lecture 27
 
Processor Basics
Processor BasicsProcessor Basics
Processor Basics
 
Процессорын архитектур
Процессорын архитектурПроцессорын архитектур
Процессорын архитектур
 
Lecture 20
Lecture 20Lecture 20
Lecture 20
 
Instruction set and instruction execution cycle
Instruction set and instruction execution cycleInstruction set and instruction execution cycle
Instruction set and instruction execution cycle
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Data Manipulation
Data ManipulationData Manipulation
Data Manipulation
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
Computer organisation
Computer organisationComputer organisation
Computer organisation
 
Program control
Program controlProgram control
Program control
 

Viewers also liked

Viewers also liked (8)

Binary tree
Binary treeBinary tree
Binary tree
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
Lecture 16
Lecture 16Lecture 16
Lecture 16
 
3D X Point Innovation by Intel Corporation inc
3D X Point Innovation by Intel Corporation inc3D X Point Innovation by Intel Corporation inc
3D X Point Innovation by Intel Corporation inc
 
Intel Core i7 Processors
Intel Core i7 ProcessorsIntel Core i7 Processors
Intel Core i7 Processors
 
Lecture 47
Lecture 47Lecture 47
Lecture 47
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
Arrays
ArraysArrays
Arrays
 

Similar to Lecture 11

Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registersmahesh kumar prajapat
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registersmahesh kumar prajapat
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC  COMPUTER  ORGANIZATION  AND  DESIGNBASIC  COMPUTER  ORGANIZATION  AND  DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNDr. Ajay Kumar Singh
 
COA CHAPTER 5
COA CHAPTER 5COA CHAPTER 5
COA CHAPTER 5Mori77
 
BasicComputerOrganization and Architecture by Moriss Meno
BasicComputerOrganization and Architecture by Moriss MenoBasicComputerOrganization and Architecture by Moriss Meno
BasicComputerOrganization and Architecture by Moriss MenoRNShukla7
 
The Basic Organization of Computers
The Basic Organization of ComputersThe Basic Organization of Computers
The Basic Organization of ComputersTallat Satti
 
CS304PC:Computer Organization and Architecture Session 5 Basic Computer Orga...
CS304PC:Computer Organization and Architecture  Session 5 Basic Computer Orga...CS304PC:Computer Organization and Architecture  Session 5 Basic Computer Orga...
CS304PC:Computer Organization and Architecture Session 5 Basic Computer Orga...Asst.prof M.Gokilavani
 
Unit 1 computer architecture (1)
Unit 1   computer architecture (1)Unit 1   computer architecture (1)
Unit 1 computer architecture (1)DevaKumari Vijay
 
Computer Organization and Design.pptx
Computer Organization and Design.pptxComputer Organization and Design.pptx
Computer Organization and Design.pptxSherinRappai
 
embedded system and computer architecure
embedded system and computer architecureembedded system and computer architecure
embedded system and computer architecuremadhulbtech23
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)Mahesh Kumar Attri
 
the-cpu-design-central-processing-unit-design-1
the-cpu-design-central-processing-unit-design-1the-cpu-design-central-processing-unit-design-1
the-cpu-design-central-processing-unit-design-1Basel Mansour
 
Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2parthivrathodlits
 
pdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptpdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptSaurabhPorwal14
 

Similar to Lecture 11 (20)

Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
 
unit2 (1).ppt
unit2 (1).pptunit2 (1).ppt
unit2 (1).ppt
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
 
Ch5 official.ppt
Ch5 official.pptCh5 official.ppt
Ch5 official.ppt
 
Unit. 3 coa.ppt
Unit. 3 coa.pptUnit. 3 coa.ppt
Unit. 3 coa.ppt
 
Ca basic computer organization
Ca basic computer organizationCa basic computer organization
Ca basic computer organization
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC  COMPUTER  ORGANIZATION  AND  DESIGNBASIC  COMPUTER  ORGANIZATION  AND  DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGN
 
COA CHAPTER 5
COA CHAPTER 5COA CHAPTER 5
COA CHAPTER 5
 
BasicComputerOrganization and Architecture by Moriss Meno
BasicComputerOrganization and Architecture by Moriss MenoBasicComputerOrganization and Architecture by Moriss Meno
BasicComputerOrganization and Architecture by Moriss Meno
 
The Basic Organization of Computers
The Basic Organization of ComputersThe Basic Organization of Computers
The Basic Organization of Computers
 
CS304PC:Computer Organization and Architecture Session 5 Basic Computer Orga...
CS304PC:Computer Organization and Architecture  Session 5 Basic Computer Orga...CS304PC:Computer Organization and Architecture  Session 5 Basic Computer Orga...
CS304PC:Computer Organization and Architecture Session 5 Basic Computer Orga...
 
COA.pptx
COA.pptxCOA.pptx
COA.pptx
 
Unit 1 computer architecture (1)
Unit 1   computer architecture (1)Unit 1   computer architecture (1)
Unit 1 computer architecture (1)
 
Computer Organization and Design.pptx
Computer Organization and Design.pptxComputer Organization and Design.pptx
Computer Organization and Design.pptx
 
embedded system and computer architecure
embedded system and computer architecureembedded system and computer architecure
embedded system and computer architecure
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)
 
the-cpu-design-central-processing-unit-design-1
the-cpu-design-central-processing-unit-design-1the-cpu-design-central-processing-unit-design-1
the-cpu-design-central-processing-unit-design-1
 
Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2Computer Organization & Architecture (COA) Unit 2
Computer Organization & Architecture (COA) Unit 2
 
pdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptpdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.ppt
 
Register
RegisterRegister
Register
 

More from RahulRathi94 (20)

Lecture 46
Lecture 46Lecture 46
Lecture 46
 
Lecture 44
Lecture 44Lecture 44
Lecture 44
 
Lecture 43
Lecture 43Lecture 43
Lecture 43
 
Lecture 42
Lecture 42Lecture 42
Lecture 42
 
Lecture 41
Lecture 41Lecture 41
Lecture 41
 
Lecture 40
Lecture 40Lecture 40
Lecture 40
 
Lecture 39
Lecture 39Lecture 39
Lecture 39
 
Lecture 37
Lecture 37Lecture 37
Lecture 37
 
Lecture 36
Lecture 36Lecture 36
Lecture 36
 
Lecture 35
Lecture 35Lecture 35
Lecture 35
 
Lecture 28
Lecture 28Lecture 28
Lecture 28
 
Lecture 26
Lecture 26Lecture 26
Lecture 26
 
Lecture 25
Lecture 25Lecture 25
Lecture 25
 
Lecture 24
Lecture 24Lecture 24
Lecture 24
 
Lecture 23
Lecture 23Lecture 23
Lecture 23
 
Lecture 22
Lecture 22Lecture 22
Lecture 22
 
Lecture 21
Lecture 21Lecture 21
Lecture 21
 
Lecture 19
Lecture 19Lecture 19
Lecture 19
 
Lecture 17
Lecture 17Lecture 17
Lecture 17
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 

Recently uploaded

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Recently uploaded (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Lecture 11

  • 1. Basic Computer Orgsnization and Design 1 Lecture 11 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Overview Instruction Codes  Computer Registers  Computer Instructions  Timing and Control  Instruction Cycle  Memory Reference Instructions  Input-Output and Interrupt  Complete Computer Description
  • 2. Basic Computer Orgsnization and Design 2 Lecture 11 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Introduction • Every different processor type has its own design (different registers, buses, microoperations, machine instructions, etc) • Modern processor is a very complex device • It contains – Many registers – Multiple arithmetic units, for both integer and floating point calculations – The ability to pipeline several consecutive instructions to speed execution – Etc. • However, to understand how processors work, we will start with a simplified processor model
  • 3. Basic Computer Orgsnization and Design 3 Lecture 11 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Basic Computer • The Basic Computer has two components, a processor and memory • The memory has 4096 words in it – 4096 = 212, so it takes 12 bits to select a word in memory • Each word is 16 bits long CPU RAM 0 4095 015
  • 4. Basic Computer Orgsnization and Design 4 Lecture 11 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Instruction  Program  A sequence of (machine) instructions  (Machine) Instruction  A group of bits that tell the computer to perform a specific operation (a sequence of micro-operation)  The instructions of a program, along with any needed data are stored in memory  The CPU reads the next instruction from memory  It is placed in an Instruction Register (IR)  Control circuitry in control unit then translates the instruction into the sequence of microoperations necessary to implement it
  • 5. Basic Computer Orgsnization and Design 5 Lecture 11 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Instruction Format  A computer instruction is often divided into two parts  An opcode (Operation Code) that specifies the operation for that instruction  An address that specifies the registers and/or locations in memory to use for that operation  In the Basic Computer, since the memory contains 4096 (= 212) words, we needs 12 bit to specify which memory address this instruction will use  In the Basic Computer, bit 15 of the instruction specifies the addressing mode (0: direct addressing, 1: indirect addressing)  Since the memory words, and hence the instructions, are 16 bits long, that leaves 3 bits for the instruction’s opcode Opcode Address Instruction Format 15 14 12 0 I 11 Addressing mode
  • 6. Basic Computer Orgsnization and Design 6 Lecture 11 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Addressing Mode • The address field of an instruction can represent either – Direct address: the address in memory of the data to use (the address of the operand), or – Indirect address: the address in memory of the address in memory of the data to use • Effective Address (EA) – The address, that can be directly used without modification to access an operand for a computation-type instruction, or as the target address for a branch-type instruction 0 ADD 45722 Operand457 1 ADD 30035 1350300 Operand1350 + AC + AC Direct addressing Indirect addressing
  • 7. Basic Computer Orgsnization and Design 7 Lecture 11 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Processor Register  A processor has many registers to hold instructions, addresses, data, etc  The processor has a register, the Program Counter (PC) that holds the memory address of the next instruction to get Since the memory in the Basic Computer only has 4096 locations, the PC only needs 12 bits  In a direct or indirect addressing, the processor needs to keep track of what locations in memory it is addressing: The Address Register (AR) is used for this The AR is a 12 bit register in the Basic Computer  When an operand is found, using either direct or indirect addressing, it is placed in the Data Register (DR). The processor then uses this value as data for its operation  The Basic Computer has a single general purpose register – the Accumulator (AC)
  • 8. Basic Computer Orgsnization and Design 8 Lecture 11 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Processor Register  The significance of a general purpose register is that it can be referred to in instructions e.g. load AC with the contents of a specific memory location; store the contents of AC into a specified memory location  Often a processor will need a scratch register to store intermediate results or other temporary data; in the Basic Computer this is the Temporary Register (TR)  The Basic Computer uses a very simple model of input/output (I/O) operations Input devices are considered to send 8 bits of character data to the processor The processor can send 8 bits of character data to output devices  The Input Register (INPR) holds an 8 bit character gotten from an input device  The Output Register (OUTR) holds an 8 bit character to be send to an output device