SlideShare a Scribd company logo
1 of 41
Basic Computer
Organization and Design
Computer Organization & Architecture - MODULE 3
PART 2
www.teachics.org
Instruction Cycle
Instruction Cycle
โ— A program consists of a sequence of instructions is executed in the computer by going through a
cycle for each instruction.
โ— Each instruction cycle in turn is subdivided into a sequence of subcycles or phases
โ— They are
a. Fetch an instruction from memory.
b. Decode the instruction.
c. Read the effective address from memory if the instruction has an indirect address.
d. Execute the instruction.
โ— Upon the completion of step 4, the control goes back to step 1 to fetch, decode, and execute the
next instruction.
โ— This process continues indefinitely unless a HALT instruction is encountered.
Fetch & Decode
โ— Initially, the program counter PC is loaded with the address of the first instruction in the program.
โ— SC is cleared to 0, providing a decoded timing signal T0.
โ— After each clock pulse, SC is incremented by one, so that the timing signals go through a
sequence T0, T1, T2, and so on.
โ— The microoperations for the fetch and decode phases are
โ—‹ T0: AR โ† PC
โ—‹ T1: IR โ† M [AR], PC โ† PC+1
โ—‹ T2: D0,. . . , D7 โ† Decode IR(12โ€“14), AR โ† IR(0-11), I โ† IR(15)
Fetch & Decode
โ— During T0 the address is transferred from PC to AR.
โ— At T1 The instruction read from memory is placed in the instruction register IR and PC is
incremented by one to prepare it for the address of the next instruction.
โ— At time T2, the op-code in IR is decoded, the indirect bit is transferred to flip-flop I, and the
address part of the instruction is transferred to AR.
โ— Note that SC is incremented after each clock pulse to produce the sequence T0, T1, and T2.
Determine the Type of Instruction
โ— During time T3, the control unit determines the type of instruction that was just read from
memory.
โ— Memory Reference Instructions
โ—‹ If D7=0, the op-code will be 000 through 110
โ—‹ If D7 =0 and I =1 - memory reference instruction with an indirect address.
โ—‹ The micro-operation for the indirect address condition can be symbolized by
AR โ† M [AR].
โ— Register Reference or I/O Instructions
โ—‹ If D7 =1 and I=0 - Register Reference Instruction.
โ—‹ If D7 =1 and I=1 - I/O Instruction.
โ— The three instruction types are subdivided into four separate paths.
โ— The selected operation is activated with T3.
โ—‹ D7โ€™ IT3 : AR โ† M[AR].
โ—‹ D7โ€™ IT3 : Nothing.
โ—‹ D7 Iโ€™T3 : Execute a register-reference instruction.
โ—‹ D7 IT3 : Execute an inputโ€“output instruction.
Memory Reference Instruction
Memory Reference Instruction
โ— Memory reference instructions performs operation with memory operand.
โ— Execution of memory reference instruction starts with timing signal T4.
โ— There are 7 memory instruction.
AND to AC
โ— Performs AND logic operation on pairs of
bits in AC and the memory word
specified by effective address.
โ— The result of operation is transferred to
AC.
โ— D0T4: DR โ† M [AR]
D0T5: AC โ† AC ^ DR, SC โ† 0
ADD to AC
โ— Adds the content of the memory word
specified by the effective address to the
value of AC.
โ— Sum is transferred to AC and output
carry Cout is transferred into E
(Extended accumulator flipflop)
โ— D1T4: DR โ† M [AR]
D1T5: AC โ† AC ^ DR, E โ† Cout, SC โ†
0
LDA : Load to AC
โ— Transfers the memory word specified by
the effective address to AC.
โ— D2T4: DR โ† M [AR]
D2T5: AC โ† DR, SC โ† 0
STA : Store to AC
โ— Stores the content of AC into the
memory word specified by the effective
address.
โ— D3T4: M [AR] โ† AC, SC โ† 0
BUN : Branch
Unconditionally
โ— Transfers the program to the instruction
specified by the effective address.
โ— D4T4: PC โ† AR, SC โ† 0
ISZ: Increment and Skip if
Zero
โ— Increments the word specified by the
effective address, and if the
incremented value is equal to 0, PC is
incremented by 1 in order to skip the
next instruction in the program.
โ— D6T4: DR โ† M [AR]
D6T5: DR โ† DR+1
D6T6: M [AR] โ† DR, if (DR 0) then (PC
โ† PC 1), SC โ† 0
BSA : Branch and Save Return Address
โ— Used for branching to a portion of the
program called a subroutine or procedure.
โ— It stores the address of the next instruction
into a memory location specified by the
effective address.
โ— The effective address plus one is
transferred to PC to serve as the address of
the first instruction in the subroutine.
โ— D5T4: M [AR] โ† PC, AR โ† AR + 1
D5T5: PC โ† AR, SC โ† 0
Register Reference Instructions
Register Reference Instructions
โ— It specifies an operation on or test of the Accumulator.
โ— An operand from memory is not needed.
โ— So bits 0-11 bits the operation to be executed.
โ— They are recognized by the control when D7 = 1 and I = 0.
โ— Execution start with the timing signal T3.
โ— Each control function needs the Boolean relation D7IT3 and is represented by the symbol r.
โ— By assigning the symbol B, to bit i of IR(0-11), all control functions can be simply denoted by rBi.
Input and Output
Communication
Inputโ€“Output Communication
โ— A computer can serve no useful purpose unless it communicates with the external environment.
โ— Instructions and data stored in memory must come from some input device.
โ— Computational results must be transmitted to the user through some output device.
โ— To demonstrate the most basic requirements for input and output communication, we will use as
an illustration a terminal unit with a keyboard and printer.
Input-Output Configuration
โ— Terminal sends and receives information
(eight bits of an alphanumeric code).
โ— The serial information from the keyboard is
shifted into the input register INPR.
โ— The serial information for the printer is
stored in the output register OUTR.
โ— Both INPR and OUTR consists of eight bits.
Input-Output Configuration
โ— INPR and OUTR communicate with a
communication interface serially and with
the AC in parallel.
โ— The transmitter interface receives serial
information from the keyboard and transmits
it to INPR.
โ— The receiver interface receives information
from OUTR and sends it to the printer.
Input-Output Configuration
โ— The 1-bit input flag FGI is a control flip-flop.
โ— The flag bit is set to 1 when new information
is available in the input device and is
cleared to 0 when the information is
accepted by the computer.
โ— Initially, the input flag FGI is cleared to 0.
โ— When a key is struck, an 8-bit code is
shifted into INPR and FGI is set to 1.
โ— When another key is striked, the computer
checks the flag bit; if it is 1, the information
from INPR is transferred to AC and FGI is
cleared to 0.
Input-Output Configuration
โ— Initially, the output flag FGO is set to 1.
โ— The computer checks the flag bit; if it is 1,
the information from AC is transferred in
parallel to OUTR and FGO is cleared to 0.
โ— The output device accepts information,
prints the corresponding character, and
when the operation is completed, it sets
FGO to 1.
โ— The computer does not load a new
character into OUTR when FGO is 0. (Busy
printing)
Input-Output Instructions
โ— Needed for
โ—‹ transferring information to and from AC register.
โ—‹ for checking the flag bits.
โ—‹ for controlling the interrupt facility.
โ— Recognized by the control when D7 =1 and I =1.
โ— The remaining bits(0-11) of the instruction specify the particular operation.
โ— Executed with the clock transition associated with timing signal T3.
โ— Each control function needs a Boolean relation D7IT3, and is represented by the symbol p.
โ— By assigning the symbol Bi to bit i of IR, all control functions can be denoted by pBi for i = 6
through 11.
Input-Output Instructions
Program Interrupt
Need for Interrupt
โ— In basic case (Programmed control transfer), the computer keeps checking the flag bit, and when
it finds it set, it initiates an information transfer.
โ— This type of transfer is inefficient because of the difference of information flow rate between the
computer and that of the inputโ€“output device.
โ— The computer is wasting time while checking the flag instead of doing some other useful
processing task.
Program Interrupt
โ— An alternative to the programmed controlled procedure is to let the external device inform the
computer when it is ready for the transfer.
โ— In the meantime the computer can be busy with other tasks.
โ— This type of transfer uses the interrupt facility.
โ— While the computer is running a program, it does not check the flags.
โ— When a flag is set, the computer is interrupted from proceeding with the current program.
โ— The computer stops what it is doing to take care of the input or output transfer.
โ— It then returns to the current program to continue what it was doing before the interrupt
Program Interrupt
โ— The interrupt facility can be enabled or disabled by a flip-flop IEN.
โ— The interrupt enable flip-flop IEN can be set and cleared with two instructions (IOF, ION).
โ—‹ When IEN is cleared to 0 (with the IOF instruction), the flags cannot interrupt the
computer.
โ—‹ When IEN is set to 1 (with the ION instruction), the computer can be interrupted.
โ— An interrupt flip-flop R is included in the computer to decide when to go through the interrupt
cycle.
โ— So the computer is either in an instruction cycle or in an interrupt cycle.
Interrupt Cycle
โ— When R = 0, the computer goes through an
instruction cycle.
โ— During the execute phase IEN is checked. If it
is 0, control continues with the next
instruction cycle.
โ— If IEN = 1, control checks the flag bits. If both
flags are 0, control continues with the next
instruction cycle.
โ— If either flag is set to 1 while IEN = 1, R is set
to 1 and control goes to an interrupt cycle.
Interrupt Cycle
โ— The interrupt cycle is a hardware
implementation of a branch and save return
address operation.
โ— The return address in PC is stored in a specific
location. (Here address 0)
โ— Control then inserts address 1 into PC and
clears IEN and R so that no more interruptions
can occur until the interrupt request serviced
and flag has been set.
โ— Micro-operations
โ—‹ RT0: AR โ† 0, TR โ† PC
โ—‹ RT1: M [AR] โ† TR, PC โ† 0
โ—‹ RT2: PC โ† PC 1, IEN โ† 0, R โ† 0, SC
โ† 0
Design of Basic Computer
Design of Basic Computer
The basic computer consists of the following hardware components:
1. A memory unit with 4096 words of 16 bits each.
2. Nine registers: AR, PC, DR, AC, IR, TR, OUTR, INPR, and SC.
3. Seven flip-flops: I, S, E, R, IEN, FGI, and FGO.
4. Two decoders: a 3x8 operation decoder and a 4x16 timing decoder.
5. A 16-bit common bus.
6. Control logic gates.
7. Adder and logic circuit connected to the input of AC.
Design of Basic Computer
Control Logic Gates
โ— The inputs to this circuit come from
โ—‹ two decoders
โ—‹ I flip-flop
โ—‹ bits 0 through 11 of IR.
โ— The other inputs to the control logic are
โ—‹ AC bits 0 through 15 to check if AC =0
and to detect the sign bit in AC(15)
โ—‹ DR bits 0 through 15 to check if DR= 0
โ—‹ The values of the seven flip-flops.
โ— The outputs of the control logic circuit are
โ—‹ Signals to control the inputs of the
nine registers
โ—‹ Signals to control the read and write
inputs of memory
โ—‹ Signals to set, clear, or complement
the flip-flops
โ—‹ Signals for S2, S1, and S0 to select a
register for the bus
โ—‹ Signals to control the AC adder and
logic circuit
Control of Registers and Memory
โ— The control inputs of the registers are LD (load), INR (increment), and CLR (clear).
โ— Eg: To derive the gate structure associated with the control inputs of AR.
Find all the statements that change the content of AR
Rโ€™T0: AR โ† PC
Rโ€™T2: AR โ† IR(0โ€“11)
D7โ€™IT3: AR โ† M [AR]
RT0: AR โ† 0
D5T4: AR โ† AR + 1
โ— The control functions can be combined into three Boolean expressions as follows
LD(AR) = Rโ€™T0 + Rโ€™T2 + D7โ€™IT3
CLR(AR) = RT0
INR(AR) = D5T4
Control of Common Bus
โ— The 16-bit common bus is controlled by the selection inputs S2, S1, and S0.
โ— The decimal number shown with each bus input specifies the equivalent binary number that must
be applied to the selection inputs in order to select the corresponding register.
โ— For example, when x1 = 1, the value of S2S1S0 must be 001 and the output of AR will be selected
for the bus.
Control of Common Bus
โ— The Boolean functions for the encoder are
S0 = x1 + x3 + x5 + x7
S1 = x2 + x3 + x6 + x7
S2 = x4 + x5 + x6 + x7
โ— To determine the logic for each encoder input, it is necessary to find the control functions that
place the corresponding register onto the bus.
โ— For example, to find the logic that makes x1 = 1, we scan all register transfer statements in and
extract those statements that have AR as a source.
D4T4: PC โ† AR
D5T5: PC โ† AR
Therefore, the Boolean function for x1 is, x1 = D4T4 D5T5
โ— In a similar manner we can determine the gate logic for the other registers.
Design of Accumulator Logic
Design of Accumulator Logic
โ— The adder and logic circuit has three sets of inputs.
โ—‹ 16 inputs comes from the outputs of AC.
โ—‹ 16 inputs comes from the data register DR.
โ—‹ eight inputs comes from the input register INPR.
โ— The outputs of the adder and logic circuit provide the data inputs for the register.
Design of Accumulator Logic
โ— In order to design the logic associated with AC, extract all the statements that change the content
of AC.
D0T5: AC โ† AC ^ DR
D1T5: AC โ† AC + DR
D2T5: AC โ† DR
pB11: AC(07) โ† INPR
rB9: AC โ† AC
rB7: AC โ† shr AC, AC(15) โ† E
rB6: AC โ† shl AC, AC(0) โ† E
rB11: AC โ† 0
rB5: AC โ† AC + 1
โ— From this list we can derive the control logic gates and the adder and Logic circuit.

More Related Content

Similar to COA Module 3 PART 2.pptx

material for studentbasic computer organization and design .pptx
material for studentbasic computer organization and design .pptxmaterial for studentbasic computer organization and design .pptx
material for studentbasic computer organization and design .pptxjainyshah20
ย 
UNIT 5.pptx
UNIT 5.pptxUNIT 5.pptx
UNIT 5.pptxBASKARS53
ย 
20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptx20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptxPerumalPitchandi
ย 
Digital-Unit-III.ppt
Digital-Unit-III.pptDigital-Unit-III.ppt
Digital-Unit-III.pptVijayalakshmiV16
ย 
Design of microcontroller CPU.pdf
Design of microcontroller CPU.pdfDesign of microcontroller CPU.pdf
Design of microcontroller CPU.pdfssuserbefd221
ย 
Computer Organization
Computer OrganizationComputer Organization
Computer OrganizationJasmineShaik14
ย 
Coa module2
Coa module2Coa module2
Coa module2cs19club
ย 
CS304PC:Computer Organization and Architecture Session 6 Instruction cycle.pptx
CS304PC:Computer Organization and Architecture  Session 6 Instruction cycle.pptxCS304PC:Computer Organization and Architecture  Session 6 Instruction cycle.pptx
CS304PC:Computer Organization and Architecture Session 6 Instruction cycle.pptxAsst.prof M.Gokilavani
ย 
Presentation computer architechure (1)
Presentation computer architechure (1)Presentation computer architechure (1)
Presentation computer architechure (1)Amr Ahmed
ย 
CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)guptakrishns23
ย 
instruction format.pptx
instruction format.pptxinstruction format.pptx
instruction format.pptxAshokRachapalli1
ย 
Instruction cycle.pptx
Instruction cycle.pptxInstruction cycle.pptx
Instruction cycle.pptxsuryansh85
ย 
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...preethi3173
ย 
Timing and control unit
Timing and control unitTiming and control unit
Timing and control unitDestro Destro
ย 
Bca examination 2016 csa
Bca examination 2016 csaBca examination 2016 csa
Bca examination 2016 csaAnjaan Gajendra
ย 
Timing and control
Timing and controlTiming and control
Timing and controlrajshreemuthiah
ย 

Similar to COA Module 3 PART 2.pptx (20)

material for studentbasic computer organization and design .pptx
material for studentbasic computer organization and design .pptxmaterial for studentbasic computer organization and design .pptx
material for studentbasic computer organization and design .pptx
ย 
UNIT 5.pptx
UNIT 5.pptxUNIT 5.pptx
UNIT 5.pptx
ย 
Interfacing with LCD
Interfacing with LCDInterfacing with LCD
Interfacing with LCD
ย 
Unit 5
Unit 5Unit 5
Unit 5
ย 
20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptx20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptx
ย 
Digital-Unit-III.ppt
Digital-Unit-III.pptDigital-Unit-III.ppt
Digital-Unit-III.ppt
ย 
Timing & Control.pptx
Timing & Control.pptxTiming & Control.pptx
Timing & Control.pptx
ย 
Design of microcontroller CPU.pdf
Design of microcontroller CPU.pdfDesign of microcontroller CPU.pdf
Design of microcontroller CPU.pdf
ย 
Computer Organization
Computer OrganizationComputer Organization
Computer Organization
ย 
Coa module2
Coa module2Coa module2
Coa module2
ย 
CS304PC:Computer Organization and Architecture Session 6 Instruction cycle.pptx
CS304PC:Computer Organization and Architecture  Session 6 Instruction cycle.pptxCS304PC:Computer Organization and Architecture  Session 6 Instruction cycle.pptx
CS304PC:Computer Organization and Architecture Session 6 Instruction cycle.pptx
ย 
Presentation computer architechure (1)
Presentation computer architechure (1)Presentation computer architechure (1)
Presentation computer architechure (1)
ย 
CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)
ย 
instruction format.pptx
instruction format.pptxinstruction format.pptx
instruction format.pptx
ย 
Instruction cycle.pptx
Instruction cycle.pptxInstruction cycle.pptx
Instruction cycle.pptx
ย 
Remote ashok
Remote ashokRemote ashok
Remote ashok
ย 
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
Computer organisation and architecture jntuh 2rd year 2nd unit # central proc...
ย 
Timing and control unit
Timing and control unitTiming and control unit
Timing and control unit
ย 
Bca examination 2016 csa
Bca examination 2016 csaBca examination 2016 csa
Bca examination 2016 csa
ย 
Timing and control
Timing and controlTiming and control
Timing and control
ย 

Recently uploaded

data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
ย 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
ย 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
ย 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
ย 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
ย 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
ย 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
ย 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixNeometrix_Engineering_Pvt_Ltd
ย 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
ย 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxNadaHaitham1
ย 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
ย 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
ย 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
ย 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
ย 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
ย 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
ย 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
ย 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
ย 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
ย 
Call Girls in South Ex (delhi) call me [๐Ÿ”9953056974๐Ÿ”] escort service 24X7
Call Girls in South Ex (delhi) call me [๐Ÿ”9953056974๐Ÿ”] escort service 24X7Call Girls in South Ex (delhi) call me [๐Ÿ”9953056974๐Ÿ”] escort service 24X7
Call Girls in South Ex (delhi) call me [๐Ÿ”9953056974๐Ÿ”] escort service 24X79953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 

Recently uploaded (20)

data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
ย 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
ย 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
ย 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
ย 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
ย 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
ย 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
ย 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
ย 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
ย 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
ย 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
ย 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
ย 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
ย 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
ย 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
ย 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
ย 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
ย 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
ย 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ย 
Call Girls in South Ex (delhi) call me [๐Ÿ”9953056974๐Ÿ”] escort service 24X7
Call Girls in South Ex (delhi) call me [๐Ÿ”9953056974๐Ÿ”] escort service 24X7Call Girls in South Ex (delhi) call me [๐Ÿ”9953056974๐Ÿ”] escort service 24X7
Call Girls in South Ex (delhi) call me [๐Ÿ”9953056974๐Ÿ”] escort service 24X7
ย 

COA Module 3 PART 2.pptx

  • 1. Basic Computer Organization and Design Computer Organization & Architecture - MODULE 3 PART 2 www.teachics.org
  • 3. Instruction Cycle โ— A program consists of a sequence of instructions is executed in the computer by going through a cycle for each instruction. โ— Each instruction cycle in turn is subdivided into a sequence of subcycles or phases โ— They are a. Fetch an instruction from memory. b. Decode the instruction. c. Read the effective address from memory if the instruction has an indirect address. d. Execute the instruction. โ— Upon the completion of step 4, the control goes back to step 1 to fetch, decode, and execute the next instruction. โ— This process continues indefinitely unless a HALT instruction is encountered.
  • 4. Fetch & Decode โ— Initially, the program counter PC is loaded with the address of the first instruction in the program. โ— SC is cleared to 0, providing a decoded timing signal T0. โ— After each clock pulse, SC is incremented by one, so that the timing signals go through a sequence T0, T1, T2, and so on. โ— The microoperations for the fetch and decode phases are โ—‹ T0: AR โ† PC โ—‹ T1: IR โ† M [AR], PC โ† PC+1 โ—‹ T2: D0,. . . , D7 โ† Decode IR(12โ€“14), AR โ† IR(0-11), I โ† IR(15)
  • 5. Fetch & Decode โ— During T0 the address is transferred from PC to AR. โ— At T1 The instruction read from memory is placed in the instruction register IR and PC is incremented by one to prepare it for the address of the next instruction. โ— At time T2, the op-code in IR is decoded, the indirect bit is transferred to flip-flop I, and the address part of the instruction is transferred to AR. โ— Note that SC is incremented after each clock pulse to produce the sequence T0, T1, and T2.
  • 6. Determine the Type of Instruction โ— During time T3, the control unit determines the type of instruction that was just read from memory. โ— Memory Reference Instructions โ—‹ If D7=0, the op-code will be 000 through 110 โ—‹ If D7 =0 and I =1 - memory reference instruction with an indirect address. โ—‹ The micro-operation for the indirect address condition can be symbolized by AR โ† M [AR]. โ— Register Reference or I/O Instructions โ—‹ If D7 =1 and I=0 - Register Reference Instruction. โ—‹ If D7 =1 and I=1 - I/O Instruction.
  • 7. โ— The three instruction types are subdivided into four separate paths. โ— The selected operation is activated with T3. โ—‹ D7โ€™ IT3 : AR โ† M[AR]. โ—‹ D7โ€™ IT3 : Nothing. โ—‹ D7 Iโ€™T3 : Execute a register-reference instruction. โ—‹ D7 IT3 : Execute an inputโ€“output instruction.
  • 8.
  • 10. Memory Reference Instruction โ— Memory reference instructions performs operation with memory operand. โ— Execution of memory reference instruction starts with timing signal T4. โ— There are 7 memory instruction.
  • 11. AND to AC โ— Performs AND logic operation on pairs of bits in AC and the memory word specified by effective address. โ— The result of operation is transferred to AC. โ— D0T4: DR โ† M [AR] D0T5: AC โ† AC ^ DR, SC โ† 0 ADD to AC โ— Adds the content of the memory word specified by the effective address to the value of AC. โ— Sum is transferred to AC and output carry Cout is transferred into E (Extended accumulator flipflop) โ— D1T4: DR โ† M [AR] D1T5: AC โ† AC ^ DR, E โ† Cout, SC โ† 0
  • 12. LDA : Load to AC โ— Transfers the memory word specified by the effective address to AC. โ— D2T4: DR โ† M [AR] D2T5: AC โ† DR, SC โ† 0 STA : Store to AC โ— Stores the content of AC into the memory word specified by the effective address. โ— D3T4: M [AR] โ† AC, SC โ† 0
  • 13. BUN : Branch Unconditionally โ— Transfers the program to the instruction specified by the effective address. โ— D4T4: PC โ† AR, SC โ† 0 ISZ: Increment and Skip if Zero โ— Increments the word specified by the effective address, and if the incremented value is equal to 0, PC is incremented by 1 in order to skip the next instruction in the program. โ— D6T4: DR โ† M [AR] D6T5: DR โ† DR+1 D6T6: M [AR] โ† DR, if (DR 0) then (PC โ† PC 1), SC โ† 0
  • 14. BSA : Branch and Save Return Address โ— Used for branching to a portion of the program called a subroutine or procedure. โ— It stores the address of the next instruction into a memory location specified by the effective address. โ— The effective address plus one is transferred to PC to serve as the address of the first instruction in the subroutine. โ— D5T4: M [AR] โ† PC, AR โ† AR + 1 D5T5: PC โ† AR, SC โ† 0
  • 16. Register Reference Instructions โ— It specifies an operation on or test of the Accumulator. โ— An operand from memory is not needed. โ— So bits 0-11 bits the operation to be executed. โ— They are recognized by the control when D7 = 1 and I = 0. โ— Execution start with the timing signal T3. โ— Each control function needs the Boolean relation D7IT3 and is represented by the symbol r. โ— By assigning the symbol B, to bit i of IR(0-11), all control functions can be simply denoted by rBi.
  • 17.
  • 19. Inputโ€“Output Communication โ— A computer can serve no useful purpose unless it communicates with the external environment. โ— Instructions and data stored in memory must come from some input device. โ— Computational results must be transmitted to the user through some output device. โ— To demonstrate the most basic requirements for input and output communication, we will use as an illustration a terminal unit with a keyboard and printer.
  • 20. Input-Output Configuration โ— Terminal sends and receives information (eight bits of an alphanumeric code). โ— The serial information from the keyboard is shifted into the input register INPR. โ— The serial information for the printer is stored in the output register OUTR. โ— Both INPR and OUTR consists of eight bits.
  • 21. Input-Output Configuration โ— INPR and OUTR communicate with a communication interface serially and with the AC in parallel. โ— The transmitter interface receives serial information from the keyboard and transmits it to INPR. โ— The receiver interface receives information from OUTR and sends it to the printer.
  • 22. Input-Output Configuration โ— The 1-bit input flag FGI is a control flip-flop. โ— The flag bit is set to 1 when new information is available in the input device and is cleared to 0 when the information is accepted by the computer. โ— Initially, the input flag FGI is cleared to 0. โ— When a key is struck, an 8-bit code is shifted into INPR and FGI is set to 1. โ— When another key is striked, the computer checks the flag bit; if it is 1, the information from INPR is transferred to AC and FGI is cleared to 0.
  • 23. Input-Output Configuration โ— Initially, the output flag FGO is set to 1. โ— The computer checks the flag bit; if it is 1, the information from AC is transferred in parallel to OUTR and FGO is cleared to 0. โ— The output device accepts information, prints the corresponding character, and when the operation is completed, it sets FGO to 1. โ— The computer does not load a new character into OUTR when FGO is 0. (Busy printing)
  • 24. Input-Output Instructions โ— Needed for โ—‹ transferring information to and from AC register. โ—‹ for checking the flag bits. โ—‹ for controlling the interrupt facility. โ— Recognized by the control when D7 =1 and I =1. โ— The remaining bits(0-11) of the instruction specify the particular operation. โ— Executed with the clock transition associated with timing signal T3. โ— Each control function needs a Boolean relation D7IT3, and is represented by the symbol p. โ— By assigning the symbol Bi to bit i of IR, all control functions can be denoted by pBi for i = 6 through 11.
  • 27. Need for Interrupt โ— In basic case (Programmed control transfer), the computer keeps checking the flag bit, and when it finds it set, it initiates an information transfer. โ— This type of transfer is inefficient because of the difference of information flow rate between the computer and that of the inputโ€“output device. โ— The computer is wasting time while checking the flag instead of doing some other useful processing task.
  • 28. Program Interrupt โ— An alternative to the programmed controlled procedure is to let the external device inform the computer when it is ready for the transfer. โ— In the meantime the computer can be busy with other tasks. โ— This type of transfer uses the interrupt facility. โ— While the computer is running a program, it does not check the flags. โ— When a flag is set, the computer is interrupted from proceeding with the current program. โ— The computer stops what it is doing to take care of the input or output transfer. โ— It then returns to the current program to continue what it was doing before the interrupt
  • 29. Program Interrupt โ— The interrupt facility can be enabled or disabled by a flip-flop IEN. โ— The interrupt enable flip-flop IEN can be set and cleared with two instructions (IOF, ION). โ—‹ When IEN is cleared to 0 (with the IOF instruction), the flags cannot interrupt the computer. โ—‹ When IEN is set to 1 (with the ION instruction), the computer can be interrupted. โ— An interrupt flip-flop R is included in the computer to decide when to go through the interrupt cycle. โ— So the computer is either in an instruction cycle or in an interrupt cycle.
  • 30. Interrupt Cycle โ— When R = 0, the computer goes through an instruction cycle. โ— During the execute phase IEN is checked. If it is 0, control continues with the next instruction cycle. โ— If IEN = 1, control checks the flag bits. If both flags are 0, control continues with the next instruction cycle. โ— If either flag is set to 1 while IEN = 1, R is set to 1 and control goes to an interrupt cycle.
  • 31. Interrupt Cycle โ— The interrupt cycle is a hardware implementation of a branch and save return address operation. โ— The return address in PC is stored in a specific location. (Here address 0) โ— Control then inserts address 1 into PC and clears IEN and R so that no more interruptions can occur until the interrupt request serviced and flag has been set. โ— Micro-operations โ—‹ RT0: AR โ† 0, TR โ† PC โ—‹ RT1: M [AR] โ† TR, PC โ† 0 โ—‹ RT2: PC โ† PC 1, IEN โ† 0, R โ† 0, SC โ† 0
  • 32. Design of Basic Computer
  • 33. Design of Basic Computer The basic computer consists of the following hardware components: 1. A memory unit with 4096 words of 16 bits each. 2. Nine registers: AR, PC, DR, AC, IR, TR, OUTR, INPR, and SC. 3. Seven flip-flops: I, S, E, R, IEN, FGI, and FGO. 4. Two decoders: a 3x8 operation decoder and a 4x16 timing decoder. 5. A 16-bit common bus. 6. Control logic gates. 7. Adder and logic circuit connected to the input of AC.
  • 34. Design of Basic Computer
  • 35. Control Logic Gates โ— The inputs to this circuit come from โ—‹ two decoders โ—‹ I flip-flop โ—‹ bits 0 through 11 of IR. โ— The other inputs to the control logic are โ—‹ AC bits 0 through 15 to check if AC =0 and to detect the sign bit in AC(15) โ—‹ DR bits 0 through 15 to check if DR= 0 โ—‹ The values of the seven flip-flops. โ— The outputs of the control logic circuit are โ—‹ Signals to control the inputs of the nine registers โ—‹ Signals to control the read and write inputs of memory โ—‹ Signals to set, clear, or complement the flip-flops โ—‹ Signals for S2, S1, and S0 to select a register for the bus โ—‹ Signals to control the AC adder and logic circuit
  • 36. Control of Registers and Memory โ— The control inputs of the registers are LD (load), INR (increment), and CLR (clear). โ— Eg: To derive the gate structure associated with the control inputs of AR. Find all the statements that change the content of AR Rโ€™T0: AR โ† PC Rโ€™T2: AR โ† IR(0โ€“11) D7โ€™IT3: AR โ† M [AR] RT0: AR โ† 0 D5T4: AR โ† AR + 1 โ— The control functions can be combined into three Boolean expressions as follows LD(AR) = Rโ€™T0 + Rโ€™T2 + D7โ€™IT3 CLR(AR) = RT0 INR(AR) = D5T4
  • 37. Control of Common Bus โ— The 16-bit common bus is controlled by the selection inputs S2, S1, and S0. โ— The decimal number shown with each bus input specifies the equivalent binary number that must be applied to the selection inputs in order to select the corresponding register. โ— For example, when x1 = 1, the value of S2S1S0 must be 001 and the output of AR will be selected for the bus.
  • 38. Control of Common Bus โ— The Boolean functions for the encoder are S0 = x1 + x3 + x5 + x7 S1 = x2 + x3 + x6 + x7 S2 = x4 + x5 + x6 + x7 โ— To determine the logic for each encoder input, it is necessary to find the control functions that place the corresponding register onto the bus. โ— For example, to find the logic that makes x1 = 1, we scan all register transfer statements in and extract those statements that have AR as a source. D4T4: PC โ† AR D5T5: PC โ† AR Therefore, the Boolean function for x1 is, x1 = D4T4 D5T5 โ— In a similar manner we can determine the gate logic for the other registers.
  • 40. Design of Accumulator Logic โ— The adder and logic circuit has three sets of inputs. โ—‹ 16 inputs comes from the outputs of AC. โ—‹ 16 inputs comes from the data register DR. โ—‹ eight inputs comes from the input register INPR. โ— The outputs of the adder and logic circuit provide the data inputs for the register.
  • 41. Design of Accumulator Logic โ— In order to design the logic associated with AC, extract all the statements that change the content of AC. D0T5: AC โ† AC ^ DR D1T5: AC โ† AC + DR D2T5: AC โ† DR pB11: AC(07) โ† INPR rB9: AC โ† AC rB7: AC โ† shr AC, AC(15) โ† E rB6: AC โ† shl AC, AC(0) โ† E rB11: AC โ† 0 rB5: AC โ† AC + 1 โ— From this list we can derive the control logic gates and the adder and Logic circuit.