Similar questions 4 more →
Counters & Timing

Answer & solution
Answer: Use cyclic Gray sequence 000,001,011,010,110,111,101,100; D2=Q2Q0+Q1¬Q0, D1=Q1¬Q0+¬Q2Q0, D0=Q2Q1+¬Q2¬Q1. (no official key was published)
Use all eight states in the reflected Gray-code order, including a one-bit wraparound:
000 → 001 → 011 → 010 → 110 → 111 → 101 → 100 → 000.
A binary counter would fail at transitions such as 011→100, where three bits change. In this Gray cycle every adjacent pair, including 100→000, differs in exactly one bit.
For a D flip-flop, next Q equals current D at the active clock edge. Thus the state table directly gives the needed excitation table:
Q2Q1Q0 | D2D1D0
000 | 001
001 | 011
010 | 110
011 | 010
100 | 000
101 | 100
110 | 111
111 | 101
Grouping the 1s of each next-state column on a three-variable Karnaugh map gives:
D2=(Q2∧Q0)∨(Q1∧¬Q0)
D1=(Q1∧¬Q0)∨(¬Q2∧Q0)
D0=(Q2∧Q1)∨(¬Q2∧¬Q1).
Circuit specification
Q2,Q1,Q0 ──> above AND/OR/NOT combinational network ──> D2,D1,D0 D2 ──>[DFF2]──>Q2; D1 ──>[DFF1]──>Q1; D0 ──>[DFF0]──>Q0
One common clock drives all three DFFs; clear inputs initialize Q2Q1Q0=000. Feedback connects each Q to the combinational network. All states belong to the cycle, so there are no unused lockout states. The guarantee concerns stable states at clock edges, assuming setup/hold and propagation constraints; glitches within combinational logic are not extra counter states.