GateAI
Combinational and Sequential Circuits

GATE CSE 2021 Set 2 · Q28

MCQ2 marksMedium

Time

Suppose we want to design a synchronous circuit that processes a string of 0's and 1's. Given a string, it produces another string by replacing the first 1 in any subsequence of consecutive 1's by a 0. Consider the following example. Input sequence: 00100011000011100 Output sequence: 00000001000001100 A Mealy Machine is a state machine where both the next state and the output are functions of the present state and the current input. The above mentioned circuit can be designed as a two-state Mealy machine. The states in the Mealy machine can be represented using Boolean values 0 and 1. We denote the current state, the next state, the next incoming bit, and the output bit of the Mealy machine by the variables ss, tt, bb and yy respectively. Assume the initial state of the Mealy machine is 0. What are the Boolean expressions corresponding to tt and yy in terms of ss and bb?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: B) t = b y = sb

Combinational and Sequential Circuits

Let state s=0s = 0 denote that the machine is not currently within a sequence of consecutive 1's (or the previous bit was 0). Let state s=1s = 1 denote that the first 1 of a sequence of consecutive 1's has just occurred and any immediately following 1's should be output as 1.

We determine the next state tt and output yy for all combinations of current state ss and incoming bit bb [1]:

  1. From state s=0s = 0 (initial state / previous bit was 0):

    • If b=0b = 0: the output is y=0y = 0, and next state is t=0t = 0.

    • If b=1b = 1: this is the first 1 in a consecutive sequence, so it must be replaced by 0 (y=0y = 0). The next state becomes t=1t = 1.

  2. From state s=1s = 1 (previous bit was 1):

    • If b=0b = 0: the run of 1's ends, output y=0y = 0, and next state is t=0t = 0.

    • If b=1b = 1: this is a subsequent 1 in the run, so output y=1y = 1, and next state remains t=1t = 1.

Constructing the state transition and output table:

Present State (ss)Input (bb)Next State (tt)Output (yy)
0000
0110
1000
1111

From the truth table:

  • t=bt = b

  • y=s⋅by = s \cdot b

Therefore, option (B) is correct.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Combinational and Sequential Circuits previous year question is Q28 of the GATE CSE 2021 Set 2 paper. Find more GATE CSE PYQs on Combinational and Sequential Circuits in Digital Logic, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Combinational and Sequential Circuits PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Combinational and Sequential Circuits in GATE CSE

Combinational and Sequential Circuits has 32 GATE CSE PYQs across 22 papers from 2011 to 2026. 14 of them are 2-mark MCQs like this one, and GATE CSE 2021 Set 2 has 2.

How GATE tests Combinational and Sequential Circuits

More from GATE CSE 2021 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2021 Set 2 · Q28 · MCQ

Suppose we want to design a synchronous circuit that processes a string of 0's and 1's. Given a string, it produces another string by replacing the first 1 in any subsequence of consecutive 1's by a 0. Consider the following example. Input sequence: 00100011000011100 Output sequence: 00000001000001100 A Mealy Machine is a state machine where both the next state and the output are functions of the present state and the current input. The above mentioned circuit can be designed as a two-state Mealy machine. The states in the Mealy machine can be represented using Boolean values 0 and 1. We denote the current state, the next state, the next incoming bit, and the output bit of the Mealy machine by the variables s, t, b and y respectively. Assume the initial state of the Mealy machine is 0. What are the Boolean expressions corresponding to t and y in terms of s and b?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.