The following state diagram has to look for a non overlapping sequence of…
The following state diagram has to look for a non overlapping sequence of three 1's with initial state A. Determine the next state of state 'D' for input 1 and input 0 respectively.
- D, B
- D, A
- B, A
- A, C
Correct answer
C. B, A
Explanation
This is a Moore machine: $A$ = no 1s seen, $B$ = one 1, $C$ = two 1s, $D$ = three 1s detected (output $1$). Non-overlapping detection means that after reaching $D$ the detected 1s are not reused. - Input $1$ in $D$ is the first 1 of a new sequence, so the next state is $B$. - Input $0$ breaks the run, so the next state is $A$. (An overlapping detector would stay in $D$ on input 1.) Answer: (c) B, A.