Professional Documents
Culture Documents
1 Problem
Design a circuit to implement a Gray code counter using JK ip ops. Assume only a 3-bit counter.
State S0 S1 S2 S3
a 0 0 0 0
b 0 0 1 1
c 0 1 0 1
a+ 0 0 1 0
b+ 0 1 0 1
c+ 1 1 0 0
State S4 S5 S6 S7
a 1 1 1 1
b 0 0 1 1
c 0 1 0 1
a+ 0 1 1 1
b+ 0 0 1 0
c+ 0 0 1 1
4 JK Flip-Flop States
The JK ip-op states are illustrated in the gure below. For example, to change from S0 (Q = 0) to S1 (Q = 1), may be either J = 1, K = 0, or J = 1, K = 1. In short, J = 1, K = d. Three ip ops will be used in the circuit where Q0 represents the LSB and Q2 is the MSB.
1d
J Q
0d
K Q
S0 d1
S1
d0
The following truth table species the inputs to the three JK ip ops. State S0 S1 S2 S3 S4 S5 S6 S7 Q2 0 0 0 0 1 1 1 1 Q1 0 0 1 1 0 0 1 1 Q0 0 1 0 1 0 1 0 1
+ Q2 0 0 1 0 0 0 1 1 + Q1 0 1 1 1 0 0 1 0 + Q0 1 1 0 0 0 0 1 1
J0 1 d 0 d 0 d 1 d
K0 d 0 d 1 d 1 d 0
J1 0 1 d d 0 0 d d
K1 d d 0 0 d d 0 1
J2 0 0 1 0 d d d d
K2 d d d d 1 0 0 0
Q2 Q0 d 0
1 5
K0
d
5
d
4
0
0
1
4
d d
6
Q1
2
0
3
d
7
d
6
Q1
2
d
3
1
7
= =
Q1 Q2 + Q1 Q2 Q1 Q2 + Q1 Q2 Q2 K1 Q0 d
0 1
1
5
0
4
0 d
6
d
5
d
4
d 0
6
Q1
2
d
3
d
7
Q1
2
0
3
0
7
Q2 K2 Q0 d
0 1
0
5
d
4
d d
6
d
5
0
4
1 0
6
Q1
2
1
3
0
7
Q1
2
d
3
d
7