a) Draw the state diagram for a FSM that detects the sequence r = 0101 (without overlaps).
b) The FSM in part a can beimplemented with 3 FFs. Assume the state assignments are A = 000, B= 001, C = 100, D = 110 and E = 010. Draw a schematic for the FSMin part a