Seqential Part-1 New
Seqential Part-1 New
Seqential Part-1 New
9/11/2018 BRSREDDY 18
Unit Outcomes
Basic building
blocks include Gates:
9/11/2018 BRSREDDY 20
Combinational Circuits Vs Sequential Circuits
x1 z1
Combinational
xn logic zm
(a)
x1 z1
xn Combinational zm
logic
y1 yr Yr Y1
Memory
(b)
9/11/2018 BRSREDDY 21
Combinational Circuits Vs Sequential Circuits
9/11/2018 BRSREDDY 22
Combinational Circuits Vs Sequential Circuits
9/11/2018 BRSREDDY 23
Unit IV – Sequential Logic Circuit
Basic Memory Cell: RS Latch- using NAND & NOR.
Drawbacks of SR FF
of IC 7474, IC 7475.
9/11/2018 BRSREDDY 24
What is exactly Memory?
operations:
9/11/2018 BRSREDDY 25
Simple case - One bit memory
9/11/2018 BRSREDDY 26
Basic Idea of Storage
How can a circuit remember anything, when its just a
bunch of gates that produce outputs according to
inputs?
The idea is to make a loop in a circuit, so outputs are
also inputs.
“1”
bistable cell
(Stored Value= state)
“0”
Two inverters and a feedback loop form a “Static ”
storage cell
The cell will hold value as long as it has power applied
9/11/2018 BRSREDDY 27
Basic Idea of Storage
“remember”
“load”
9/11/2018 BRSREDDY 28
One Bit Memory Cell
9/11/2018 BRSREDDY 29
One Bit Memory Cell
Q Q is the primary
output
Inputs Latch
Q is its
Q complementary
output
It is said to be in SET state if output Q is High
It is said to be in RESET state if output Q is Low
9/11/2018 BRSREDDY 31
RS Latch using NOR
R
Q
Q
S
Circuit Diagram
Outputs
R Q
Inputs
S Q
BRSREDDY
9/11/2018 bol 32
RS Latch using NOR Logic Table
S R Qn Qn+1 State
0 0 0 0
No Change
0 0 1 1
0 1 0 0
Reset
0 1 1 0
1 0 0 1
Set
1 0 1 1
1 1 0 X Indetermine
1 1 1 X
9/11/2018 BRSREDDY 33
RS Latch using NAND
R
Q
Circuit Diagram
Outputs
R Q
Inputs
S Q
9/11/2018 BRSREDDY 34
Symbol
RS Latch using NAND
Logic Table
S R Qn Qn+1 State
0 0 0 X
Indetermine
0 0 1 X
0 1 0 0
Reset
0 1 1 0
1 0 0 1
Set
1 0 1 1
1 1 0 0 No Change
1 1 1 1
9/11/2018 BRSREDDY 35
RS Latch using NAND with additional circuitry
R S’
Q
S
R’
Circuit Diagram
R Q
Outputs
Inputs
S Q
9/11/2018 BRSREDDY 36
Symbol
RS Latch using NAND with additional circuitry Logic Table
S R Qn Qn+1 State
0 0 0 0
No Change
0 0 1 1
0 1 0 0
Reset
0 1 1 0
1 0 0 1
Set
1 0 1 1
1 1 0 X Indetermine
1 1 1 X
9/11/2018 BRSREDDY 37
Unit IV – Sequential Logic Circuit
Basic Memory Cell: RS Latch- using NAND & NOR.
Drawbacks of SR FF
of IC 7474, IC 7475.
9/11/2018 BRSREDDY 38
Clock
clock period
9/11/2018 BRSREDDY 39
Triggering
9/11/2018 BRSREDDY 40
High Level Triggering
CLK
Symbol
9/11/2018 BRSREDDY 41
Low Level Triggering
CLK
Symbol
9/11/2018 BRSREDDY 42
Positive Edge Triggering
CLK
Symbol
9/11/2018 BRSREDDY 43
Negative Edge Triggering
CLK
Q
Symbol
9/11/2018 BRSREDDY 44
Unit IV – Sequential Logic Circuit
Basic Memory Cell: RS Latch- using NAND & NOR.
Drawbacks of SR FF
of IC 7474, IC 7475.
9/11/2018 BRSREDDY 45
Gates Vs Flip Flops
9/11/2018 BRSREDDY 46
Flip Flops
9/11/2018 BRSREDDY 47
SR Flip Flop
R
Q R Q
SR-FF
S Q
Q
S
Symbol
Circuit Diagram
9/11/2018 BRSREDDY 48
SR Flip Flop
Logic Table
S R Qn Qn+1 State
0 0 0 X Indetermine
0 0 1 X
0 1 0 0 Reset
0 1 1 0
1 0 0 1 Set
1 0 1 1
1 1 0 0 No Change
1 1 1 1
9/11/2018 BRSREDDY 49
Unit IV – Sequential Logic Circuit
Basic Memory Cell: RS Latch- using NAND & NOR.
Drawbacks of SR FF
of IC 7474, IC 7475.
9/11/2018 BRSREDDY 50
Clocked SR Flip Flop
S
R’
Q R Q
CLK
CLK SR-FF
S Q
Q
R
S’
9/11/2018 BRSREDDY 51
Clocked SR Flip Flop
Logic Table
CLK S R Q Q State
0 0 Q Q No Change
0 1 0 0 Reset
1 0 0 1 Set
1 1 X X Prohibited
X X Q Q No Change
9/11/2018 BRSREDDY 52
Synchronous Inputs
9/11/2018 BRSREDDY 53
Asynchronous Inputs
PR
S Q
CLK
Q
R
CR
9/11/2018 BRSREDDY 55
Asynchronous Inputs: PRESET and CLEAR
PR
Inputs O/P
Comment
R Q
CLK CR PR S R Q Q
SR-FF 1 1 0 0 Q Q No Change
S Q 1 1 0 1 0 1 Reset
1 1 1 0 1 0 Set
CR
1 1 1 1 X X Invalid
X 0 1 X X 0 1 Clear
X 1 0 X X 1 0 Preset
X 0 0 X X X X Invalid
9/11/2018 BRSREDDY 57
Synchronous Sequential Circuits Vs Asynchronous
Sequential Circuits
Synchronous Seq Circuits Asynchronous Seq Circuits
9/11/2018 BRSREDDY 58
Synchronous Sequential Circuits Vs Asynchronous
Sequential Circuits
Synchronous Seq Circuits Asynchronous Seq Circuits
9/11/2018 BRSREDDY 59
Unit IV – Sequential Logic Circuit
Basic Memory Cell: RS Latch- using NAND & NOR.
Drawbacks of SR FF
of IC 7474, IC 7475.
9/11/2018 BRSREDDY 60
Drawbacks of SR Flip Flop
9/11/2018 BRSREDDY 61
Unit IV – Sequential Logic Circuit
Basic Memory Cell: RS Latch- using NAND & NOR.
Drawbacks of SR FF
of IC 7474, IC 7475.
9/11/2018 BRSREDDY 62
Level Triggered JK Flip Flop SR Flip Flop
Q
J R’
3
1 Q
CLK
S’ 2 Q
4
K
Q
J Q
Circuit Diagram of Level Triggered JK Flip Flop CLK JK-FF
K Q
Inputs Outputs
State
CLK J K Qn 1 Qn 1
1 0 1 0 1 Reset
1 1 0 1 0 Set
1 1 1 Qn Qn Toggle
9/11/2018 BRSREDDY 64
Timing Diagram of Level Triggered JK Flip Flop
Race around
1 condition
CLK t
0
1
J 0
t
1
K t
0
1
Q t
0
J=1, J=0,
K=0, K=1,
CLK=1 CLK=1
J=1, J=1,
K=1, K=1,
CLK=0 CLK=1
9/11/2018 BRSREDDY 65
Race Around Condition in JK Flip Flop
The “Race Around Condition” that we are going to explain
occurs J=K=1 i.e. when the flip flop is in the toggle mode.
When J=1, K=1 and CLK=1, hence the JK flip flop is in the
toggle mode and Q becomes low and Q becomes high.
These changed outputs get applied at the inputs of NAND
gates 3 and 4 of the JK FF. thus the new inputs to gates 3 and 4
are:
NAND – 3 : J=1, CLK=1, Q = 1
NAND – 4 : K=1, CLK=1, Q = 0
Hence R’ will become 0 and S’ will become 1.
9/11/2018 BRSREDDY 66
Race Around Condition in JK Flip Flop
Q = 1 and Q =0
avoided by
9/11/2018 BRSREDDY 68
Edge Triggered JK Flip Flop SR Flip Flop
Q
J R’
Q
C
CLK
R
S’ Q
K
Q
CLK JK-FF
K Q
Symbol
9/11/2018 BRSREDDY 69
Edge Triggered JK Flip Flop
Inputs Outputs
State
CLK J K Qn 1 Qn 1
0 or 1 X X Qn Qn
Flip Flop is Disabled
X X Qn Qn
(No Change)
0 0 Qn Qn
0 1 0 1 Reset
1 0 1 0 Set
1 1 Qn Qn Toggle
9/11/2018 BRSREDDY 70
How to Avoid Race Around Condition in JK Flip Flop
using Edge Triggered JK Flip Flops?
For the racing around to take place, it is necessary to have the
enable input high along with J=K=1.
As the enable input remains high for a long time in a JK Flip
Flop, the problem of multiple toggling arises.
But in edge triggered JK Flip Flop, the positive clock pulse is
present only for a very short time.
Hence by the time changed outputs return back to the inputs
of NAND gates 3 and 4, the clock pulse has died down to zero.
Hence the multiple toggling can not take place.
Thus the edge triggering avoids the race around condition.
9/11/2018 BRSREDDY 71
Master Slave JK Flip Flop
S
J Q1
Q
CLK
Q
K Q1
R
Master Slave
CLK
K
Master Master Master
Active Master
Master Active Active Active
o/p Q1 or S
Master
o/p Q1or R
Slave
o/p Q or S
Slave Slave Slave
Active Active Active
9/11/2018 BRSREDDY 73
How to Avoid Race Around Condition in JK Flip Flop
using MS JK Flip Flops?
When Clock=1, J=1, K=1, Master Active and slave becomes
inactive. Outputs of master will toggle. So S and R also will be
inverted.
When clock = 0: Master inactive, slave active. Outputs of the
slave will toggle.
These changed output are returned back to the master inputs.
But since clock=0, the master is still inactive. So it does not
respond to these changed outputs.
This avoids the multiple toggling which leads to the race
around condition. Thus Master Slave JK Flip Flop will avoid the
race around condition.
9/11/2018 BRSREDDY 74
Clocked JK Flip Flop with Clear and Preset Inputs
PR
J Q
CLK
PR
K Q
J Q
JK-FF
CLK
K Q
CR
CR
9/11/2018 Amit Nevase 75
Clocked JK Flip Flop with Clear and Preset Inputs
Inputs
Outputs
Asynchronous Synchronous Comment
PR CR CLK J K Q Q
0 0 X X X 1 1 Prohibited
0 1 0 X X 1 0 Preset
1 0 0 X X 0 1 Clear
1 1 0 0 Q Q No Change
1 1 0 1 0 1 Reset
1 1 1 0 1 0 Set
1 1 1 1 Q Q Toggle
9/11/2018 BRSREDDY 76
Unit IV – Sequential Logic Circuit
Basic Memory Cell: RS Latch- using NAND & NOR.
Drawbacks of SR FF
condition in JK FF, Master Slave JK FF, D Flip Flop and T type Flip
D S
CLK
D-FF
CLK Q
9/11/2018 BRSREDDY 78
D Flip Flop
Inputs Output
Comment
CLK D Qn 1 Qn 1
Last Value or No
0 X Qn Qn
Change
1 0 0 1 Reset
1 1 1 0 Set
9/11/2018 BRSREDDY 79
D Flip Flop with Preset and Clear Inputs
PR
D S
CLK
PR
Q
D Q
R
D-FF
CLK Q
CR
CR
9/11/2018 BRSREDDY 80
D Flip Flop with Preset and Clear Inputs
Inputs Output
Comment
PR CR CLK D Qn 1 Qn 1
0 0 X X Qn Qn Avoid
0 1 X X 1 0 Preset
1 0 X X 0 1 Clear
1 1 0 X Qn Qn No Change
1 1 1 0 0 1 Reset
1 1 1 1 1 0 Set
9/11/2018 BRSREDDY 81
Unit IV – Sequential Logic Circuit
Basic Memory Cell: RS Latch- using NAND & NOR.
Drawbacks of SR FF
of IC 7474, IC 7475.
9/11/2018 BRSREDDY 82
T Flip Flop
J R’
T
Q
CLK
K S’ Q
T Q
T-FF
CLK Q
9/11/2018 BRSREDDY 83
T Flip Flop
Inputs Output
Comment
CLK T Qn 1 Qn 1
0 X Qn Qn No Change
1 0 Qn Qn No Change
1 1 Qn Qn Toggle
9/11/2018 BRSREDDY 84
T Flip Flop with Preset and Clear Inputs
PR
J
T
Q
CLK
PR
K
Q
T Q
T-FF
CR CLK Q
9/11/2018 BRSREDDY CR
85
T Flip Flop with Preset and Clear Inputs
Inputs Output
Comment
PR CR CLK T Qn 1 Qn 1
0 0 X X Qn Qn Avoid
0 1 X X 1 0 Preset
1 0 X X 0 1 Clear
1 1 0 X Qn Qn No Change
1 1 1 0 Qn Qn No Change
1 1 1 1 Qn Qn Toggle
9/11/2018 BRSREDDY 86
Applications of Flip Flops
Drawbacks of SR FF
of IC 7474, IC 7475.
9/11/2018 BRSREDDY 88
Excitation Tables of Flip Flops
same time.
9/11/2018 BRSREDDY 90
Excitation Table of SR Flip Flop
S R Qn+1
0 0 Qn
0 1 0 Truth Table
1 0 1
1 1 ?
Present Next State Required Inputs
State O/P O/P
Qn Qn+1 S R
Excitation Table 0 0 0 X
0 1 1 0
1 0 0 1
1 1 X 0
9/11/2018 BRSREDDY 91
Excitation Table of SR Flip Flop
0 0 Truth Table
1 1
9/11/2018 BRSREDDY 98
Excitation Table of T Flip Flop
T Qn+1
Truth Table
0 Qn
1 Qn
S Q
J
CLK SR-FF
K
R Q
S J Q
CLK JK-FF
R K Q
D S Q
SR-FF
CLK
R Q
S
D Q
CLK D-FF
R
Q
T J Q
CLK JK-FF
K Q
D J Q
JK-FF
CLK
K Q
J D Q
CLK D-FF
Q
K
Drawbacks of SR FF
of IC 7474, IC 7475.
9/11/2018 BRSREDDY 108
IC 7474 – Dual D Type Positive Edge triggered FF
PR PR
4 10
2 5 12 9
D Q D Q
D-FF D-FF
CLK Q CLK Q
3 6 11 8
1 13
CR CR
+Vcc = Pin 14
GND = Pin 7
Inputs Outputs
Operating Mode
PR CR D Q Q
Preset L H X H L
Clear H L X L H
Undetermined L L X H H
Set H H H H L
Reset H H L L H
PR PR
2 7
16 15 12 11
K Q K Q
CLK
1 D-FF CLK
6 D-FF
J Q J Q
4 14 9 10
3 8
CR CR
+Vcc = Pin 5
GND = Pin 13
Inputs Outputs
Operating Mode
PR CR J K Q Q
Preset L H X X H L
Clear H L X X L H
Undetermined L L X X H H
Toggle H H H H Q Q
Reset H H L H L H
Set H H H L H L
Hold H H L L Q Q
9/11/2018 BRSREDDY 115
IC 7475 - Quad Latches
These latches are ideally suited for use as temporary storage
for binary information between processing units and
input/output or indicator units.
Information present at a data (D) input is transferred to the Q
input when the enable (G) is high, and the Q output will
follow the data input as long as the enable remains high.
When the enable goes low, the information (that was present
at the data input at the time the transition occurred) is
retained at the Q output until the enable is permitted to go
high.
These latches feature complementary Q and Q outputs from a
4-bit latch and are available in 16-pin packages.
Logic Diagram:
Function Table:
Q3 Q2 Q1 Q0 Q3 Q2 Q1 Q0
RSI 0 1 1 1 RSI 0 1 1
Inputs Output
D Q
Comment
CLK D Qn 1 Qn 1
CLK D-FF Last Value
Qn Qn
0 X or No
Q
Change
0 0 1 Reset
1 1 0 Set
Q0 Q1 Q2 Q3
CLK
Serial Input
CLK Q3 Q2 Q1 Q0
DIN = D0
Initially 0 0 0 0
1st 0 0 0 1 1
2nd 0 0 1 1 1
3rd 0 1 1 1 1
4th 1 1 1 1 1
-------------------------------------------------------------------------------------
SISO – Serial In Serial Out Shift Register (Shift Left)
0111
FF-2 Sets
-------------------------------------------------------------------------------------
0011
BRSREDDY
FF-1 Sets
-------------------------------------------------------------------------------------
0001
FF-0 Sets
-------------------------------------------
0000
9/11/2018
Clock
DIN
Q0
Q3
Q1
Q2
SISO – Serial In Serial Out Shift Register (Shift Right)
Serial Data Serial Data
Input Output
DIN D3 Q3 D2 Q2 D1 Q1 D0 Q0
Q3 Q2 Q1 Q0
CLK
Serial Input
CLK DIN = D0 Q3 Q2 Q1 Q0
Initially 0 0 0 0
1st 1 1 0 0 0
2nd 1 1 1 0 0
3rd 1 1 1 1 0
4th 1 1 1 1 1
-------------------------------------------------------------------------------------
SISO – Serial In Serial Out Shift Register (Shift Right)
1110
FF-1 Sets
-------------------------------------------------------------------------------------
1100
BRSREDDY
FF-2 Sets
-------------------------------------------------------------------------------------
1000
FF-3 Sets
-------------------------------------------
0000
9/11/2018
Clock
DIN
Q3
Q0
Q2
Q1
Unit IV – Sequential Logic Circuit
Serial Data
Input
DIN D0 Q0 D1 Q1 D2 Q2 D3 Q3
Q0 Q1 Q2 Q3
CLK
Q0 Q1 Q2 Q3
Parallel Outputs
9/11/2018 BRSREDDY 141
Unit IV – Sequential Logic Circuit
D0 D1 D2 D3
D0 Q0 D1 Q1 D2 Q2 D3 Q3
Q0 Q1 Q2 Q3
CLK
Q0 Q1 Q2 Q3
Parallel Outputs
9/11/2018 BRSREDDY 143
Unit IV – Sequential Logic Circuit
Load Mode:
When the Shift / Load line is Low, the AND gates G1, G2
and G3 become active. They will pass D1, D2, and D3
bits to the corresponding Flip Flops.
Shift Mode:
When the Shift / Load line is High, the AND gates G1, G2
and G3 become inactive. Hence parallel loading of
data becomes impossible.
But AND gates G4, G5 and G6 become active.
Therefore the shifting of data from left to right bit by
bit on application of clock pulses
Thus the parallel in serial out operation takes place
left.
Serial shift
Left input
Serial shift
right input
As a delay line
Ring Counter
Counters
All the Flip Flops are not All the Flip Flops receive clock
clocked simultaneously. signal simultaneously.
TA PR QA TB PR QB
CLK
FF-A FF-B
QA QB
CR CR
Logic 1
(LSB) QA QB (MSB)
Counter Outputs
9/11/2018 BRSREDDY 162
2 Bit Asynchronous or Ripple Up Counter
Initially 0 0 - 0
1st 0 1 1 1
2nd 1 0 2 2
3rd 1 1 3 3
4th 0 0 4 0
9/11/2018 BRSREDDY 163
2 Bit Asynchronous or Ripple Up Counter
Clock
QA 0 1 0 1 0
QB 0 0 1 1 0
Counter O/P
QB QA
00 01 10 11 00
0 1 2 3 0
3 2
TA PR QA TB PR QB TC PR QC
CLK
FF-A FF-B FF-C
QA QB QC
CR CR CR
Logic 1
QA QB QC
(LSB) (MSB)
Clock
QA 0 1 0 1 0 1 0 1 0
0 0 1 1 0 0 1 1 0
QB
QC 0 0 0 0 1 1 1 1 0
Counter O/P
QC QB QA
000 001 010 011 100 101 110 111 000
0 1 2 3 4 5 6 7 0
000
111 001
110 010
101 011
100
Logic 1
TA PR QA TB PR QB TC PR QC TD PR QD
CLK
FF-A FF-B FF-C FF-D
QA QB QC QD
CR CR CR CR
Logic 1
QA QB QC QD
(LSB) (MSB)
Counter Outputs
9/11/2018 BRSREDDY 171
4 Bit Asynchronous or Ripple Up Counter
Clock
QA
QB
QC
QD
Counter O/P
QD 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0
QC 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0
QB 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0
QA 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 00
9/11/2018 BRSREDDY 172
Design MOD-3 Asynchronous Counter
Mod – 3 counter is a counter having three states i.e. 00, 01
and 10. After 10 it will return back to its original state 00.
Initial
CLR
State 0 Counter CLK
QA QB
2 1 Y
Reset Logic
State Diagram
Block Diagram
QB 0 1 1 Y QBQA
QB 1 1 0
9/11/2018 BRSREDDY 174
Design MOD-3 Asynchronous Counter
Logic 1 2 Bit Ripple
Counter
TA PR QA TB PR QB
CLK
FF-A FF-B
QA QB
CR CR
QA
QB
Reset Logic