A sequence detector is a sequential state machines which takes an input strings of bits and generates an output 1 whenever the target sequence has been detected.
Example:
Input X :101111010
Output Z :000000001
(a) Draw the state diagram for a sequence detector of 1010 using Moore machines.
(b) Write the Verilog code for the sequence detector.