GATE / CS ARCHIVE

GATE CSE 2021 SET 2 / QUESTION 28

GATE CSE 2021 Set 2 Q28

Digital Logic · Finite-State Machine Design · Full GATE CSE 2021 Set 2 paper

GATE 2021 Set 2, Q28 2 marks · MCQ
Report issue

Finite-State Machine Design

Question 28, GATE 2021: Two-state Mealy circuit replaces the first 1 of each maximal run of 1s by 0. Input 00100011000011100 produces 00000001000001100. Current state s starts at 0; current bit b; next state t; output y. A t=s+b,y=sb; B t=b,y=sb; C t=b,y=s¬b; D t=s+b,y=s¬b. Here + means OR.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (4 options)

Use state s to remember the previous input bit, initialized 0. The next state is therefore t=b. Output1 is permitted only when both the previous and current bits are 1; the first 1 after 0 is suppressed. Thus y=s·b, giving B.

State/input table (s,b)→(t,y) is 00→00,01→10,10→00,11→11. A D flip-flop with D=b stores the preceding input and an AND gate computes y=Q∧b. The reset state Q=0 ensures a leading 1 is suppressed. No lookahead into future input is needed.

Original paper, page 69 · Answer key