GATE Computer ScienceHardGATE CS · ISRO

A Mealy machine detects the sequence 1011 with overlap allowed and outputs 1 when the last four inputs are 1011. For the input stream 1011011101101011 (leftmost first), how many 1s does it output?

  1. A. 5
  2. B. 3
  3. C. 4
  4. D. 6

Correct answer: C. 4

Checking each window of four bits, the pattern 1011 ends at 4 positions (overlapping occurrences count).

More Digital Logic questions

Exams that ask this topic