GATE Computer ScienceHardGATE CS

A transparent-high D latch and a rising-edge D flip-flop both receive the same D signal and clock. The clock is high during 0–10, 20–30, 40–50 and 60–70 ns (rising edges at 20, 40 and 60 ns) and low otherwise. D is 0 until 3, 1 during 3–8, 0 during 8–14, 1 during 14–24, 0 during 24–33, 1 during 33–45, 0 during 45–66 and 1 from 66 ns onwards. Both outputs start at 0 and delays are ignored. How many output changes (0→1 or 1→0) occur over 0–80 ns for the latch and for the flip-flop, as (latch, flip-flop)?

  1. A. (8, 2)
  2. B. (7, 2)
  3. C. (7, 3)
  4. D. (6, 2)

Correct answer: B. (7, 2)

The latch follows D whenever the clock is high: it changes at 3, 8, 20, 24, 40, 45 and 66 ns (seven changes) and holds through each low phase. The flip-flop samples D only at 20 ns (D = 1, so Q rises), 40 ns (D = 1, no change) and 60 ns (D = 0, Q falls): two changes.

More Digital Logic questions

Exams that ask this topic