GATE / CS ARCHIVE

SIMILAR QUESTIONS / DIGITAL LOGIC

Count hidden phases in repeated-output counters

2 questions solved the same way, newest first. Back to Digital Logic

How these are solved

Distinguish identical output values with different required futures; count phases in the complete output cycle, then choose ceil(log2(number of phases)) flip-flops. Same displayed number is not one state when the subsequent sequence differs.

1 mark · NAT
Report issue

Counters & Timing

Question 8, GATE 2016: A synchronous counter repeatedly outputs 0,1,0,2,0,3. What is the minimum number of J-K flip-flops required?
Tap to enlarge
Answer & solution

Official answer: 3.0 : 4.0

Our answer: 3

The repeating output sequence has six distinct phases. Its three occurrences of 0 require different future successors 1, 2, 3, so they cannot share one deterministic internal state. At least six states require ceil(log₂6)=3 flip-flops; a six-state cycle with output decoding attains this. The official accepted interval 3.0 : 4.0 is preserved even though the minimum derived here is 3.

Counting distinct output labels alone would suggest four states, but a deterministic counter must also remember where it is in the cycle. The zero before 1, the zero before 2 and the zero before 3 have different next outputs and so need different internal states. A possible 6-state encoding uses 000 through 101 and decodes them to 0,1,0,2,0,3. Three bits store those phases; suitable J-K input logic realizes the transition cycle. The official interval remains a scoring fact, not a proof that four is the minimum.

Original paper, page 5 · Answer key

1 mark · NAT
Report issue

Counters & Timing

Question 17, GATE 2015: Minimum JK flip-flops for synchronous count output sequence 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, …?
Tap to enlarge
Answer & solution

Official answer: 3

The repeated output at each count needs an internal phase bit: the two appearances of 0 must have different next outputs eventually and cannot be the same deterministic state. The sequence has period 8, requiring eight states and at least 3 bits. A3-bit modulo 8 counter with the low bit suppressed in the output realizes it, so 3 JK flip-flops suffice.

Although only four output values appear, the repeated occurrences need different internal states. If the two consecutive zeros were the same state of an autonomous deterministic counter, they would have the same successor and could not later advance to 1. The complete repeating pattern has period 8, so at least 8 internal states and ceil(log 2 8)=3 flip-flops are required. A modulo 8 counter outputs its two upper bits, holding each value for two clocks, which attains the bound.

Original paper, page 32 · Answer key