GATE / CS ARCHIVE

SIMILAR QUESTIONS / DIGITAL LOGIC

Synthesize synchronous counter excitation equations

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

How these are solved

Write the specified state cycle/transition table, assign state bits, derive D=Qnext or T=Q XOR Qnext (and JK excitation if selected), then minimize each input function.

2 marks · MCQ
Report issue

Deriving saturating-counter D inputs

Counters & Timing

Question 37, GATE 2026: A synchronous 2-bit counter uses D flip-flops. With P=0 it increments, saturating at 11; with P=1 it decrements, saturating at 00. Find formulas for D₁,D₀ from the displayed next-state table. For current states 00,01,10,11, the next states are 01,10,11,11 when P=0 and 00,00,01,10 when P=1.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Givens and goal

A synchronous 2-bit counter uses D flip-flops. With P=0 it increments, saturating at 11; with P=1 it decrements, saturating at 00. Find formulas for D₁,D₀ from the displayed next-state table. For current states 00,01,10,11, the next states are 01,10,11,11 when P=0 and 00,00,01,10 when P=1.

Approach

Use D=next-state for each flip-flop, enumerate the minterms, and combine adjacent rows that differ in one Boolean variable.

Step-by-step solution

1. A D flip-flop takes its next state from its D input. Thus D1 and D0 must equal the corresponding next-state bits in all eight input/current-state rows.
2. Use variable order (P,Q1,Q0). The rows where D1=1 have binary indices 1,2,3,7. Adjacent pairs (1,3), (2,3) and (3,7) yield the implicants (NOT P)Q0, (NOT P)Q1 and Q1Q0. Therefore D1=(NOT P)Q1 OR (NOT P)Q0 OR Q1Q0.
3. The rows where D0=1 have indices 0,2,3,6. Adjacent pairs (0,2), (2,3) and (2,6) yield (NOT P)(NOT Q0), (NOT P)Q1 and Q1(NOT Q0). Therefore D0=(NOT P)(NOT Q0) OR (NOT P)Q1 OR Q1(NOT Q0).
4. These two expressions are the pair in B. Each of the other offered pairs fails at least one row: A gives the wrong D0 at 000; C gives the wrong D1 at 000; D gives the wrong D1 at 100.

Computational check: Evaluated B on all eight assignments and compared the resulting two-bit value with min(3,current+1) for P=0 and max(0,current−1) for P=1. All eight matched.

Visual check: Inspected both the full next-state table and each complement bar in the four expression pairs.

Complete transition check, written as P: current→next:

    0: 00→01, 01→10, 10→11, 11→11
    1: 00→00, 01→00, 10→01, 11→10

The last increment case and first decrement case are saturation cases: they hold at the boundary rather than wrapping to 00 or 11. Ignoring those two rows would derive an ordinary modulo-4 counter instead of the required saturating one.

Original paper, page 26 · Answer key

2 marks · MCQ
Report issue

Counters & Timing

Question 42, GATE 2017: A two-bit saturating up-counter has next states 00→01,01→10,10→11,11→11. It uses synchronous T flip-flops for bits Q1,Q0. Choose (T1,T0). A:(Q1Q0,¬Q1¬Q0). B:(¬Q1Q0,¬Q1+¬Q0). C:(Q1+Q0,¬Q1+¬Q0). D:(¬Q1Q0,Q1+Q0).
Tap to enlarge
Your answer
Answer & solution

Official answer: B

1. A T flip-flop holds its state when T=0 and toggles when T=1. Thus its required input is T=Q XOR Qnext; compute it separately for each bit.

2. For current states 00,01,10,11, the high-bit toggle requirements are 0,1,0,0. Only state 01 toggles Q1, giving T1=¬Q1·Q0. The low-bit requirements are 1,1,1,0, since Q0 changes on every transition except the saturated 11→11.

3. Therefore T0=¬(Q1Q0)=¬Q1+¬Q0. This pair is B. In particular the final state must hold rather than wrap to 00, so both T inputs must be zero at 11.

Original paper, page 16 · Answer key

2 marks · MCQ
Report issue

T-flip-flop excitation for Gray sequence

Counters & Timing

Question 61, GATE 2004: A synchronous two-bit counter uses T flip-flops with outputs Q2 (MSB) and Q1 (LSB), driven by a common clock. Its required cycle is 0→2→3→1→0. The figure wires XNOR(Q1,Q2) to T2; the unknown X drives T1. What is X?
Options:
(A) Q2′
(B) Q2+Q1
(C) (Q1⊕Q2)′
(D) Q1⊕Q2
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

1. Use state order Q2Q1=00→10→11→01→00. Since a T flip-flop toggles exactly when T=1, the LSB excitation Q1 XOR Q1(next) takes values 0,1,0,1 at states 00,10,11,01.

2. This is Q1 XOR Q2. The MSB excitation is its complement, agreeing with the pictured XNOR feedback into T2.

3. Thus X=Q1⊕Q2.

4. Teaching check: For each present state, calculate toggle=present bit XOR next bit. At 00,10,11,01 the LSB toggles 0,1,0,1 and the MSB toggles 1,0,1,0. These complementary sequences explain the given XNOR and required XOR together.

Original paper, page 9

5 marks · Descriptive
Report issue

Synchronous 1-4-2-3 counter

Counters & Timing

Question 16, GATE 1998: Design a synchronous counter producing 1,4,2,3,1,4,... .
Tap to enlarge
Answer & solution

Answer: Three common-clock D flip-flops with state sequence 001→100→010→011→001. (no official key was published)

Represent the displayed numbers by Q2Q1Q0. The required transitions are 001→100, 100→010, 010→011 and 011→001. Use three D flip-flops sharing one clock, with each D input equal to the corresponding next-state bit. Reset to 001 before normal counting.

A complete, self-starting design sends every unused state to 001:

current: 000 001 010 011 100 101 110 111
next:    001 100 011 001 010 001 001 001

Let mi denote the three-variable minterm for binary i. Then D2=m1=¬Q2·¬Q1·Q0; D1=m2+m4=¬Q0(¬Q2·Q1+Q2·¬Q1); D0=m0+m2+m3+m5+m6+m7. Wire these sum-of-products functions to D2,D1,D0. Notice D0 is 1 also for state 010, whose successor is 011. These equations directly implement every row of the table, so no unspecified-state behavior is hidden by don't-care minimization.

All bits update together on the active clock edge; a ripple counter would not implement this arbitrary sequence directly. Four internal states require only two bits if an output decoder is allowed, but three state flip-flops give the requested binary numbers directly and make unused-state recovery explicit.

Original paper, page 7

Descriptive
Report issue

Eight-state Gray counter

Counters & Timing

Question 4(c), GATE 1992: Design a 3-bit counter with D flip-flops such that at most one flip-flop changes between consecutive states.
Tap to enlarge
Answer & solution

Answer: Use cyclic Gray sequence 000,001,011,010,110,111,101,100; D2=Q2Q0+Q1¬Q0, D1=Q1¬Q0+¬Q2Q0, D0=Q2Q1+¬Q2¬Q1. (no official key was published)

Use all eight states in the reflected Gray-code order, including a one-bit wraparound:
000 → 001 → 011 → 010 → 110 → 111 → 101 → 100 → 000.
A binary counter would fail at transitions such as 011→100, where three bits change. In this Gray cycle every adjacent pair, including 100→000, differs in exactly one bit.

For a D flip-flop, next Q equals current D at the active clock edge. Thus the state table directly gives the needed excitation table:
Q2Q1Q0 | D2D1D0
000 | 001
001 | 011
010 | 110
011 | 010
100 | 000
101 | 100
110 | 111
111 | 101

Grouping the 1s of each next-state column on a three-variable Karnaugh map gives:
D2=(Q2∧Q0)∨(Q1∧¬Q0)
D1=(Q1∧¬Q0)∨(¬Q2∧Q0)
D0=(Q2∧Q1)∨(¬Q2∧¬Q1).

Circuit specification

Q2,Q1,Q0 ──> above AND/OR/NOT combinational network ──> D2,D1,D0
D2 ──>[DFF2]──>Q2; D1 ──>[DFF1]──>Q1; D0 ──>[DFF0]──>Q0

One common clock drives all three DFFs; clear inputs initialize Q2Q1Q0=000. Feedback connects each Q to the combinational network. All states belong to the cycle, so there are no unused lockout states. The guarantee concerns stable states at clock edges, assuming setup/hold and propagation constraints; glitches within combinational logic are not extra counter states.

Original paper, page 5