GATE CS 2025 Set 1 | Question 60
Consider the given sequential circuit designed using D-Flip-flops. The circuit is initialized with some value (initial state). The number of distinct states the circuit will go through before returning back to the initial state is _________ . (Answer in integer)

Explanation
Answer: 7 to 8
From the circuit, \(D_1 = Q_0\), \(D_2 = Q_1\), \(D_3 = Q_2\) and \(D_0 = \overline{Q_3}\). Each clock shifts the bits one place and feeds the complement of the last bit back to the first: a 4-bit Johnson (twisted-ring) counter.
With the state written as \(Q_0Q_1Q_2Q_3\): 0000 → 1000 → 1100 → 1110 → 1111 → 0111 → 0011 → 0001 → 0000. The other 8 states form a second cycle of the same length (0100 → 1010 → 1101 → 0110 → 1011 → 0101 → 0010 → 1001 → 0100), so from any initial state the circuit comes back after 8 clocks.
That is 8 distinct states counting the initial one, or 7 besides it, so the official key accepts 7 to 8.
Answer: 8 (7 is also accepted)