GATE Computer ScienceHardGATE CS (PYQ pattern)

A Mealy machine has states A (start), B, C and one input X; entries are next state / output. A: X=0 → A/0, X=1 → B/0. B: X=0 → C/0, X=1 → B/1. C: X=0 → A/1, X=1 → B/0. For every input sequence, its output after a bit is 1 exactly when

  1. A. the last two bits are 11 or the last three bits are 001
  2. B. the last two bits are 11 or 00
  3. C. the last three bits are 111 or 100
  4. D. the last two bits are 11 or the last three bits are 100

Correct answer: D. the last two bits are 11 or the last three bits are 100

B means 'last bit 1', C means 'last two bits 10', A means 'neither' (start, or after 00, or after 100). From B a 1 outputs 1 (pattern 11); from C a 0 outputs 1 (pattern 100). Nothing else outputs 1, so overlapping 11 and 100 are detected (e.g. 1100 outputs 0101).

More Digital Logic questions

Exams that ask this topic