IAE Academy

GATE 2025 EC Q.45: solution and answer

GATE 2025 · ECQ.45 · 2 marks · MCQ

A positive-edge-triggered sequential circuit is shown below. There are no timing violations in the circuit. Input is set to logic '0' and is set to logic '1' at all times. The timing diagram of the inputs and are also shown below.

The sequence of output from time to is ________.

GATE 2025 EC question 45: Circuit: a 2:1 MUX (MUX1) has input 1 = S, input 0 = P0 and select line SEL.Tap to open full size
Figure from the GATE 2025 EC paper. It is part of the question.
Figure description

Circuit: a 2:1 MUX (MUX1) has input 1 = S, input 0 = P0 and select line SEL. Its output drives the D input of D flip-flop FF1, which is positive-edge triggered on CLK. The Q output of FF1 goes to input 1 of a second 2:1 MUX (MUX2). Input 0 of MUX2 is P1, and its select line is SEL. The MUX2 output drives the D input of D flip-flop FF2, also positive-edge triggered on CLK. FF2's Q output is an unconnected stub. A 2-input XOR gate has output Y. One XOR input is the Q-bar output of FF2. The other XOR input is the Q-bar output of FF1, routed down and along beneath the circuit. Timing diagram: CLK starts low and has four pulses. Vertical dashed lines labelled T0, T1, T2 and T3 fall on the four falling edges of CLK, so each rising edge lies between the previous dashed line and the next. SEL is 0 until just after T0 (before the next rising edge), then 1 until just after T2 (again before the next rising edge), then 0. S is 0 until just after T1 (before the next rising edge), then 1 until just after T3, then 0.

  1. (A)

    1011

  2. (B)

    0100

  3. (C)

    0010

  4. (D)

    1101

Answer and solution

ANSWER

The output sequence from to is , option (A).

Official answer: ASource: Official answer key, GATE 2025 EC (IIT Roorkee)

  1. Read the circuit. A 2:1 MUX passes input 1 when its select line is 1 and input 0 when it is 0. With and :

  2. Find the output. The XOR takes the complemented outputs and (overline means complement). Complementing both inputs of an XOR does not change its output, because . So .

  3. Find where the flip-flops change. The dashed lines to sit on the falling edges of CLK. The flip-flops change only on rising edges, and exactly one rising edge comes just before each . So is set by the state loaded at the rising edge before . SEL and S change only between a falling edge and the next rising edge, so each has one clear value at every rising edge. Both flip-flops sample at the same edge. So sees the value held just before the edge, not the value FF1 is about to load (D flip-flop rule: ).

  4. Rising edge before : and , so and . Then and . No initial state is needed, because with neither D input depends on the earlier state.

  5. Rising edge before : and , so and . Then and .

  6. Rising edge before : and , so and (the old ). Then and .

  7. Rising edge before : SEL has already gone back to 0, while . So and . Then and .

  8. Result. From to , , so the sequence is 1011, which is option (A).

KEY IDEA

The XOR is fed by both complemented outputs, so . At each rising edge, read SEL and S. When the two flip-flops act as a 2-bit shift register (, old ). When they load the constants , whatever their earlier state. Each is a falling edge, so it shows the state loaded at the rising edge just before it.

WATCH OUT FOR

One mistake is feeding FF1's new value into FF2 in the same clock edge, as if the flip-flops rippled. At the third edge this gives and , so the sequence becomes 1001, which is not an option. The other is reading SEL at the dashed line , where it is still 1, instead of at the next rising edge, where it is already 0. That gives at and the sequence 1010. Taking the XOR inputs as instead of does not change the answer, because complementing both inputs leaves the XOR unchanged.

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

More Sequential questions