IAE Academy

GATE 2023 CS Q.43: solution and answer

GATE 2023 · CSQ.43 · 2 marks · MCQ

Consider a sequential digital circuit consisting of T flip-flops and D flip-flops as shown in the figure. CLKIN is the clock input to the circuit. At the beginning, Q1, Q2 and Q3 have values 0, 1 and 1, respectively.

Which one of the given values of (Q1, Q2, Q3) can NEVER be obtained with this digital circuit?

GATE 2023 CS question 43: Three flip-flops in a row, all clocked by the same CLKIN (the clock line runs along the bottom to the CLK input of each).Tap to open full size
Figure from the GATE 2023 CS paper. It is part of the question.
Figure description

Three flip-flops in a row, all clocked by the same CLKIN (the clock line runs along the bottom to the CLK input of each). Left: a T flip-flop (output Q1). Middle: a D flip-flop whose D input is connected to Q1 (output Q2). Right: a T flip-flop whose T input is connected to Q2 (output Q3). Q3 also feeds an inverter (NOT gate, bubble at its output); the inverter output runs back over the top of the circuit to the T input of the first (left) T flip-flop.

  1. (A)

    (0, 0, 1)

  2. (B)

    (1, 0, 0)

  3. (C)

    (1, 0, 1)

  4. (D)

    (1, 1, 1)

Answer and solution

ANSWER

Option (A), (0, 0, 1), can never be obtained.

Official answer: ASource: Official answer key, GATE 2023 CS (IIT Kanpur)

  1. Read the connections: flip-flop 1 is a T flip-flop with (the inverter output returns to its T input), flip-flop 2 is a D flip-flop with , and flip-flop 3 is a T flip-flop with . All three share CLKIN, so they change together on each clock edge.

  2. A T flip-flop gives and a D flip-flop gives . So , , .

  3. Start at : , , , giving .

  4. From : , , , giving . From : , , , giving .

  5. From : , , , giving . From : , , , giving .

  6. From : , , , giving . From : , , , giving , the start.

  7. The circuit cycles through , seven states, and then repeats. Options B, C and D, namely , and , all appear in this cycle. The state is not in the cycle, so it can never be reached from the start. Option (A), , can never occur.

KEY IDEA

Write the next-state equations from the figure ( for a T flip-flop, for a D flip-flop), then follow the circuit clock by clock from the given start state. Only the states on that path can ever occur.

WATCH OUT FOR

Forgetting the inverter on the feedback to the first T input (using instead of ), or testing all eight states instead of only those reachable from the start state .

From the GATE 2023 CS paper. Every question of this paper · Download the full paper · All 37 Sequential questions, with notes

More Sequential questions