Lecture 32
Lecture 32
Flip-flop Output
Inputs Transitions
D Qt+1
1 1
0 0
Karnaugh Maps
The D input table is shown in table 32.2. The Karnaugh maps for the input
expressions are also derived from the input table.
D 2 = Q 2 ⊕Q1Q 0 D1 = Q 0 ⊕Q1 D0 = Q0
CLR
Q CLR
Q CLR
Q
CLK
Figure 32.1a D flip-flop based implementation of 3-bit Synchronous Counter
2. Next-State Table
The next state is the state to which the sequential circuit switches when a clock
transition occurs. Table 32.4. The next state outputs for X=0 and X=1 are shown
separately.
4. Karnaugh Maps
The J-K flip-flop inputs when state variables change when X=0 and X=1 are
shown in the table 32.6. The J-K inputs can be directly mapped to 4-Variable Karnaugh
maps. Table 32.7
Q2Q1/Q0X 00 01 11 10 Q2Q1/Q0X 00 01 11 10
00 0 1 0 0 00 x x x x
01 0 0 0 1 01 x x x x
11 x x x x 11 0 0 0 1
10 x x x x 10 0 1 0 0
J0 = 1 K0 = 1
Q2Q1/Q0X 00 01 11 10 Q2Q1/Q0X 00 01 11 10
00 0 1 0 1 00 x x x x
01 x x x x 01 0 1 0 1
11 x x x x 11 0 1 0 1
10 0 1 0 1 10 x x x x
J1 = Q 0 X + Q 0 X K1 = Q0 X + Q0 X
Q2Q1/Q0X 00 01 11 10 Q2Q1/Q0X 00 01 11 10
00 1 1 x x 00 x x 1 1
01 1 1 x x 01 x x 1 1
11 1 1 x x 11 x x 1 1
10 1 1 x x 10 x x 1 1
J 2 = Q 1Q 0 X + Q 1 Q 0 X K 2 = Q 1Q 0 X + Q 1 Q 0 X
X=0 (up) Q0 Q1 Q2
X=1 (down)
1
SET SET SET
J Q J Q J Q
CLK
Figure 32.3 Implementation of the Sequential Circuit
State Reduction
A state diagram show the sequence of current and next states through which the
state machine sequences. Figure 32.4. The transition from a current state to the next state
is determined by current state and the inputs. The outputs of the state machine may also
change during the transition from the current state to the next state. The outputs may
depend only on the current state (Moore Machine) or a combination of current state and
the inputs (Mealy Machine). It is possible that two or more states are equivalent. Two
states are considered equivalent if for the same set of inputs the states change to the same
next state or equivalent next states and give identical outputs. If equivalent states exist
then one of the equivalent state is removed. Reduction in the number of state results in
fewer flip-flops and a simpler circuit.
1/0 0/1
a
0/0
b
e 0/0
0/0
1/0 1/1
f
1/1
1/0
c
0/1
1/1 0/0
0/0 d
g
1/0
Reduction in the number of states is possible if one is interested only in the input
and output relationship, that is, input and outputs remain unchanged. When external
outputs are taken directly from flip-flops, the output must be independent of the number
of states before state reduction algorithms are applied. Consider the sequence a, b, c, f, d,
d, e, g, e, g, d, e, a, f, d, e, a starting from the initial state a. The inputs and the
corresponding outputs are shown in the table. Table 32.8
state a b c f d d e g d e a f d e a
Input 1 1 1 0 1 0 1 0 0 0 0 0 0 0
Output 0 1 1 0 0 1 1 0 1 0 0 0 1 0
In the next state table the state ‘f’ is equivalent to state ‘g’ as for each set of inputs
states ‘f’ and ‘g’ change to states ‘d’ and ‘e’ respectively. Table 32.9a. Similarly, the
outputs also remain identical. Therefore state ‘g’ can be eliminated and in the state table
all instances of state ‘g’ are replaced by state ‘f’.
Table 32.9b Next State table, with state ‘g’ eliminated and instances of state ‘g’
replaced by state ‘f’
In the next state table state ‘c’ is equivalent to state ‘e’ as for each input, the
current state changes to the same next states. Table 32.9b. The outputs are also identical
when changing from the present state to the next state. The state table is simplified by
eliminating state e and replacing all instances of state ‘e’ with state ‘c’. table 32.9c. The
State diagram represented by the simplified state table is shown. Figure 31.7.
Table 32.9c Next State table, with state ‘e’ eliminated and instances of state ‘e’
replaced by state ‘c’
1/0 0/1
a
b
0/0
0/0
1/1
1/0
f
1/1
c
0/0 0/1
d
1/0
state a b c f d d c f d c a f d c a
Input 1 1 1 0 1 0 1 0 0 0 0 0 0 0
Output 0 1 1 0 0 1 1 0 1 0 0 0 1 0
Table 32.10 The input and output sequence obtained from the simplified state diagram