IAE Academy

GATE 2018 IN Q.44: solution and answer

GATE 2018 · INQ.44 · 2 marks · MCQ

A 2-bit synchronous counter using two - flip flops is shown. The expressions for the inputs to the - flip flops are also shown in the figure. The output sequence of the counter starting from is

GATE 2018 IN question 44: Two J-K flip-flops (each box labelled J, K, Q, Q-bar, SET, CLR) share one Clock line, so the counter is synchronous.Tap to open full size
Figure from the GATE 2018 IN paper. It is part of the question.
Figure description

Two J-K flip-flops (each box labelled J, K, Q, Q-bar, SET, CLR) share one Clock line, so the counter is synchronous. The clock-input triangle carries no bubble (positive-edge triggered as drawn). Left flip-flop: output Q is labelled Q_1; its J input is labelled Q_1 + Q_2 and its K input is labelled Q_1 + Q_2. Right flip-flop: output Q is labelled Q_2; its J input is labelled Q_1 + Q_2 and its K input is labelled Q_1 + Q_2. SET and CLR are left unconnected. (Overbar = complement.)

  1. (A)

  2. (B)

  3. (C)

  4. (D)

Answer and solution

ANSWER

Option (C): starting from 00, the counter goes

Official answer: CSource: Official answer key, GATE 2018 IN (IIT Guwahati)

  1. Read the inputs off the figure (overbar = complement): , , , . Both flip-flops share one clock, so all four inputs are worked out from the present state, and both outputs change on the same edge.

  2. Use the J-K characteristic: holds, resets to 0, sets to 1, toggles.

  3. Present state : (reset). toggles . Next state .

  4. Present state : toggles . (set). Next state .

  5. Present state : (set). toggles . Next state .

  6. Present state : toggles . (reset). Next state , which is where the counter started.

  7. Cross-check with the characteristic equation . Since and : So the next state is : , the same as the state-by-state table.

  8. Sequence: . This is a 2-bit Gray-code (twisted-ring) counter, which is option (C).

KEY IDEA

In a synchronous counter, work out every J and K from the present state, then apply the J-K rules (00 hold, 01 reset, 10 set, 11 toggle) to both flip-flops at once. You can also check it in one line with . Here the inputs simplify to and , a 2-bit twisted-ring counter, and that gives the Gray sequence 00, 01, 11, 10.

WATCH OUT FOR

Updating first and then using the new to work out and within the same clock edge. That is ripple-style thinking, and it is wrong for a synchronous counter, where every input comes from the old state. Other slips: mixing up (reset) with (set), and missing an overbar on the input labels. For example, has no bars, while has two.

From the GATE 2018 IN paper. Every question of this paper · Download the full paper · All 30 Sequential questions, with notes

More Sequential questions