Latches and Flip-Flops: GATE ECE practice questions with solutions

This topic covers SR, D, JK and T devices, excitation tables, latch versus flip-flop timing, and setup, hold and skew. The 15 original questions follow the GATE EC format: 9 MCQ, 2 MSQ and 4 NAT, from 5 easy, 7 medium and 3 hard.

Three ideas to know:

  • In a NOR latch, active-HIGH inputs that are both asserted break the Q, Q′ relationship.
  • Excitation tables list the inputs that cause each transition, with don't-cares wherever two inputs both work.
  • All flip-flops on a common clock use the present state values; compute every next state from the same snapshot.

It helps GATE EC and ECE students revising Digital Circuits for the exam or a semester test. Helpful background: JK flip-flop and D flip-flop. Start with the 5 easy questions, then work up to the 3 hard ones.

Q.1

EasyMCQ1 mark

For an SR latch built from two cross-coupled NOR gates (active-HIGH S and R), which input combination is not allowed?

  1. Option A: S = 0, R = 0
  2. Option B: S = 1, R = 1
  3. Option C: S = 1, R = 0
  4. Option D: S = 0, R = 1
Show answer and solutionHide answer and solution

Answer: (B)

Key idea: In a NOR latch, active-HIGH inputs that are both asserted break the Q, Q′ relationship.

1. S = 1, R = 1 forces both NOR outputs, Q and Q′, to 0, so they are no longer complements.

2. When both inputs then return to 0 together, the final state depends on which gate is faster.

3. So S = R = 1 is the forbidden input.

Common mistake: Carrying over the rule for the NAND latch (active-LOW inputs), where S = R = 0 is forbidden, gives option (A).

You need: SR latch, NOR gates

Q.2

EasyMCQ1 mark

A JK flip-flop has J = 1 and K = 1 at an active clock edge. Its output

  1. Option A: holds its value
  2. Option B: resets to 0
  3. Option C: sets to 1
  4. Option D: toggles
Show answer and solutionHide answer and solution

Answer: (D)

Key idea: J = K = 1 is the input combination that makes a JK flip-flop toggle.

1. The JK characteristic equation is Q⁺ = JQ′ + K′Q.

2. With J = K = 1, Q⁺ = Q′.

3. So the output toggles.

Common mistake: Confusing it with J = K = 0, which holds the value, option (A).

You need: JK flip-flop

Q.3

EasyMCQ1 mark

The characteristic equation of a D flip-flop is

  1. Option A: Q⁺ = D
  2. Option B: Q⁺ = D ⊕ Q
  3. Option C: Q⁺ = DQ′
  4. Option D: Q⁺ = D′
Show answer and solutionHide answer and solution

Answer: (A)

Key idea: A D flip-flop's next state does not depend on its present state.

1. At the active edge, a D flip-flop copies D to Q.

2. So the next state is Q⁺ = D, whatever the present state.

Common mistake: Writing the T flip-flop equation, Q⁺ = T ⊕ Q, with D in place of T gives option (B).

You need: D flip-flop

Q.4

EasyNAT1 mark

A positive-edge T flip-flop has T = 1 at all times and starts with Q = 0. After 5 rising clock edges, Q is ______.

Numerical answer: type a number.

Show answer and solutionHide answer and solution

Answer: 1

Key idea: A T flip-flop with T = 1 divides the clock by 2; after an odd number of edges it has changed state.

1. Each edge toggles Q: 1, 0, 1, 0, 1.

2. After an odd number of toggles from 0, Q = 1.

Common mistake: Counting one toggle too few (starting the count at the first edge as edge 0) gives 0.

You need: T flip-flop

Q.5

EasyMCQ1 mark

Which statement correctly describes the difference between a latch and a flip-flop?

  1. Option A: A flip-flop is level-sensitive and a latch is edge-triggered
  2. Option B: A latch is level-sensitive (transparent while enabled) and a flip-flop changes only at a clock edge
  3. Option C: Both are edge-triggered; only their outputs differ
  4. Option D: A latch has no enable input, while a flip-flop has a clock
Show answer and solutionHide answer and solution

Answer: (B)

Key idea: Latches are transparent while enabled; flip-flops are edge-triggered.

1. A gated latch follows its input for the whole time its enable is active.

2. A flip-flop samples its input only at the active clock edge.

3. That is statement (B).

Common mistake: Swapping the two terms gives option (A).

You need: Latches, flip-flops

Q.6

MediumMCQ1 mark

In the excitation table of a JK flip-flop, the transition from Q = 1 to Q⁺ = 0 requires (J, K) =

  1. Option A: (0, X)
  2. Option B: (1, X)
  3. Option C: (X, 1)
  4. Option D: (X, 0)
Show answer and solutionHide answer and solution

Answer: (C)

Key idea: Excitation tables list the inputs that cause each transition, with don't-cares wherever two inputs both work.

1. From Q = 1, K = 1 forces Q⁺ = 0 either by reset (J = 0) or by toggle (J = 1).

2. So J does not matter and K must be 1: (X, 1).

Common mistake: Swapping J and K gives (1, X), option (B), which is the excitation for 0 → 1.

You need: JK flip-flop, excitation tables

Q.7

MediumNAT2 marks

In a synchronous circuit, the launching flip-flop has a clock-to-Q delay of 3 ns, the longest combinational path is 12 ns, and the capturing flip-flop needs a setup time of 2 ns. Ignoring clock skew, the maximum clock frequency is ______ MHz.

Numerical answer: type a number.

Show answer and solutionHide answer and solution

Answer: 58.8 (accepted 58.5 to 59.1)

Key idea: The data must leave the first flip-flop, cross the logic and arrive a setup time before the next edge.

1. The minimum clock period is tclk-Q + tcomb + tsetup = 3 + 12 + 2 = 17 ns. 2. fmax = 1 ÷ 17 ns = 58.8 MHz.

Common mistake: Leaving out the setup time gives 15 ns and 66.7 MHz.

You need: Setup time, timing analysis

Q.8

MediumMCQ2 marks

Between two flip-flops on the same clock (no skew), the clock-to-Q delay is at least 1 ns and the shortest combinational path is 0.5 ns. The capturing flip-flop has a hold time of 2 ns. The hold check gives

  1. Option A: no violation, slack 1.5 ns
  2. Option B: no violation, slack 0.5 ns
  3. Option C: a violation of 0.5 ns
  4. Option D: a violation of 1.5 ns
Show answer and solutionHide answer and solution

Answer: (C)

Key idea: A hold check compares the fastest path, including clock-to-Q, with the hold time; the clock period does not appear.

1. The new data reaches the capturing flip-flop at tclk-Q(min) + tcomb(min) = 1 + 0.5 = 1.5 ns after the edge.

2. It must not change before the hold time, 2 ns.

3. Slack = 1.5 − 2 = −0.5 ns: a violation of 0.5 ns.

Common mistake: Leaving out the clock-to-Q delay compares 0.5 ns with 2 ns and gives a violation of 1.5 ns, option (D).

You need: Hold time, timing analysis

Q.9

MediumMCQ1 mark

A JK flip-flop is to behave as a D flip-flop. The inputs should be connected as

  1. Option A: J = D, K = D′
  2. Option B: J = D′, K = D
  3. Option C: J = K = D
  4. Option D: J = D, K = 0
Show answer and solutionHide answer and solution

Answer: (A)

Key idea: To convert flip-flops, choose inputs from the excitation table for each required next state.

1. With J = D and K = D′: if D = 1, (J, K) = (1, 0) sets Q; if D = 0, (J, K) = (0, 1) resets Q.

2. So Q⁺ = D.

Common mistake: Tying J = K = D, option (C), makes a T flip-flop: D = 1 toggles instead of setting.

You need: Flip-flop conversion

Q.10

MediumNAT2 marks

A negative-edge JK flip-flop starts with Q = 0. At six successive falling clock edges the inputs (J, K) are (1, 0), (1, 1), (0, 0), (1, 1), (0, 1) and (1, 1). After how many of these six edges is Q equal to 1? ______

Numerical answer: type a number.

Show answer and solutionHide answer and solution

Answer: 3

Key idea: Trace a JK flip-flop edge by edge, using the present Q for every toggle.

1. Edge 1, (1, 0): set, Q = 1.

2. Edge 2, (1, 1): toggle, Q = 0.

3. Edge 3, (0, 0): hold, Q = 0.

4. Edge 4, (1, 1): toggle, Q = 1.

5. Edge 5, (0, 1): reset, Q = 0.

6. Edge 6, (1, 1): toggle, Q = 1.

7. Q = 1 after edges 1, 4 and 6: 3 times.

Common mistake: Treating (1, 1) as hold instead of toggle gives Q = 1, 1, 1, 1, 0, 0, which is 4.

You need: JK flip-flop, sequential tracing

Q.11

MediumMSQ2 marks

A positive-level D latch (transparent while CLK = 1) and a positive-edge D flip-flop share the same D and CLK, and both start at Q = 0. CLK has a 10 ns period and is HIGH from 0 to 5 ns, 10 to 15 ns, 20 to 25 ns and so on. D is 0 from 0 to 2 ns, 1 from 2 to 7 ns, 0 from 7 to 12 ns and 1 from 12 ns onward. Which of the following statements are true?

Clock, period 10 nsTwo waveforms from 0 to 30 ns. CLK: HIGH from 0 to 5, 10 to 15 and 20 to 25 ns, LOW otherwise. D: 0 from 0 to 2 ns, 1 from 2 to 7 ns, 0 from 7 to 12 ns and 1 from 12 ns onward.05101520253001t (ns)CLK
Clock, period 10 ns
Data input DTwo waveforms from 0 to 30 ns. CLK: HIGH from 0 to 5, 10 to 15 and 20 to 25 ns, LOW otherwise. D: 0 from 0 to 2 ns, 1 from 2 to 7 ns, 0 from 7 to 12 ns and 1 from 12 ns onward.05101520253001t (ns)D
Data input D

One or more options are correct.

  1. Option A: The latch output is 1 at t = 4 ns
  2. Option B: The flip-flop output is 0 at t = 14 ns
  3. Option C: The latch output is 0 at t = 11 ns
  4. Option D: The flip-flop output first becomes 1 at t = 10 ns
Show answer and solutionHide answer and solution

Answer: (A), (B) and (C)

Key idea: A latch passes every change during its enable; a flip-flop sees only the value at the edge.

1. The latch is transparent from 0 to 5 ns, so it follows D to 1 at 2 ns: (A) true.

2. The flip-flop samples D at the rising edges 0, 10 and 20 ns, where D is 0, 0 and 1; so it is 0 until 20 ns: (B) true and (D) false.

3. From 10 to 15 ns the latch is transparent again and D = 0 until 12 ns, so at 11 ns the latch output is 0: (C) true.

Common mistake: Thinking the flip-flop catches the 1 that D carried between 2 and 7 ns at the next edge (10 ns) and choosing (D); by 10 ns D is already back to 0.

You need: D latch, D flip-flop, timing diagrams

Q.12

MediumMCQ1 mark

A positive-edge D flip-flop has its Q′ output connected back to its D input. The clock is 40 MHz. The frequency of the signal at Q is

  1. Option A: 40 MHz
  2. Option B: 80 MHz
  3. Option C: 10 MHz
  4. Option D: 20 MHz
Show answer and solutionHide answer and solution

Answer: (D)

Key idea: A flip-flop that toggles on every edge divides the clock frequency by 2.

1. Each rising edge loads D = Q′, so Q toggles once per clock cycle.

2. Two toggles make one full output cycle, so Q runs at 40 ÷ 2 = 20 MHz.

Common mistake: Assuming the output follows the clock and choosing 40 MHz, option (A).

You need: D flip-flop, frequency division

Q.13

HardNAT2 marks

Two positive-edge flip-flops share a clock and start at A = 0, B = 0. A is a T flip-flop with T = 1. B is a D flip-flop with D = A ⊕ B, using the values of A and B just before the edge. After 7 rising edges, the 2-bit value AB (A is the MSB) in decimal is ______.

Numerical answer: type a number.

Show answer and solutionHide answer and solution

Answer: 3

Key idea: All flip-flops on a common clock use the present state values; compute every next state from the same snapshot.

1. Next state: A⁺ = A′, B⁺ = A ⊕ B.

2. From AB = 00: edge 1 → 10, edge 2 → 01, edge 3 → 11, edge 4 → 00.

3. The sequence repeats every 4 edges, so edge 7 is the same as edge 3: AB = 11 = 3.

Common mistake: Using the new value of A when computing B (as if A updated first) gives the sequence 11, 01, 10, 00 and the value 2 after 7 edges.

You need: Synchronous sequential circuits, state tables

Q.14

HardMCQ2 marks

A path runs from flip-flop F1 to flip-flop F2. F1 has a clock-to-Q delay of 2 ns, the logic between them takes 10 ns, and F2 has a setup time of 1 ns. The clock reaches F2 1.5 ns later than it reaches F1. The minimum clock period for this path is

  1. Option A: 13 ns
  2. Option B: 11.5 ns
  3. Option C: 14.5 ns
  4. Option D: 10 ns
Show answer and solutionHide answer and solution

Answer: (B)

Key idea: Positive skew (capture clock later than launch clock) helps setup and hurts hold.

1. Without skew the period would need 2 + 10 + 1 = 13 ns.

2. The capturing edge at F2 arrives 1.5 ns late, which gives the data 1.5 ns more.

3. Tmin = 13 − 1.5 = 11.5 ns.

Common mistake: Adding the skew instead of subtracting it gives 14.5 ns, option (C).

You need: Setup time, clock skew

Q.15

HardMSQ2 marks

For the same F1 to F2 path, the shortest logic path is 1 ns, the minimum clock-to-Q delay of F1 is 1 ns, F2's hold time is 1 ns, and the clock reaches F2 1.5 ns later than F1. Which of the following statements are true?

One or more options are correct.

  1. Option A: The hold requirement is met
  2. Option B: Positive skew of this kind relaxes the setup requirement
  3. Option C: Positive skew of this kind makes the hold requirement harder to meet
  4. Option D: Adding 1 ns of buffer delay to the shortest path makes the hold slack +0.5 ns
Show answer and solutionHide answer and solution

Answer: (B), (C) and (D)

Key idea: Skew moves the capture edge: what it gives to setup it takes from hold.

1. The data changes at F2 at 1 + 1 = 2 ns after F1's edge.

2. It must stay stable until F2's edge plus hold: 1.5 + 1 = 2.5 ns.

3. Slack = 2 − 2.5 = −0.5 ns, a violation, so (A) is false.

4. A later capture edge gives setup more time, (B) true, and hold less margin, (C) true.

5. With 1 ns more delay, 3 − 2.5 = +0.5 ns, so (D) is true.

Common mistake: Ignoring the skew in the hold check gives 2 − 1 = +1 ns of slack and leads to choosing (A).

You need: Hold time, clock skew

Past GATE questions on this topic