SlideShare une entreprise Scribd logo
1  sur  29
Sunday, April 21, 2019 1
Basic Computer Organization and
Design
o Instruction Codes
o Computer Registers
o Computer Instructions
o Timing and Control
o Instruction Cycle
o Memory Reference Instructions
o Input-Output and Interrupt
Sunday, April 21, 2019 2
Instruction Codes
o A program is a set of instructions that specify
the operations, operands, and the sequence by
which processing has to occur.
o A computer instruction is a binary code that
specifies a sequence of micro-operations for
the computer.
o An instruction code is a group of bits that
instruct the computer to perform a specific
operation.
Sunday, April 21, 2019 3
Instruction Codes…
o Instruction format:
o Two major components of an instruction code:
oThe operation code (opcode)
oAddress
o An opcode specifies the operation for the instruction.
o An address specifies the registers and/or locations
in memory to use for that operation
Sunday, April 21, 2019 4
Opcode Address
Fig: Instruction Format
01115 14
I
12
Addressing
mode
Instruction Codes…
o Address Mode:
o The address field of an instruction represents
oDirect address: the address in memory of the data to use
(the address of the operand)
oIndirect address: the address in memory of the address
in memory of the data to use
Sunday, April 21, 2019 5
Basic Computer Registers
Sunday, April 21, 2019 6
Fig: Basic Processor
registers
Basic Computer Registers…
Fig: Registers
Connected to
Common Bus
Sunday, April 21, 2019 7
Computer Instructions
o The basic computer has three instruction code
formats:
Sunday, April 21, 2019 8
Computer Instructions…
Sunday, April 21, 2019 9
Fig: Basic Computer
Instructions
Computer Instructions…
o Instruction Types:
o Functional Instructions
o Arithmetic, logic, and shift instructions
o ADD, CMA, INC, CIR, CIL, AND, CLA
o Transfer Instructions
oData transfers between the main memory and the
processor registers
o LDA, STA
o Control Instructions
oProgram sequencing and control
o BUN, BSA, ISZ
o Input/Output Instructions
oInput and output
oINP, OUT
Sunday, April 21, 2019 10
Timing and Control
o Control Unit:
o Control units are implemented in one of two
ways:
o Hardwired Control
oCU is made up of sequential and combinational
circuits to generate the control signals
o Microprogrammed Control
oA control memory on the processor contains
microprograms that activate the necessary control
signals
Sunday, April 21, 2019 11
Timing and Control…
Sunday, April 21, 2019 12
Fig: Control unit of Basic Computer
Timing and Control…
o Timing Signal:
o Example: T0, T1, T2, T3, T4, T0, T1, . . .
Assume: At time T4, SC is cleared to 0 if decoder
output D3 is active.
Sunday, April 21, 2019 13
Clock
T0 T1 T2 T3 T4 T0
T0
T1
T2
T3
T4
D3
CLR
SC
D3T4: SC  0
Instruction Cycle
o In the basic computer each instruction cycle
consists:
i. Fetch an instruction from memory
ii. Decode the instruction
iii. Read the effective address from memory if the
instruction has an indirect address.
iv. Execute the instruction.
Sunday, April 21, 2019 14
Instruction Cycle…
o Fetch and Decode
Sunday, April 21, 2019 15
T0: AR PC (S0S1S2=010, T0=1)
T1: IR  M [AR], PC  PC + 1 (S0S1S2=111, T1=1)
T2: D0, . . . , D7  Decode IR(12-14), AR  IR(0-11), I  IR(15)
Instruction Cycle…
o Determine the Type of Instruction
Sunday, April 21, 2019 16
D'7IT3: AR M[AR]
D'7I'T3: Nothing
D7I'T3: Execute a register-reference instr.
D7IT3: Execute an input-output instr.
Instruction Cycle…
o Register Reference Instructions
Sunday, April 21, 2019 17
Instruction Micro-operation Description
D7l'T3: SC 0 Clear SC
CLA D7l'T3IR(11):AC0 Clear AC
CLE D7l'T3IR(10):E0 Clear E
CMA D7l'T3IR(9):AC (AC)’ Complement AC
CME D7l'T3IR(8): E (E)’ Complement E
CIR D7l'T3IR(7): ACshr AC, AC(I5)E, EAC(0) Circulate right
CIL D7l'T3IR(6): ACshl AC, AC(0) E, EAC(I5) Circulate left
INC D7l'T3IR(5):ACAC+1 Increment AC
SPA D7l'T3IR(4): If (AC(I5) = 0) then (PCPC +1) Skip if positive
SNA D7l'T3IR(3): If (AC(I5) = 1) then (PCPC +1) Skip if negative
SZA D7l'T3IR(2): If (AC = 0) then (PCPC +1) Skip if AC zero
SZE D7l'T3IR(1): If (E = 0) then (PCPC +1) Skip if E zero
HLT D7l'T3IR(0): S 0 (Sis a start-stop flip-flop) Halt computer
Instruction Cycle…
o Memory Reference Instruction
Sunday, April 21, 2019 18
Symbol
Operation
Decoder Symbolic Description
AND D0 AC  AC  M[AR]
ADD D1 AC  AC + M[AR], E  Cout
LDA D2 AC  M[AR]
STA D3 M[AR]  AC
BUN D4 PC  AR
BSA D5 M[AR]  PC, PC  AR + 1
ISZ D6 M[AR]  M[AR] + 1, if M[AR] + 1 = 0 then PC  PC+1
AND to AC
D0T4: DR  M[AR] Read operand
D0T5: AC  AC  DR, SC  0 AND with AC
ADD to AC
D1T4: DR  M[AR] Read operand
D1T5: AC  AC + DR, E  Cout, SC  0 Add to AC and store carry in E
Instruction Cycle…
o Memory Reference Instruction…
Sunday, April 21, 2019 19
LDA: Load to AC
D2T4: DR  M[AR]
D2T5: AC  DR, SC  0
STA: Store AC
D3T4: M[AR]  AC, SC  0
BUN: Branch Unconditionally
D4T4: PC  AR, SC  0
BSA: Branch and Save Return Address
M[AR]  PC, PC  AR + 1
D5T4: M[AR]  PC, AR  AR + 1
D5T5: PC  AR, SC  0
ISZ: Increment and Skip-if-Zero
D6T4: DR  M[AR]
D6T5: DR  DR + 1
D6T4: M[AR]  DR, if (DR = 0) then (PC  PC + 1), SC  0
Instruction Cycle…
o Flowchart For Memory Reference Instructions
Sunday, April 21, 2019 20
Input-output and Interrupt
o Input and output instructions are needed for
transferring information to and from AC
register.
o for checking the flag bits, and
o for controlling the interrupt facility.
o Note: Input-output instructions have an
operation code 1111 and are recognized by the
control when D7 = 1 and I = 1.
Sunday, April 21, 2019 21
Input-Output and Interrupts…
o Input-Output Instructions…
Sunday, April 21, 2019 22
D7IT3 = p
IR(i) = Bi, i = 6, …, 11
p: SC  0 Clear SC
INP pB11: AC(0-7)  INPR, FGI  0 Input char. to AC
OUT pB10: OUTR  AC(0-7), FGO  0 Output char. from AC
SKI pB9: if(FGI = 1) then (PC  PC + 1) Skip on input flag
SKO pB8: if(FGO = 1) then (PC  PC + 1) Skip on output flag
ION pB7: IEN  1 Interrupt enable on
IOF pB6: IEN  0 Interrupt enable off
INPR Input register - 8 bits
OUTR Output register - 8 bits
FGI Input flag - 1 bit
FGO Output flag - 1 bit
IEN Interrupt enable - 1 bit
Input-Output and Interrupts…
o External events can force the computer to quit
the normal program flow to react fast on the
events. Such event that requires fast response by
the computer is called interrupt.
o interrupt routine: The collection of
instructions that have to be executed to respond
to the interrupt
Sunday, April 21, 2019 23
o IEN (Interrupt-enable flip-flop)
o can be set and cleared by instructions
o when cleared, the computer cannot be interrupted
Input-Output and Interrupts…
o Flowchart for Interrupt Cycle
Sunday, April 21, 2019 24
Programming the Basic Computer
o Introduction
o Machine Language
o Assembly Language
o Programming Arithmetic and Logic Operations
Sunday, April 21, 2019 25
Introduction
o Instruction Set of the Basic Computer
Sunday, April 21, 2019 26
m: effective address
M: memory word
(operand) found at m
Introduction…
o Types of programming language:
o Machine language: 1’s and 0’s (Binary code),
Octal, and Hexadecimal code
o Assembly language: symbolic Code
o High-level language
Sunday, April 21, 2019 27
Machine Language
o Comparison of Programming Languages
Sunday, April 21, 2019 28
Sunday, April 21, 2019 29

Contenu connexe

Tendances

Stack organization
Stack organizationStack organization
Stack organizationchauhankapil
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)rishi ram khanal
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference InstructionsRabin BK
 
Computer instructions
Computer instructionsComputer instructions
Computer instructionsAnuj Modi
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC  COMPUTER  ORGANIZATION  AND  DESIGNBASIC  COMPUTER  ORGANIZATION  AND  DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGNDr. Ajay Kumar Singh
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycleutsav_shah
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modesRamaPrabha24
 
Cache memory
Cache memoryCache memory
Cache memoryAnuj Modi
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing ModesMayank Garg
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set ArchitectureDilum Bandara
 
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...priya Nithya
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and DesignKamal Acharya
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle pptsheetal singh
 

Tendances (20)

Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
Stack organization
Stack organizationStack organization
Stack organization
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
Computer instructions
Computer instructionsComputer instructions
Computer instructions
 
Modes of transfer
Modes of transferModes of transfer
Modes of transfer
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC  COMPUTER  ORGANIZATION  AND  DESIGNBASIC  COMPUTER  ORGANIZATION  AND  DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGN
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycle
 
Lecture 3 instruction set
Lecture 3  instruction setLecture 3  instruction set
Lecture 3 instruction set
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modes
 
Cache memory
Cache memoryCache memory
Cache memory
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing Modes
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set Architecture
 
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
Modes of transfer - Computer Organization & Architecture - Nithiyapriya Pasav...
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
 

Similaire à Basic Computer Organization and Design

Basic computer organization design
Basic computer organization designBasic computer organization design
Basic computer organization designndasharath
 
IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...
IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...
IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...IRJET Journal
 
Computer Organization
Computer OrganizationComputer Organization
Computer OrganizationHaripritha
 
Basic computer organisation design
Basic computer organisation designBasic computer organisation design
Basic computer organisation designSanjeev Patel
 
Computer instruction
Computer instructionComputer instruction
Computer instructionSanjeev Patel
 
Introduction to 8085 microprocessor
Introduction to 8085 microprocessorIntroduction to 8085 microprocessor
Introduction to 8085 microprocessorvenkateshkannat
 
Computer Architecture - Data Path & Pipeline Hazards
Computer Architecture - Data Path & Pipeline HazardsComputer Architecture - Data Path & Pipeline Hazards
Computer Architecture - Data Path & Pipeline HazardsThyagharajan K.K.
 
Computer Architecture – An Introduction
Computer Architecture – An IntroductionComputer Architecture – An Introduction
Computer Architecture – An IntroductionDilum Bandara
 
IMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETERIMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETERVijay Elavunkal
 
Xcs 234 microprocessors
Xcs 234 microprocessorsXcs 234 microprocessors
Xcs 234 microprocessorssweta suman
 

Similaire à Basic Computer Organization and Design (20)

Memory Reference instruction
Memory Reference instructionMemory Reference instruction
Memory Reference instruction
 
Basic computer organization design
Basic computer organization designBasic computer organization design
Basic computer organization design
 
CAAL_CCSU_U1.pdf
CAAL_CCSU_U1.pdfCAAL_CCSU_U1.pdf
CAAL_CCSU_U1.pdf
 
IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...
IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...
IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...
 
Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
Basic computer organisation design
Basic computer organisation designBasic computer organisation design
Basic computer organisation design
 
Computer instruction
Computer instructionComputer instruction
Computer instruction
 
PLC Training Intro
PLC Training IntroPLC Training Intro
PLC Training Intro
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
Introduction to 8085 microprocessor
Introduction to 8085 microprocessorIntroduction to 8085 microprocessor
Introduction to 8085 microprocessor
 
Computer Architecture - Data Path & Pipeline Hazards
Computer Architecture - Data Path & Pipeline HazardsComputer Architecture - Data Path & Pipeline Hazards
Computer Architecture - Data Path & Pipeline Hazards
 
Computer Architecture – An Introduction
Computer Architecture – An IntroductionComputer Architecture – An Introduction
Computer Architecture – An Introduction
 
Ca basic computer organization
Ca basic computer organizationCa basic computer organization
Ca basic computer organization
 
Lecture 17
Lecture 17Lecture 17
Lecture 17
 
IMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETERIMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETER
 
Xcs 234 microprocessors
Xcs 234 microprocessorsXcs 234 microprocessors
Xcs 234 microprocessors
 
Lecture 19
Lecture 19Lecture 19
Lecture 19
 
a simple bcd counter project
a simple bcd counter projecta simple bcd counter project
a simple bcd counter project
 
Dee2034 chapter 6 register
Dee2034 chapter 6 registerDee2034 chapter 6 register
Dee2034 chapter 6 register
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 

Plus de Aksum Institute of Technology(AIT, @Letsgo)

Ns lecture4: Introduction to Virtual Network Protocol(VPN) and Internet Proto...
Ns lecture4: Introduction to Virtual Network Protocol(VPN) and Internet Proto...Ns lecture4: Introduction to Virtual Network Protocol(VPN) and Internet Proto...
Ns lecture4: Introduction to Virtual Network Protocol(VPN) and Internet Proto...Aksum Institute of Technology(AIT, @Letsgo)
 

Plus de Aksum Institute of Technology(AIT, @Letsgo) (13)

Ns lecture5: Introduction to Computer, Information, and Network Security.
Ns lecture5: Introduction to Computer, Information, and Network Security.Ns lecture5: Introduction to Computer, Information, and Network Security.
Ns lecture5: Introduction to Computer, Information, and Network Security.
 
Ns lecture4: Introduction to Virtual Network Protocol(VPN) and Internet Proto...
Ns lecture4: Introduction to Virtual Network Protocol(VPN) and Internet Proto...Ns lecture4: Introduction to Virtual Network Protocol(VPN) and Internet Proto...
Ns lecture4: Introduction to Virtual Network Protocol(VPN) and Internet Proto...
 
Ns lecture3: Introduction to Multi Protocol Label Switching(MPLS)
Ns lecture3: Introduction to Multi Protocol Label Switching(MPLS) Ns lecture3: Introduction to Multi Protocol Label Switching(MPLS)
Ns lecture3: Introduction to Multi Protocol Label Switching(MPLS)
 
Ns lecture2: Introduction to LAN Technology
Ns lecture2: Introduction to LAN TechnologyNs lecture2: Introduction to LAN Technology
Ns lecture2: Introduction to LAN Technology
 
Ns lecture1: Introduction to Routing Protocol
Ns lecture1: Introduction to Routing ProtocolNs lecture1: Introduction to Routing Protocol
Ns lecture1: Introduction to Routing Protocol
 
Logic Simulation, Modeling, and Testing
Logic Simulation, Modeling, and TestingLogic Simulation, Modeling, and Testing
Logic Simulation, Modeling, and Testing
 
Introduction to VHDL
Introduction to VHDLIntroduction to VHDL
Introduction to VHDL
 
ASIC vs FPGA
ASIC vs FPGAASIC vs FPGA
ASIC vs FPGA
 
Asic design
Asic designAsic design
Asic design
 
Introduction to network security and lan technology
Introduction to network security and lan technologyIntroduction to network security and lan technology
Introduction to network security and lan technology
 
Weather Forecasting using Deep Learning A lgorithm for the Ethiopian Context
Weather Forecasting using Deep Learning A lgorithm for the Ethiopian ContextWeather Forecasting using Deep Learning A lgorithm for the Ethiopian Context
Weather Forecasting using Deep Learning A lgorithm for the Ethiopian Context
 
Globus and Gridbus
Globus and GridbusGlobus and Gridbus
Globus and Gridbus
 
Globus ppt
Globus pptGlobus ppt
Globus ppt
 

Dernier

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 

Dernier (20)

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 

Basic Computer Organization and Design

  • 2. Basic Computer Organization and Design o Instruction Codes o Computer Registers o Computer Instructions o Timing and Control o Instruction Cycle o Memory Reference Instructions o Input-Output and Interrupt Sunday, April 21, 2019 2
  • 3. Instruction Codes o A program is a set of instructions that specify the operations, operands, and the sequence by which processing has to occur. o A computer instruction is a binary code that specifies a sequence of micro-operations for the computer. o An instruction code is a group of bits that instruct the computer to perform a specific operation. Sunday, April 21, 2019 3
  • 4. Instruction Codes… o Instruction format: o Two major components of an instruction code: oThe operation code (opcode) oAddress o An opcode specifies the operation for the instruction. o An address specifies the registers and/or locations in memory to use for that operation Sunday, April 21, 2019 4 Opcode Address Fig: Instruction Format 01115 14 I 12 Addressing mode
  • 5. Instruction Codes… o Address Mode: o The address field of an instruction represents oDirect address: the address in memory of the data to use (the address of the operand) oIndirect address: the address in memory of the address in memory of the data to use Sunday, April 21, 2019 5
  • 6. Basic Computer Registers Sunday, April 21, 2019 6 Fig: Basic Processor registers
  • 7. Basic Computer Registers… Fig: Registers Connected to Common Bus Sunday, April 21, 2019 7
  • 8. Computer Instructions o The basic computer has three instruction code formats: Sunday, April 21, 2019 8
  • 9. Computer Instructions… Sunday, April 21, 2019 9 Fig: Basic Computer Instructions
  • 10. Computer Instructions… o Instruction Types: o Functional Instructions o Arithmetic, logic, and shift instructions o ADD, CMA, INC, CIR, CIL, AND, CLA o Transfer Instructions oData transfers between the main memory and the processor registers o LDA, STA o Control Instructions oProgram sequencing and control o BUN, BSA, ISZ o Input/Output Instructions oInput and output oINP, OUT Sunday, April 21, 2019 10
  • 11. Timing and Control o Control Unit: o Control units are implemented in one of two ways: o Hardwired Control oCU is made up of sequential and combinational circuits to generate the control signals o Microprogrammed Control oA control memory on the processor contains microprograms that activate the necessary control signals Sunday, April 21, 2019 11
  • 12. Timing and Control… Sunday, April 21, 2019 12 Fig: Control unit of Basic Computer
  • 13. Timing and Control… o Timing Signal: o Example: T0, T1, T2, T3, T4, T0, T1, . . . Assume: At time T4, SC is cleared to 0 if decoder output D3 is active. Sunday, April 21, 2019 13 Clock T0 T1 T2 T3 T4 T0 T0 T1 T2 T3 T4 D3 CLR SC D3T4: SC  0
  • 14. Instruction Cycle o In the basic computer each instruction cycle consists: i. Fetch an instruction from memory ii. Decode the instruction iii. Read the effective address from memory if the instruction has an indirect address. iv. Execute the instruction. Sunday, April 21, 2019 14
  • 15. Instruction Cycle… o Fetch and Decode Sunday, April 21, 2019 15 T0: AR PC (S0S1S2=010, T0=1) T1: IR  M [AR], PC  PC + 1 (S0S1S2=111, T1=1) T2: D0, . . . , D7  Decode IR(12-14), AR  IR(0-11), I  IR(15)
  • 16. Instruction Cycle… o Determine the Type of Instruction Sunday, April 21, 2019 16 D'7IT3: AR M[AR] D'7I'T3: Nothing D7I'T3: Execute a register-reference instr. D7IT3: Execute an input-output instr.
  • 17. Instruction Cycle… o Register Reference Instructions Sunday, April 21, 2019 17 Instruction Micro-operation Description D7l'T3: SC 0 Clear SC CLA D7l'T3IR(11):AC0 Clear AC CLE D7l'T3IR(10):E0 Clear E CMA D7l'T3IR(9):AC (AC)’ Complement AC CME D7l'T3IR(8): E (E)’ Complement E CIR D7l'T3IR(7): ACshr AC, AC(I5)E, EAC(0) Circulate right CIL D7l'T3IR(6): ACshl AC, AC(0) E, EAC(I5) Circulate left INC D7l'T3IR(5):ACAC+1 Increment AC SPA D7l'T3IR(4): If (AC(I5) = 0) then (PCPC +1) Skip if positive SNA D7l'T3IR(3): If (AC(I5) = 1) then (PCPC +1) Skip if negative SZA D7l'T3IR(2): If (AC = 0) then (PCPC +1) Skip if AC zero SZE D7l'T3IR(1): If (E = 0) then (PCPC +1) Skip if E zero HLT D7l'T3IR(0): S 0 (Sis a start-stop flip-flop) Halt computer
  • 18. Instruction Cycle… o Memory Reference Instruction Sunday, April 21, 2019 18 Symbol Operation Decoder Symbolic Description AND D0 AC  AC  M[AR] ADD D1 AC  AC + M[AR], E  Cout LDA D2 AC  M[AR] STA D3 M[AR]  AC BUN D4 PC  AR BSA D5 M[AR]  PC, PC  AR + 1 ISZ D6 M[AR]  M[AR] + 1, if M[AR] + 1 = 0 then PC  PC+1 AND to AC D0T4: DR  M[AR] Read operand D0T5: AC  AC  DR, SC  0 AND with AC ADD to AC D1T4: DR  M[AR] Read operand D1T5: AC  AC + DR, E  Cout, SC  0 Add to AC and store carry in E
  • 19. Instruction Cycle… o Memory Reference Instruction… Sunday, April 21, 2019 19 LDA: Load to AC D2T4: DR  M[AR] D2T5: AC  DR, SC  0 STA: Store AC D3T4: M[AR]  AC, SC  0 BUN: Branch Unconditionally D4T4: PC  AR, SC  0 BSA: Branch and Save Return Address M[AR]  PC, PC  AR + 1 D5T4: M[AR]  PC, AR  AR + 1 D5T5: PC  AR, SC  0 ISZ: Increment and Skip-if-Zero D6T4: DR  M[AR] D6T5: DR  DR + 1 D6T4: M[AR]  DR, if (DR = 0) then (PC  PC + 1), SC  0
  • 20. Instruction Cycle… o Flowchart For Memory Reference Instructions Sunday, April 21, 2019 20
  • 21. Input-output and Interrupt o Input and output instructions are needed for transferring information to and from AC register. o for checking the flag bits, and o for controlling the interrupt facility. o Note: Input-output instructions have an operation code 1111 and are recognized by the control when D7 = 1 and I = 1. Sunday, April 21, 2019 21
  • 22. Input-Output and Interrupts… o Input-Output Instructions… Sunday, April 21, 2019 22 D7IT3 = p IR(i) = Bi, i = 6, …, 11 p: SC  0 Clear SC INP pB11: AC(0-7)  INPR, FGI  0 Input char. to AC OUT pB10: OUTR  AC(0-7), FGO  0 Output char. from AC SKI pB9: if(FGI = 1) then (PC  PC + 1) Skip on input flag SKO pB8: if(FGO = 1) then (PC  PC + 1) Skip on output flag ION pB7: IEN  1 Interrupt enable on IOF pB6: IEN  0 Interrupt enable off INPR Input register - 8 bits OUTR Output register - 8 bits FGI Input flag - 1 bit FGO Output flag - 1 bit IEN Interrupt enable - 1 bit
  • 23. Input-Output and Interrupts… o External events can force the computer to quit the normal program flow to react fast on the events. Such event that requires fast response by the computer is called interrupt. o interrupt routine: The collection of instructions that have to be executed to respond to the interrupt Sunday, April 21, 2019 23 o IEN (Interrupt-enable flip-flop) o can be set and cleared by instructions o when cleared, the computer cannot be interrupted
  • 24. Input-Output and Interrupts… o Flowchart for Interrupt Cycle Sunday, April 21, 2019 24
  • 25. Programming the Basic Computer o Introduction o Machine Language o Assembly Language o Programming Arithmetic and Logic Operations Sunday, April 21, 2019 25
  • 26. Introduction o Instruction Set of the Basic Computer Sunday, April 21, 2019 26 m: effective address M: memory word (operand) found at m
  • 27. Introduction… o Types of programming language: o Machine language: 1’s and 0’s (Binary code), Octal, and Hexadecimal code o Assembly language: symbolic Code o High-level language Sunday, April 21, 2019 27
  • 28. Machine Language o Comparison of Programming Languages Sunday, April 21, 2019 28
  • 29. Sunday, April 21, 2019 29