GATE Computer ScienceVery hardGATE CS (PYQ pattern)

A clock is high during 0-10, 20-30, 40-50 and 60-70 ns and low otherwise. D starts at 0 with Q = 0, and D changes at 3 ns (→1), 8 (→0), 12 (→1), 25 (→0), 27 (→1), 33 (→0), 44 (→1), 52 (→0), 55 (→1) and 66 ns (→0). Q is observed from 0 to 80 ns. How many times does Q change value in each of the following: a D latch transparent while the clock is high, a rising-edge D flip-flop, and a falling-edge D flip-flop?

  1. A. Latch 6, rising-edge FF 3, falling-edge FF 2
  2. B. Latch 8, rising-edge FF 2, falling-edge FF 3
  3. C. Latch 8, rising-edge FF 3, falling-edge FF 2
  4. D. Latch 8, rising-edge FF 3, falling-edge FF 3

Correct answer: C. Latch 8, rising-edge FF 3, falling-edge FF 2

The latch passes every D change that happens while the clock is high and, at each rising edge, updates Q to the current D (even if D changed during the low phase). The rising-edge FF samples D at 20, 40, 60 ns (1, 0, 1: three changes); the falling-edge FF samples at 10, 30, 50, 70 ns (0, 1, 1, 0: two changes).

More Digital Logic questions

Exams that ask this topic