Codiode

Master-Slave vs. Edge-Triggered DFF: Glitch Rejection Comparison

MediumLogic CircuitTiming Diagram

Legacy master-slave flip-flops suffer from "1s-catching" where glitches during the high clock phase corrupt the captured state, a flaw solved by modern edge-triggered designs. Four signals are shown: CLK (clock, period 2), D (input data), Q_MS (legacy pulse-triggered output, initially 0), and Q_EDGE (modern edge-triggered output, initially 0). Q_MS captures a 1 if D is 1 at any point while CLK is 1, and updates its output on the step CLK transitions LOW. Q_EDGE samples D from the step immediately prior to CLK transitioning HIGH, and updates its output on the step CLK transitions HIGH. Trace both Q_MS and Q_EDGE across all 12 time steps.

Constraints

  • Q_MS updates its output only on the step CLK transitions from 1 to 0.
  • Q_EDGE updates its output only on the step CLK transitions from 0 to 1.
  • If D is 1 during any step where CLK is 1, the master stage of Q_MS catches it and will output 1 on the subsequent falling edge.

Topics

latchessequential-logicflip-flopsclocking

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Part of Latches and Flip-Flops

Problem 66 of 126 in the Latches and Flip-Flops track.

Related problems

Browse all problems · Digital logic design practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.