Pergunta de entrevista da empresa Texas Instruments

design a sequence detector which should give output 1 when three consecutive 1 or 2 consecutive 0 occurs in serial input