Question

Consider the sequential circuit shown in the figure, where both flip-flops used are positive edge-triggered D flip-flops.

Sequential circuit with two positive edge-triggered D flip-flops connected in series with common clock input.

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 _____.

Official answer and solution
Official answer
2
From
Official GATE 2018 answer key

Solution

Determine the conditions for next-state equations Q1+Q_1^+ and Q2+Q_2^+ to equal current states Q1Q_1 and Q2Q_2.

From the circuit schematic:

  • D1=in  ⟹  Q1+=inD_1 = \text{in} \implies Q_1^+ = \text{in}
  • D2=Q1  ⟹  Q2+=Q1D_2 = Q_1 \implies Q_2^+ = Q_1

A state (Q1,Q2)(Q_1, Q_2) has a self-loop (transitions back to itself) if there exists an input in∈{0,1}\text{in} \in \{0, 1\} such that:

Q1+=Q1  ⟹  in=Q1Q_1^+ = Q_1 \implies \text{in} = Q_1
Q2+=Q2  ⟹  Q1=Q2Q_2^+ = Q_2 \implies Q_1 = Q_2

The condition Q1=Q2Q_1 = Q_2 restricts candidates to (0,0)(0, 0) and (1,1)(1, 1):

  1. State (0,0)(0, 0): Setting in=0\text{in} = 0 gives Q1+=0,Q2+=Q1=0Q_1^+ = 0, Q_2^+ = Q_1 = 0, returning to (0,0)(0, 0).
  2. State (1,1)(1, 1): Setting in=1\text{in} = 1 gives Q1+=1,Q2+=Q1=1Q_1^+ = 1, Q_2^+ = Q_1 = 1, returning to (1,1)(1, 1).
  3. States (0,1)(0, 1) and (1,0)(1, 0): Require Q2+=Q1Q_2^+ = Q_1, so Q2+Q_2^+ would be 00 for (0,1)(0, 1) (different from current Q2=1Q_2 = 1) and 11 for (1,0)(1, 0) (different from current Q2=0Q_2 = 0). Neither can transition back to itself.

Thus, exactly 2 states possess a self-transition.

Final answer

2

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2018 Computer Science and Information Technology (CS)
Question
32 of 65, printed as CS Q.22
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.