Similar questions 18 more →
Finite-State Machine Design



Answer & solution
Answer: S0 self-loop; S1→S4→S2→S5→S6→S7→S3→S1. (no official key was published)
A D flip-flop takes its next output from its D input on the common active clock edge. All three updates use the old outputs simultaneously. Reading the circuit wires gives Q1(next)=Q2 XOR Q3, Q2(next)=Q1, and Q3(next)=Q2. In particular, do not feed the newly computed Q1 into Q2 during the same clock edge.
Evaluate the equations for every state:
S0: 000→000, hence S0→S0.
S1: 001→100, hence S1→S4.
S2: 010→101, hence S2→S5.
S3: 011→001, hence S3→S1.
S4: 100→010, hence S4→S2.
S5: 101→110, hence S5→S6.
S6: 110→111, hence S6→S7.
S7: 111→011, hence S7→S3.
To draw the diagram, put a self-loop on S0 and draw the separate seven-state directed cycle S1→S4→S2→S5→S6→S7→S3→S1. There is no external input, so each state has exactly one outgoing edge and there are no input labels to choose. The zero state is a fixed point because shifting zeros and XORing zeros still gives zeros. As a consistency check, the listed targets contain all eight states once; the transition function is invertible, since the old Q1 and Q2 are read from the new Q2 and Q3 and old Q3 is recovered by XORing new Q1 with new Q3.