Professional Documents
Culture Documents
Ch5 - 3 Analysis of Sequential Circuit JK and T Flip Flop
Ch5 - 3 Analysis of Sequential Circuit JK and T Flip Flop
SLIDES WERE ADOPTED AND MODIFIED, WITH MANY THANKS, FROM PREVIOUS VERSIONS
BELONG TO:
PROF. IBRAHIM KAMEL
PROF. AHMAD ALMULHEM, KFUPM
2
J-K Flip-flop
J-K flip-flop. J Q
CLK
C
K Q'
Characteristic table.
Q J K Q(t+1)
J K Q(t+1) Comments 0 0 0 0
0 0 Q(t) No change 0 0 1 0
0 1 0 Reset 0 1 0 1
1 0 1 Set 0 1 1 1
1 1 Q(t)' Toggle 1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
Characteristic table.
Q(t+1) = J.Q' + K'.Q
J-K Flip-flop 3
Creating state table
• A basic state table for our example circuit
is shown below.
• Remember that there is one input X, one
output Z, and two flip-flops Q1Q0.
• The present state Q1Q0 and the input will
determine the next state and the output.
Z = Q1Q0X
Q1 Q0 x Q1 Q0 z
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
5
Flip-flop input equations
• Finding the next states is harder. To do this, we have to figure out how
the flip-flops are changing.
Step 1:
Find Boolean expressions for the flip-flop inputs.
i.e. How do the inputs (say, J & K) to the flipflops
depend on the current state and input
Step 2:
Use these expressions to find the actual flip-flop input values for
each possible combination of present states and inputs.
i.e. Fill in the state table (OR with new intermediate columns)
Step 3:
Use flip-flop characteristic tables or equations to find the next
states, based on the flip-flop input values and the present states.
6
Step 1: Flip-flop input equations
• For our example, the flip-flop
input equations are:
J0 = X + Q 1
K0 = X’
J1 = X’ Q0
K1 = X + Q 0
7
Step 2: Flip-flop input values
• With these equations, we can make a table showing J1, K1, J0 and K0 for
the different combinations of present state Q1Q0 and input X.
J1 = X’ Q0 J0 = X + Q 1
K1 = X + Q 0 K0 = X’
8
Step 3: Find the next states
• Finally, use the JK flip-flop characteristic tables or equations to find
the next state of each flip-flop, based on its present state and inputs.
• The general JK flip-flop characteristic equation is:
9
Step 3 Concluded
• Finally, here are the next states for Q1 and Q0, using these equations:
10
Getting the state table columns straight
• The table starts with Present State and Inputs.
– Present State and Inputs yield FF Inputs.
– Present State and FF Inputs yield Next State, based on the flip-
flop characteristic tables.
– Present State and Inputs yield Output.
• We really only care about FF Inputs in order to find Next State.
• Note: the outputs occur this cycle and the next state in the next cycle
input output
Present State Input Next State output
0/0 1/0
Q1 Q0 x Q1 Q0 z
0 0 0 0 0 0
1/0
0 0 1 0 1 0 00 01
0 1 0 1 0 0
0 1 1 0 1 0 1/1
0/0 1/0 0/0
1 0 0 1 1 0
1 0 1 0 1 0
1 1 0 0 0 0 0/0
11 10
1 1 1 0 1 1
state
12
Analysis: Example #2
Given a sequential circuit with two JK flip-flops A and B, and one
input x.
J Q A
x K Q'
J Q B
K Q'
CP
– JA = B JB = x'
– KA = B.x' KB = A'.x + A.x' = A x
13
Analysis: Example #2
Flip-flop input functions:
– JA = B JB = x'
0 1
– KA = B.x’ KB = A'.x + A.x' = A x
0 0
1 1
J K Q(t+1) Comments 1 0
1 1
0 0 Q(t) No change
1 0
0 1 0 Reset
0 0
1 0 1 Set
1 1
1 1 Q(t)' Toggle
Present Next
state Input state Flip-flop inputs
A B x A B JA KA JB KB 1 1
0 0 0 0 1 0 0 1 0
0 0 1 0 0 0 0 0 1
0 1 0 1 1 1 1 1 0 0 11
0 1 1 1 0 1 0 0 1 00
1 0 0 1 1 0 0 1 1
1 0 1 1 0 0 0 0 0
1 1 0 0 0 1 1 1 1
1 1 1 1 1 1 0 0 0 0 0 0
1 10
01
1
15
Analysis: Example #3
Derive the state table and state diagram of the following circuit.
J Q A J Q B
K Q' K Q'
CP
y
x
State diagram:
Present Next
state Input state Output Flip-flop inputs
A B x A B y JA KA JB KB
0 0 0 0 1 0 0 1 1 1 1/1
0 0 1 0 0 1 0 1 0 0
0 1 0 1 0 1 1 0 1 1
0 1 1 1 1 0 1 0 0 0 0/1
1 0 0 0 0 1 0 1 0 0 00 10
1 0 1 0 1 0 0 1 1 1
1 1 0 1 1 0 1 0 0 0
1 1 1 1 0 1 1 0 1 1
0/0 0/1
1/1
1/0
1/0 11
01
0/0
18
Analyzing Sequential Circuit with
T Flip Flop
Q T Q(t+1)
Characteristic table. 0 0 0
0 1 1
1 0 1
Q(t+1) = T.Q' + T'.Q 1 1 0
T Flip-flop 21
Example: Analyzing Sequential Circuit with T FF
(cont.)
22
Example: Analyzing Sequential Circuit with T FF
(cont.)
23
Example: Analyzing Sequential Circuit with T FF
(cont.)
T Q(t+1)
0 Q(t)
1 Q’(t)
Characteristic Equation:
State equations:
TA = BX
TB = X
by substitution:
A(t+1) = TAA’ + TA’A
B(t+1) = TBB’ + TB’B
Example: Analyzing Sequential Circuit with T FF
(cont.)
26
Example: Analyzing Sequential Circuit with T FF
(cont.)
A B x TA TB A B y
0 0 0 0 0 0 0 0
0 0 1 0 1 0 1 0
0 1 0 0 0 0 1 0
0 1 1 1 1 1 0 0
1 0 0 0 0 1 0 0
1 0 1 0 1 1 1 0
1 1 0 0 0 1 1 1
1 1 1 1 1 0 0 1
27
Example: Analyzing Sequential Circuit with T FF
(cont.)
Present Out
Input Next State
State put
A B x A B y
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 0 1 0
0 1 1 1 0 0
1 0 0 1 0 0
1 0 1 1 1 0
1 1 0 1 1 1
1 1 1 0 0 1