- 2080 Baisakh · 8 marks
Mod-5 Gray code synchronous up counter
Short answer
A mod-5 Gray code synchronous up-counter uses three JK flip-flops on negative edge. Sequence: 000, 001, 011, 010, 110, 000. Flip-flop equations: J2 = Q1 Q0', K2 = 1; J1 = Q0, K1 = Q2; J0 = Q1', K0 = Q1. Counter is self-starting.
Design mod-5 Gray code synchronous up-counter with negative edge triggering clock system. (Use JK flip-flops).
A mod-5 Gray code counter steps through the first five codes of the 3-bit Gray sequence, changing only one bit per clock:
Step 1: Flip-flops and unused states
- 5 states need JK flip-flops (), all clocked together on the negative (falling) edge.
- Unused states 100, 101 and 111 are treated as don't cares (X).
Step 2: Excitation table
JK excitation: 0→0: J=0, K=X; 0→1: J=1, K=X; 1→0: J=X, K=1; 1→1: J=X, K=0.
| Present Q2Q1Q0 | Next Q2Q1Q0 | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|
| 000 | 001 | 0 | X | 0 | X | 1 | X |
| 001 | 011 | 0 | X | 1 | X | X | 0 |
| 011 | 010 | 0 | X | X | 0 | X | 1 |
| 010 | 110 | 1 | X | X | 0 | 0 | X |
| 110 | 000 | X | 1 | X | 1 | 0 | X |
Step 3: K-maps
| J0: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 1 | X | X | 0 |
| 1 | X | X | X | 0 |
| K0: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | 0 | 1 | X |
| 1 | X | X | X | X |
| J1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | X | X |
| 1 | X | X | X | X |
| K1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | 0 | 0 |
| 1 | X | X | X | 1 |
| J2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 |
| 1 | X | X | X | X |
: Q2 = 1 only in state 110, where it must reset, and the other cells are X, so .
Step 4: Equations
Step 5: Circuit diagram
+-----+ +-----+ +-----+
J0>|J Q|-Q0 J1>|J Q|-Q1 J2>|J Q|-Q2
| FF0 | | FF1 | | FF2 |
K0>|K | K1>|K | K2>|K |
+--o--+ +--o--+ +--o--+
| | |
CLK---+-------------+-------------+
J0 = Q1' K0 = Q1
J1 = Q0 K1 = Q2
J2 = Q1.Q0' K2 = 1
Only one 2-input AND gate is needed, because and can be taken directly from the flip-flops' outputs.
Step 6: Check of unused states
| Unused state | Next state |
|---|---|
| 100 | 001 |
| 101 | 011 |
| 111 | 000 |
All unused states enter the main sequence after one clock, so the counter is self-starting.
Step 7: Timing diagram (negative edge)
CLK __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2 ________________|‾‾‾|___________
Q1 ________|‾‾‾‾‾‾‾‾‾‾‾|_______|‾‾‾
Q0 ____|‾‾‾‾‾‾‾|___________|‾‾‾‾‾‾‾
Cnt 000 001 011 010 110 000 001 011
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- MOD-6 synchronous counter, negative edge JK · Digital Logic, chapter 8 · asked 4×
- Mod-10 negative edge ripple counter with JK · Digital Logic, chapter 8
- SR equation; mod-5 counter using D flip-flops · Digital Logic, chapter 8
- Asynchronous mod-12 up counter using JK · Digital Logic, chapter 8
- Mod-5 synchronous counter using JK · Digital Logic, chapter 8 · asked 4×
- Sync vs async; mod-6 synchronous counter (JK) · Digital Logic, chapter 8