GateAI
Combinational and Sequential Circuits

GATE CSE 2018 · Q22

NAT1 markMedium

Time

Consider the sequential circuit shown in the figure, where both flip-flops used are positive edge-triggered D flip-flops. The number of states in the state transition diagram of this circuit that have a transition back to the same state on some value of “in” is ________.

GATE CSE 2018 Q22 diagram

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 2

Combinational and Sequential Circuits

Let the state of the circuit be represented as (QA,QB)(Q_A, Q_B), where:

  • QAQ_A is the state/output of the first (left) flip-flop.

  • QBQ_B is the state/output of the second (right) flip-flop.

From the circuit diagram, the inputs to the D flip-flops are:

  • DA=inD_A = \text{in}

  • DB=QAD_B = Q_A

At the next active clock edge, the next state (QA+,QB+)(Q_A^+, Q_B^+) is given by: QA+=DA=inQB+=DB=QA \begin{aligned} Q_A^+ &= D_A = \text{in} Q_B^+ &= D_B = Q_A \end{aligned}

For a state (QA,QB)(Q_A, Q_B) to transition back to itself (i.e., a self-loop), we require:

  1. QA+=QA  ⟹  in=QAQ_A^+ = Q_A \implies \text{in} = Q_A

  2. QB+=QB  ⟹  QA=QBQ_B^+ = Q_B \implies Q_A = Q_B

Thus, a self-loop exists if and only if QA=QBQ_A = Q_B and the input applied is in=QA\text{in} = Q_A:

  • For state 00 (QA=0,QB=0Q_A = 0, Q_B = 0): With in=0\text{in} = 0, next state is (0,0)=00(0, 0) = 00 (Self-loop exists).

  • For state 11 (QA=1,QB=1Q_A = 1, Q_B = 1): With in=1\text{in} = 1, next state is (1,1)=11(1, 1) = 11 (Self-loop exists).

  • For state 01 (QA=0,QB=1Q_A = 0, Q_B = 1): Next state is (in,0)(\text{in}, 0), which can never be 0101.

  • For state 10 (QA=1,QB=0Q_A = 1, Q_B = 0): Next state is (in,1)(\text{in}, 1), which can never be 1010.

Therefore, exactly 2 states (0000 and 1111) have a transition back to themselves.

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 Q22 of the GATE CSE 2018 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. 6 of them are 1-mark NAT questions like this one, and it is the only one in GATE CSE 2018.

How GATE tests Combinational and Sequential Circuits

More from GATE CSE 2018

Share this solution

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

GateAI solution cardGATE CSE 2018 · Q22 · NAT

Consider the sequential circuit shown in the figure, where both flip-flops used are positive edge-triggered D flip-flops. The number of states in the state transition diagram of this circuit that have a transition back to the same state on some value of “in” is …

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.