3.4.3 · D5Sequential Circuits
Question bank — Edge-triggered D flip-flop
For notation: is the data input, the clock, the stored output, its complement, and the state after the active edge. A rising edge ↑ is the clock going .
True or false — justify
A D flip-flop copies to the whole time the clock is high.
False — that describes a transparent Gated D latch; the flip-flop samples only at the instant of the edge and then locks, ignoring while the clock stays high.
The characteristic equation means the next state ignores the current state .
True — the D flip-flop simply loads ; unlike the JK flip-flop, its next state has no term, so history before the edge doesn't matter.
A master–slave D flip-flop has both latches open at the same moment.
False — they run on opposite enables, so exactly one is transparent at any time; that non-overlap is precisely what turns level behaviour into edge behaviour (Master-slave configuration).
If is held constant forever, eventually equals .
True — at the first active edge after settles, takes and then every later edge just re-loads the same value, so stays equal to .
Violating hold time can only corrupt data if you also violate setup time.
False — setup and hold are independent windows; changing just after the edge (a hold violation) can push the flip-flop into Metastability even if setup was perfectly satisfied.
Connecting back to makes the output toggle every edge.
True — since , each edge loads the opposite of the current output, giving , a divide-by-2 like a T flip-flop.
A single SR latch is already edge-triggered.
False — the SR latch responds continuously to its inputs (level behaviour); you need two gated latches with opposite enables to get an edge.
Two D flip-flops on the same clock, with stage 1's feeding stage 2's , will shift data one stage per edge.
True — because each flip-flop closes its input almost instantly at the edge, stage 2 captures the old output of stage 1, not the new one; this is the basis of Registers and shift registers.
Increasing the clock frequency indefinitely is safe as long as the flip-flops are fast.
False — the period must satisfy ; once shrinks below that, the receiving flip-flop samples data that hasn't settled (Setup and hold time).
A negative-edge flip-flop samples when the clock is low.
False — it samples at the falling transition ; being low afterward is irrelevant, just as being high is irrelevant for a positive-edge device.
Spot the error
"The forbidden state can still occur in a gated D latch if glitches."
Error — in the Gated D latch, and are complementary when enabled, so is structurally impossible regardless of 's value.
"Clock-to-Q delay is the time must be stable before the edge."
Error — that's the setup time ; is the delay from the edge to a valid , measured after the edge, not before it.
"In the divide-by-2 circuit, the output frequency equals the input clock frequency."
Error — since flips once per edge, it takes two edges to complete one output cycle, so the output frequency is half the clock frequency.
"To be safe, ."
Error — the delays occur in series along one data path, so they add, not multiply: .
"During the clock-high level, changing updates because the clock is still active."
Error — the flip-flop already captured at the edge and locked; the high level is not the trigger, so mid-level changes are ignored (the "camera shutter" fires only at the edge).
"Metastability is a permanent stuck state that never resolves."
Error — it is a temporary unstable balance that resolves to a valid 0 or 1 after an unpredictable delay; the danger is that this delay can occasionally exceed the time budget.
"A latch is preferred over a flip-flop for shift registers because it's transparent."
Error — transparency is exactly the problem: with transparent latches, data races through all stages in one clock phase; edge-triggering is required for a clean one-hop-per-tick shift.
Why questions
Why does the master latch in a master–slave FF freeze just before the value seen at the edge, rather than during the clock-high phase?
Because the master is enabled by ; when rises the master's enable falls, so it captures whatever was at that transition and then ignores all later changes.
Why does edge-triggering give the whole computer a "global heartbeat"?
Because every flip-flop samples at the same edge and then holds, so all state updates happen together, exactly once per tick, removing races between stages (Clock distribution and skew then handles making that edge arrive on time).
Why can't we build reliable feedback loops (like counters) out of transparent latches alone?
Because a transparent latch would let the new output feed back and change its own input within the same clock phase, causing uncontrolled oscillation; the edge closes the loop's input so each state advances exactly once per clock (Synchronous counters).
Why is the setup-and-hold "keep-out window" straddled around the edge rather than only before it?
The internal latch needs stable both approaching the sampling instant (setup) and while it locks in just after (hold); a change on either side can catch the latch mid-transition and cause Metastability.
Why does the D flip-flop's next state not depend on , unlike JK?
Because its input logic directly forces , at the edge, overwriting the stored bit entirely; the JK flip-flop instead has a "hold" and "toggle" mode that reads back into the equation.
Edge cases
What happens to if no clock edge ever arrives after power-up?
stays at whatever bistable state the feedback loop settled into — possibly random — because with no edge there is no sampling event to load a defined value.
If changes exactly at the active edge (inside the keep-out window), what is ?
Undefined — this violates setup/hold and can drive the flip-flop metastable, so it may resolve to 0, to 1, or hover before settling after an unpredictable delay.
For a positive-edge FF, what does a falling edge do to ?
Nothing — it is not the active edge, so is frozen and is completely ignored during and after that transition.
If (a flip-flop's wired straight into the next flip-flop's ), what limits the clock?
The period must still satisfy , and you must also check that exceeds the hold time so the new value doesn't arrive before the receiver has locked in the old one.
At the very first edge after is wired to (toggle setup) with starting at 0, what is after the edge?
becomes 1, because was present at the edge and gets loaded, and it will alternate on every subsequent edge.
Recall The single test that catches most traps
Ask "when exactly can change?" — the honest answer is always "only during the active clock edge, to the value had just before it." Every trap on this page is a disguised way of forgetting that one sentence.
Connections
- Parent: Edge-triggered D flip-flop
- SR latch, Gated D latch, Master-slave configuration — the build layers
- JK flip-flop, T flip-flop — richer next-state logic
- Setup and hold time, Metastability — timing correctness
- Registers and shift registers, Synchronous counters — where the traps bite in practice
- Clock distribution and skew — delivering that shared edge