Question
We want to design a synchronous counter that counts the sequence 0-1-0-2-0-3 and then repeats. The minimum number of J-K flip-flops required to implement this counter is _____.
Official answer and solution
- Accepted answers
- 3 to 4
- From
- Official GATE 2016 answer key
Official answer key accepts range 3.0 to 4.0.
Solution
Determine the number of distinct internal states needed to generate the repeating non-monotonic sequence.
The required count sequence of output values is:
Notice that the output value 0 appears three separate times in one complete cycle, and each occurrence must transition to a different next output:
- The first 0 must transition to 1.
- The second 0 must transition to 2.
- The third 0 must transition to 3.
A sequential circuit requires a unique internal state for each step in the sequence so that the next-state logic is deterministic. Thus, at least 6 distinct internal states () are required.
To represent states using binary flip-flops:
With 3 J-K flip-flops, states can be uniquely encoded. (If the counter is designed using one flip-flop per distinct state or specific output-state encodings, 4 flip-flops may also be used; the official key accepts both 3 and 4).
3
Looking only at the maximum output value 3 () and assuming 2 flip-flops suffice (), which fails because 0 transitions to three different values.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2016 Computer Science and Information Technology (CS) Session 1
- Question
- 18 of 65, printed as CS Q.8
- 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.