GATE / CS ARCHIVE

GATE CSE 2025 SET 1 / QUESTION 60

Finding the cycle length of a twisted-ring counter

Digital Logic · Counters & Timing · Full GATE CSE 2025 Set 1 paper

GATE 2025 Set 1, Q60 2 marks · NAT
Report issue

Counters & Timing

Question 60, GATE 2025: Four D flip-flops share a clock. Their outputs feed the next inputs as Q0→D1, Q1→D2, Q2→D3, and complemented Q3→D0. Starting from any four-bit initial state, how many distinct states occur before it returns? The wording may count or exclude the initial state; the official interval is 7–8.
Tap to enlarge
Answer & solution

Official answer: 7 to 8

Our answer: 8

Approach: Derive the synchronous state update and show its period for every initial state, rather than checking only all-zero initialization.
Write the state as (q0,q1,q2,q3). The next-state map is T(q0,q1,q2,q3)=(¬q3,q0,q1,q2), because a D flip-flop copies its input at a clock edge. After four clocks every original bit has shifted through the complemented feedback once, so T^4(q)=¬q. After eight clocks it has been complemented twice, so T^8(q)=q.
The map is invertible, and each orbit’s period divides eight. Possible smaller divisors are 1,2,4, but any such period would make T^4(q)=q. That is impossible because no Boolean vector equals its bitwise complement. Hence every initial vector lies on an eight-state cycle.
For example, 0000→1000→1100→1110→1111→0111→0011→0001→0000. Counting the initial state gives eight distinct cycle states; counting only new states visited after leaving it and before return gives seven. Preserve the official 7–8 range while distinguishing the conventions. The feedback was visually confirmed to use complemented Q3, not Q3.

Original paper, page 60 · Answer key