Understanding Sequential Logic Systems
Understanding Sequential Logic Systems
Sequential logic
Exit
Entrance Logic
Combinatorics
In sequential logic, the state of the
outcome depends not only on the state
entries but also of the state
Next state
previous to the exit.
Sequential systems introduce State
so the concept of memory (for future
stocker l’état du système) et
from the clock (to determine the Memory element
measurement moments
We remember that the present state is an output of the memory element, while
The future state is an input.
Notation of the states
How to note a state 'Q' in the past, present or future?
Passed Present Future
Qn , Qn-1, Qn+1 state of Q respectively at the present moment, previous and following.
1 1 1 1 1 1 1
h 0 0 0 0 0 0 0
T
Front mounting Front descendant
Elements of Memory
In sequential logic, the previous states of the outputs come into play for
the preparation of the output statement. The memory function is the main one
constituting sequential systems. Thus, a sequential system
A complex can be developed from an organized set of memories.
elementary and combinatorial logic operators.
Element of Q
command memory Value
memorized
Order Qn Qn+1
QnCurrent state
Set X 1
Qn+1 ouQ+Next state
Reset X 0
0 0
Memorization 1 1
The memory element is said to be in the "Set" state if Q=1 and Q'=0.
The memory element is said to be in the 'Reset' state if Q=0 and Q'=1.
Asynchronous Bascule
2 NOR doors Equivalent diagram
R
Q
S Q
Q' R Q'
S
2entries:SetR
2 Outputs: QetQ’
It is formed by two NOR gates connecting their outputs to
the entrance of the other door.
0
0
(Hold State)
7
Asynchronous Bascule
__
S R QinQn+1 Qn+1
0 0 0 0 1
0 0
1
0 1
0
(Hold State)
8
Asynchronous Bascule
__
R=0 , S=0 et Q = 0 S R Qn Qn+1 Qn+1
0 0 00 0
0 1 0 0 1
1
0
0
Hold State
9
RSAsynchronous Bascule
__
S R Qn Qn+1 Qn+1
0 0 00 0
0 1 0 0 11 0
0
1 0
0
Hold State
Qn+1=Qn State Hold (memorization)
10
Asynchronous Bascule
R=1 , S=0 __
S R QnQn+1 Qn+1
0 0 00 0
1 0 0 0 11 0
0 1 0 0 1
0 1 0 0 1
0
1
0
(Set State)
11
Asynchronous Bascule
R=0 , S=1 __
S R Qn Qn+1 Qn+1
0 0 00 0
0 0 0 11 0
0 0 1 00 1
0 1 10 1
1 0 0
0 0
1
(Set State)
12
Asynchronous Bascule
R=0 , S=1 et Q = 1 __
S R QnQn+1 Qn + 1
0 0 00 0
0 1 0 0 11 0
0 0 1 00 1
0 1 10 1
1 0 01 0
1 0 11 0
1 0
1
(Set State)
13
Asynchronous Bascule
R=1 , S=1 __
S R Qn Qn+1 Qn+1
0 0 00 0
1 0 0 0 11 0
0 1 00 1
0 1 10 1
1 0 01 0
1 0 11 0
0 1 1
1
1 1
(Invalid State)
14
Asynchronous Bascule
__
S R QnQn+1 Qn+1
0 0 00 0
1 0 0 0 11 0
1 0 1 00 1
0 1 10 1
1 0 01 0
1 0 11 0
0 1
1
15
Truth table S R Qn+1
0 0 Memorization
__ 0 1 0 (reset)
S R QnQn+1 Qn+1 1 0 1 (set)
0 0 00 1
Frozen Exit No action
0 0 11 0
0 1 00 1 Reset Reset
0 1 10 1
1 0 01 0
Put to 1 Set
1 0 11 0
1 1 00 0
State to avoid (Q)n+1 =n+1)
1 1 10 0
R 0 0 0 Reset 0
1
Q 0 0 0
1 1 1
/Q 0
Setting to 1 Frozen Reset
Qn+1 Output equation
Bascule RS SR
Qn 00 01 11 10
0 0 0 X 1 Qn+1 = S RQ+n
S R Qn+1 1 0 X
0 0 Memorization
0 1 0 (reset) State graph
1 0 1 (set) The internal states (Q) define the
vertices of the graph
Current state Next state The input states (R and S) define
the arrows leaving the summits
Qn Qn+1
SR=10
SR=00 01 10 11 1
0
0 00 1X SR=01
1 10 1X ["00","01"] 00, 10
Table of States
Bascule S'R'
Bascule formed by two NAND gates by connecting their
outputs at the entrance of the other NAND gate.
S' S’ R’ Q
Q
1 1 No change
1 0 0 (reset)
Q' 0 1 1 (set)
R' 0 0 Prohibited
PS NS
S'R'Qn Qn Qn+1 Qn+
1 Current state Qn
01 XX 10 set NS: State following Qn+1
10X X0 1 reset
1 1 01 01 hold
1 1 10 10 hold
0 0X X1 1 forbidden
RSH Bascule
An improvement of the RS flip-flop (latch) consists of adding a signal.
prohibiting or allowing the modification of the output. If this signal is 1, the state of
The output can be modified, otherwise it does not change regardless of the state of the inputs.
S and R.
S Q
C
R Q'
S R Qn + 1
0 0 Qn mem
0 1 0 Reset C S R S ’ R ’ Q
1 0 1 Set 0 x x 1 1 memorization
1 1 undetermined 1 0 0 1 1 memorization
1 0 1 1 0 0 (reset)
Qn+1 =S+R'.Q n 1 1 0 0 1 1 (set)
WithS.R=0 1 1 1 0 0 undetermined
Asynchronous D Bascule
A D flip-flop ('Data' or 'D') is actually an RS flip-flop.
particular, for which we always have D=S=R’.
D (“data”) and C (“control”).
When C = 0, S' = R' = 1, memorization. C D Q
0 x memorization
When C = 1, the output Q is equal to the input 1
D.
0 0
1 1 1
H
Truth table
H D Qn+1 D
0 X Qn Q
1 0 0
When H = 1, Qn+1= D, mode transparent
1 1 1 In this case, if D changes, Q faithfully follows D.
Qinitial=0
When H = 0, Qn+1=n, locked outings
Bascule D H D Qn+1
Master Slave
Operating principle:
At any moment, one and only one of the switches is active, the other is frozen.
Clk=0 Bascule 1 "Master" is active and flip-flop 2 "slave" is frozen.
Clk=1 Bascule 1 "Master" is frozen and Bascule 2 "slave" is active.
The 2 floors are therefore decoupled and thus prevent a direct propagation of the inputs on the
outputs.
Operating principle: Master Slave
At any time, one and only one of the switches QM QS
one works the other is frozen D D Q D Q
Clk H H
Clk=0, Qm+1Active master balancing beam. /QS
Clk=1Qm+1=QmFrozen master seesaw.
D Q
D Q
CLK
QM
Clk
Front mounting
D
D
Q
Q
/
Q Q
Synchro Bascule D: active on the falling edge
Master Slave
Qm Qs
D D Q D Q Q
(a) Circuit
Clock
D
Qm
Q = Qs
D Q
Q
Bascule D
Asynchronous Bascule D
D Q D
CLK
CLK
Transparent mode
Synchronous Bascule D
D
D Q CLK
CLK
Q
J H
D Q K
K
H Q
JK
H JnKn Qn+1
1X
0X ↑0 0 Qn Memorization
0 1 X0
↑0 1 0 reset
X1 ↑1 0 1 set
↑1 1 /Qn Togle
No front
amount X X X Qn Memorization
Bascule JK
J=K=0 fixed scale memorization
J=1 and K=0, the flip-flop sets the output Q to 1 on the rising edge of the clock.
J=0 and K=1, the flip-flop sets the output Q to 0 on the rising edge of the clock.
J=K=1 the state output Q changes after each subsequent rising clock edge.
J H JnKn Qn+1
↑0 0 Qn
K ↑0 1 0
↑1 0 1
↑1 1 /Qn
Q X X X Qn
set
toggle J=K=0 reset J= 1 K=0
J=K=1frozen J= 0 K=1
Bascule T
T Q
T
J Q D
T Q H
H
K H
T=J=K H T Qn+1
D = T Qn+ T Qn
H=0, Qn+1 = Qn
x 0 Qn
H=0, Qn+1 =n 1 /Qn
H
J=K=1, Qn+1 = Qn
H , Qn+1 = D
J=K=0 , Qn+1 =n T = 0 D = Qn Qn+1 = T Qn+ T Qn
T T = 1 D = /Qn
0 1 0
0 1
1
Preset and Clear: Forcing inputs
Allows the switches to be controlled independently of the clock signal H
Pr(preset) forces the output to 1, regardless of other inputs
Cr(Clear) forces the output to 0, regardless of other inputs.
Pr and Cr are not activated simultaneously.
? Pr Q ? Pr
H H
? Cr Q ? Cr Q
Cr and Pr are active at a low level Cr and Pr are active at a high level
Bascule D 7474
Preset
Data Pr Normal
D Q
Entry FF Exit
Clock CLK Q Complemented
CLR
Clear
Truth table
Operation Entries Outputs
Asynchronous Synchronous
Pr CLR CLK D Q Q
Asynchronous set 0 1 X X 1 0
Asynchronous reset 1 0 X X 0 1
Prohibited state 0 0 X X 1 1
Set 1 1 L to H 1 1 0
Reset 1 1 L to H 0 0 1
Bascule D: Preset and Clear
Pr Preset active at low level => Qn+1 = 1
set asynchronous
D Q Clearactive at the low level => Qn+1 = 0
reset asynchronous
H
Q*
Cr
Pr Cr DnQn+1 H
0 1 X 1 D
1 0 X 0
Pr
0 0 X Forbidden
1 1 0 0 Clr
1 1 1 Dn Q
Preset and Clear: asynchronous input
PRE PRESET
J Q Activate at level Q= 1
Clk
__
K Q CLR CLEAR
Flip-flops J Q
CLK
K Set
PRE Reset
CLR
Q
Resume
Bascule D
D Qn+1 Operation
0 0 Reset
1 1 Set Q n+1 = Dn
JK balance
J K Qn+1 Opération
0 0 Qn Mem
0 1 0 Reset Qn+1 K’Qn+ JQ’n
1 0 1 Set
1 1 Q’ n Complement
Bascule T
T Qn+1 Operation Qn+1 T’Qn+ TQ’n
0 Qn Mem = T Qn
1 Q’ n Supplement
Sequential Circuit
D
Often switches D but
we can have the 4 switches
(SR, JK, D or T) T
39
II Moore and Mealy Machine
Finite state machine: it is a machine that has a finite amount of memory
to represent the states.
There are two main categories of finite state sequential machines.
Moore Machine: Outputs depend only on the states.
S = g(Current_state)
Mealy Machine: Outputs based on states and inputs
S = f( Input, Current State )
A toute machine de Mealy correspond une machine de Moore et réciproquement
MyMooremachine
Starters Outputs
Circuit Flip Circuit
Combinatorics Flops Combinatorics
MyMealymachine
0 00 0 X Frozen/reset
0 0 1 1 1 X Set/complement
0 10 X 1 Reset/complement
0 11 1 1 X 0 Frozen/set
1 00
1 0 1 1
1 10
1 11
Implementation using D, T, RS, and JK flip-flops
Excitation tables
QnQn+1 D TS RJ K
0 0 0 00 X0 X
0 1 1 11 01 X
1 0 0 10 1X 1
1 1 1 0X 0X 0
II 1 The FSM method
For the design of a sequential circuit, one must follow the steps
below
0
We learn to convert a state diagram into equations of
recurrences. This is done very simply using a state table
present/future state.
Example 1 continuation
. Sequential circuit
QA’QA QB'QB
K K
Clk
KA JA KBJB
. Design equation
Q Bx QB
QA 00 01 11 10
0 X X1
QA 1 X X 1
x
Example 1 Continued
. Sequential circuit
JA=KAQBx JB=KB= x
Implantation using T switches
0
0 0 0 X 0
0 1 1 X 1
1 0 X 1 1 Clk
1 1 X 0 0
TAQBx,TB=x
x 51
Implementation using D flip-flops
0
State State Entry of
00 present Entrance following Scales
+ +
QA QB x QAQ B DADB
1 1 00 0 0 0 00
0 00 1 0 1 01
01 0 0 1 01
01 1 1 0 10
0 10 0 1 0 10
10 1 1 1 11
1
1 11 0 1 1 11
11 1 0 0 00
Q Bx QB
QA 00 01 11 10 A Bx QB
0 1 QA 00 01 11 10
0
QA 1 1
QA 1
x
x
DA=A .QB + xQA'QB+QA x' DB=B .x + QB .x
= QB xor QA
Example 1 DA=A .QB + xQA'Q B+QA x'
DB=B .x + QB .x
. Sequential circuit:
QA .QB ‘
D Q QA
QA .x
x
xQA’.QB Q' QA '
D Q QB
Q' QB '
Clk
Example 2
Moore machine recognizing the sequence 10
S0No element of the sequence
S11 observed 0 1
S210 observed reset 0
1
S0/0 S1/0 1 S2/1
Machine de Mealy
S0No element of the sequence 0
S1"1" observed 0/0 1/0 1/0
S0 S1
reset 0/1
Moore & Mealy Chronogram
Clock
0 1 0 0 0
Entry
Moore S0 S1 S2 S0 S0
Mealy S0 S1 S0 S0 S0
0 1 0/0
0 1/0 1/0
1 S1/0
S0/0 1 S2/1 S0 S1
reset reset 0/1
0
Example 3: 101 Sequence Detector
w Z
Clock
X = 0 0 11 0 11 0 01 0 101 0 10 0
Z = 0 0 0 0 010 0 0 0 0101010 0
Z=1whenasequence101isdetectedattheinput
duringthelastthreecyclesoftheclock,ifnotz=0
0/0
Mealy
None No element of the sequence is detected
Sequence to detect: 101
1/0 1/0
1/1 0/0
w Z
w Q1,n
Q0,n 00 01 11 10
0
Q0 1
D0 XX 1
CK
D 0= w
Q1
wQ1,n
D1 Q0,n 00 01 11 10
CK
Clock 0
D1=0,nw
1
Sequence 101
Mealy diagram
0/0
0 State State following Z
Present w= 0 w= 1
none Z=0
none
Nonenoneone0
1/0 1/0 A two one 0
1 1
two none found 0
0/0 un Trouvé deux un 0
0 a Z=0
1/1
0/0
0
State Code
two 1 Q1Q0
two Z=0
none 00
0 1
a 01
found two 10
Z=1 found 11
Moore diagram
Q1
Current State Following state Z 0 1
Q1,n Q0,n Q1,n+1Q0,n+1 D1 D0 Q0
0
w= 0 w= 1 w=0 w=1
Z = Q0Q1
1
00 00 01 000 01
01 10 01 010 01 wQ1
10 00 11 000 11 Q0 00 01 11 10
11 10 01 110 01 0
D0= w
1
Q0 Z
w D0
CK wQ1
Q0 00 01 11 10
0
1
Q1
D1
CK
D1=0w + Q0Q1w
Clock
Sequence detector circuit: Mealy and
Moore
Mealy Moore
w Z
X Q0
D0 Z
CK
Q0
D0
CK
Q1
Q1
D1
D1
CK
CK
Clock
Clock
D0= X D0= X
D1Q0X’
D1= Q0X’ + Q0'Q1X
Z = Q1X
Z= Q0Q1
IV Binary counters
Asynchronous binary counter
FF0 FF1
CLK 1 2 3 4
Q0 0 1 0 1 0
Q0= CLK÷2
Q0 Q1= CLK÷4
Q2= CLK÷8
Q1 0 0 1 1 0
Q3= CLK÷16
Q1Q0 00 01 10 11 00 ...
clk q0 frequencyf/2
(freq.f) counter q1 frequencyf/4
q2
n-bit frequency f/8
J Q0 J Q1 J Q2
CLK C Q0 C Q1 C
CLK 1 2 3 4 5 6 7 8
Q0 0 1 0 1 0 1 0 1 0
Q0
Q1 0 0 1 1 0 0 1 1 0
Q1
Q2 0 0 0 0 1 1 1 1 0
Q[2..0] 0 1 2 3 4 5 6 7 0
Asynchronous counters modulo 2n(in scale)
Full cycle counters
. Example: Asynchronous counter modulo 16 (n = 4 bits)
HIGH
Q0 Q1 Q2 Q3
J J J J
CLK C C C C
CLK 1 2 3 4 5 6 7 8
Q0
Q1
Q2
Q3
Q[3..0] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 Decimalvalue
Frequency Divider Counter
CLK 1 2 3 4 5 6 7 8
Q0 0 1 0 1 0 1 0 1 0
Q1 0 0 1 1 0 0 1 1 0
÷4
÷8 200Hz
100Hz 400Hz
50Hz ÷2
16
Clock
800Hz
Modulo 8 counter: JK flip-flop
In the case of JK flip-flops, taking J = K = 1, we get Qn+1 =/Qn .
Clk
1 J Qa 1 J Qb 1 J Qc
Clk Clk Clk
1 K Qa 1 K Qb 1 K Qc
Top QcQbQa
0 1 2 3 4 5 6 7
0 0 0 0
1 0 0 1
2 0 1 0
Qa at the front descending from the clockQa,n+ 1 =/Qa,n Togle.
3 0 1 1
By
At connecting another Jk flip-flop
the descending front of to the
Qaoutput of1Q/Q toggle.b,n
:Qb,n+ a
4 1 0 0
Qb
5 1 0 1
If we
At connect
the a 3ièmebascule
descending b: Qexit
frontJkofatQthe c,n+1=of/Q
Q,toggle.
we c,n
will have:
b
6 1 1 0
Qc
7 1 1 1
For the first 7 impulses of the clock, we have the following table.
This table represents a MOD 8 counter. The counter returns to 000 at 8.ièmeimpulse of
the clock
If we connect the three outputs Qa, Qb, and Qc to 3 LEDs, this represents a counter that counts.
from 0 to 7.
Counter Mod 8:
If this time we connect each output /Q of the flip-flop i to the input clk.
bascule i+ 1. We obtain a modulo 8 counter.
Input
1 J Qa 1 J Qb 1 J Qc
Clk Clk Clk
1 K Qa 1 K Qb 1 K Qc
In QcQbQa
0 0 0 0
1 1 1 1
Qa 2 1 1 0
3 1 0 1
The 4 1 0 0
5 0 1 1
6 0 1 0
Qc
7 0 0 1
1 J Qa 1 J Qb 1 J Qc
Clk > Clk Clk
1 K Qa 1 K Qb 1 K Qc
Qa•1 Qb•1
Up/Down
WhentheUp/Downinputis0,theclockClkisconnectedtotheoutputQoftheflip-flop.
preceding.
[Link]
When the input Up/Down = 1, the clock Clk is connected to the output Q of the
preceding bascule.
C B A
Q J Q J Q J
Allentries CLK CLK CLK
JetK are at Q Q Q
CLR CLR CLR
high level
B
C
N Detector
….
Clr
Asynchronous counters modulo N < 2n
Incomplete cycle counters
CBA . Example 1 modulo 6 counter:
000
001 610=1102CBA When CB=11 reset the counter to 0
010 C B A
Q J Q J Q J
011
100 CLK CLK CLK
101 Temporary state Q Q Q
CLR CLR CLR
necessary for the All the
reset of the B entréesJ,K
compteur C sont au niveau
1 (HIGH).
1 2 3 4 5 6 7 8 9 10 11 12
Clock
The doorNand
A put back the output
at 000 when the
B value (110)
appears at the
C exit
Exit 1
NAND 0
n
Asynchronous counters modulo < 2
1 2 3 4 5 6 7 8 9 10 11 12
Clock
A 0 1 0 1 0 1 0 1
B 0 0 1 1 0 0 0 0
C 0 0 0 0 1 1 0 0
NAND 1
Output 0
Although the counter goes to state 110, it's barely a few nanoseconds.
before its recycling at 000
111 000
State 001
Temporary
CounterMOD-6.
110 010
101 011
100
F E D C B A
Q J Q J Q J Q J Q J Q J
Q Q Q Q Q Q
CLR CLR CLR CLR CLR CLR
C
D
E All entries J, K
F
are at 1
When FEDC = 1111: Clr = 0
n
Asynchronous counters modulo < 2
HIGH
D C B A
J Q J Q J Q J Q
CLK C C C C
1 2 3 4 5 6 7 8 9 10 11
Clock
D 0 1 0 1 0 1 0 1 0 1 0
C 0 0 1 1 0 0 1 1 0 0 0
B 0 0 0 0 1 1 1 1 0 0 0
A 0 0 0 0 0 0 0 0 1 1 0
Exit
NAND
Cascaded asynchronous counters
. The term cascade indicates that one can put several in succession.
counters, ultimately allowing for a larger counter to be obtained
capacity
. Example: A modulo 32 counter can be built from a
cascade modulo 8 counter with a modulo 4 counter.
Q0 Q1 Q2 Q3 Q4
J J J J J
Q Q Q Q Q
CLK C C C C C
Q' Q' Q' Q' Q'
counters Count +1
modulo 8
modulo 4
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0
Clk
Q0 0 1 0 1 0 1 0 1 0 1 10 0 1 10
Q1 0 0 1 1 0 0 1 1 0 0 11 0 0 11
Q2 0 0 0 0 1 1 1 1 0 0 00 1 1 11
0 0 0 0 0 0 0 0 1 1 11 1 1 11
Q3
Asynchronous counters in cascade
. Example: Modulo 100 counter
Theend-of-countoutputTCallows the cascading of
counter. We then obtain a counter modulo the powers of
Units Dozens
freq/10
1 CTEN Counter CTEN Counter freq/100
per decade TC to decade TC
CLK C Q3Q2Q1Q0 C Q3Q2Q1Q0
freq
CTEN=1 Counting
Q0
Logic 1 Q1
T1=Q0
T0 = 1
Clk
Clk
Q0
Q1
Using JK flip-flops
0 0 0 00 X0 X
0 1 1 11 01 X
1 0 0 10 1X 1
1 1 1 0X 0X 0
Synchronous counters
. Example: 3-bit counter (using T flip-flops, JK flip-flops)
with J and K inputs at the same level). Q1
T2 T1 T0
Clk
1
. 3-bit counter with JK flip-flops
State State Entries of
present following JK Scales
+ + +
Q2Q1Q0Q2Q1Q0 J 2K2J 1K1J 0K0
0 0 0 001
0 0 1 010
0 1 0 011
0 1 1 100
1 0 0 101
1 0 1 110
1 1 0 111
1 1 1 000
Q2 Q1 Q0
J J J
Clk
1
Synchronous counters
. Note: In a binary counter, the nth bit (underlined in blue) is always
supplemented
011...11 100...00
ou111…11 000…00
. So, Xnis complemented if Xn-1Xn-2 ... X1X0= 11…11.
. As a result, if we use T flip-flops, then
Tn= [Link]-2.....X1.X0
Exemple n=3
Clock Q2Q1Q0 Q1change Q0changes with each cycle
0 0 0 0
Q2change Le bit Q1change when Q0=1
1 0 0 1 So T1=Q0
The Q bit2change if Q at the same time1and Q0
2 0 1 0
are equal to 1.
3 01 1
So T2=Q1Q0
4 1 0 0
In general, for an n-bit counter,
5 1 0 1
a switch changes state if the
6 1 1 0 the states of the previous switches are
7 11 1 in state 1.
8 0 0 0 Ti=Qi-1Qi..Q0
Example 4
Complex counter: Sequence 000 010 011 101 110 000
Present state Next state Entry of the toggles
State diagram
QC,nQB,nQA,nQC,n+1QB,n+1QA,n+1 TCTBTA
000 010
0 0 0 01 0 0 1 0
0 0 1 X XX XXX
110 011 0 1 0 0 11 0 0 1
0 1 1 1 0 1 1 1 0
1 0 0 X XX XXX
101 1 01 1 10 0 1 1
1 1 0 0 00 1 1 0
Excitation table Table of states
1 1 1 X XX XXX
QnQn+1 T
000 QBQA QBQA QBQA
011 QC 00 01 11 10 QC 00 01 11 10 QC 00 01 11 10
101 0 0X 1 0 0 0 0 X 0 1
110
1 X 0 X 1 1 1
QB’
QA
TC QC
QC
TC QC TB TA
TS TS QB TS QA
CLK CLK CLK
R R R
1
Count 0
/Reset
Example 5
BCD decade counter: T flip-flops
T01
T1=3'.Q0
T2=Q1.Q0
T3=Q2.Q1.Q0 +Q3.Q0
Q0
1 T T Q1 T Q2 T Q3
Q Q Q Q
C C C C
Q' Q' Q' Q'
CLK
Synchronous Counters/De-counters
T0= 1
T1= ([Link]) + ([Link]
T2=[Link]) + ([Link]
Synchronous Counters/De-counters
Q0 Q1
1T T T Q2
Q Q Q
Up C C C
Q' Q' Q'
CLK
3-bit Gray code counter: JK flip-flop
000
. Example: 3-bit gray code counter 100 001
using JK flip-flops.
101 011
111 010
110
State State Entrance of
present following scales
Q2Q1Q0 Q2Q1Q0 +
+ +
J 2K 2J 1 K 1J 0K 0
0 0 0 001 0 X0 X1 X
0 0 1 011 0 X1 XX 0
0 1 0 110 1 XX 0 0 X
0 1 1 010 0 XX 0X 1
1 0 0 000 X 1 0 X0 X
1 0 1 100 X 0 0 XX 1
1 1 0 111 X 0X 0 1 X
1 1 1 101 X 0X 1X 0
Gray code 3-bit counter: JK flip-flop
Q1 Q0 Q1 Q0 Q1 Q0
Q2 Q2 00 01 11 10 Q2 00 01 11 10
00 01 11 10
0 0 0
1 X X XX 1 X X 1 XX 1
Q0 Q1 Q2
J Q J Q J Q
C C C
Q1 Q2
K Q' K Q' ' K Q' '
Q0
'
CLK