GATE Computer ScienceVery hardGATE CS (PYQ pattern)

A sequence detector must output 1 whenever the last four input bits are 1011, with overlapping occurrences allowed. What are the minimum numbers of states needed in a Mealy machine and in a Moore machine for this detector?

  1. A. Mealy 4, Moore 5
  2. B. Mealy 4, Moore 4
  3. C. Mealy 5, Moore 5
  4. D. Mealy 3, Moore 4

Correct answer: A. Mealy 4, Moore 5

Mealy states record the longest useful suffix: none, 1, 10, 101; the output 1 is produced on the transition 101 --1--> 1, so 4 states suffice. A Moore machine needs one more state (1011) whose own output is 1, giving 5.

More Digital Logic questions

Exams that ask this topic