A sequence detector is a sequential state machine. In a Moore machine, output depends only on the present state and not dependent on the input (x). Hence in the diagram, the output is written with the states.
The state diagram of a moore machine for a 101 detector is:
- The state table for the above diagram:
Four states will require two flip flops. Consider two D flip flops. Their excitation table is shown below.
- K-maps to determine inputs to D Flip flop:
- Circuit diagram for the sequence detector: