3.4.2 · D5Sequential Circuits

Question bank — D latch and gated latches

1,602 words7 min readBack to topic
Recall Before you start — the mental model

= enable ("eyes open"). = data being shown. = what's currently stored. Transparent = eyes open, copies . Opaque = eyes closed, frozen. Keep the equation in view.


The pictures these traps hinge on

Before the traps, lock in four images. Every trick below is really testing whether you see one of these.

1. What lives inside a D latch. The one external data pin splits into two internal wires: the Set line and the Reset line . We force and (the little bubble means "NOT"), so they are always opposites. These feed an inner SR Latch whose job is to store the bit. The enable gates them.

2. What "forbidden" actually does. A NOR-based SR latch computes each output as NOR of (the input, the other output). When , both outputs are forced to at once — but and are supposed to be opposites, so this is a contradiction. Worse, when and drop back to together, the two gates race and the final value is unpredictable. That whole scenario is the forbidden state, and the D trick makes it unreachable.

3. The MUX view of the equation. is literally a 2-to-1 multiplexer: the select line is , input-0 is the old fed back on itself, input-1 is the new . just picks which door the output comes from.

4. The timing waveform. "Transparent," "hold," and "the moment falls" are all time behaviours — so they only make sense as a waveform. Watch how copies while is high, then freezes flat the instant goes low.


True or false — justify

A D latch stores exactly one bit.
True — it has a single data pin , so at any moment it holds one binary value in ; stack many of them and you get a register holding a whole byte.
When the output of a D latch is .
False — means hold, so keeps whatever it last stored; the equation gives , not (see the flat frozen segment in figure s04).
A D latch can enter the forbidden state if glitches.
False — internally and are always opposites (figure s01), so is structurally impossible no matter how behaves.
While , changing changes immediately.
True — that is the definition of transparent: the output tracks continuously the whole time the enable is high (figure s04, the copy region), not just once.
A gated SR latch fully removes the forbidden combination.
False — it only controls when the latch listens; with the forbidden state of figure s02 still occurs. Only the D trick removes it.
A D latch and a D Flip-Flop behave identically.
False — the latch is level-triggered (transparent for the whole high period); the flip-flop is edge-triggered (samples only at one clock edge).
The characteristic equation describes a 2:1 multiplexer with feedback.
True — as figure s03 shows, select , input-0 (fed back), input-1 ; the equation is exactly a MUX choosing between old value and new data.
A D latch has no memory when is held at forever.
True in effect — if enable never closes, always equals the current , so nothing is ever "remembered" past the input; memory only exists during .

Spot the error

" reset, so becomes ."
Error: is hold, not reset. There is no reset action; retains its stored value. Confusing "disabled" with "cleared" is the classic slip.
"We can drive and separately on a D latch for more control."
Error: as figure s01 shows, is derived from the single pin ; there is no independent access from outside. That independence was deliberately thrown away to kill the forbidden state.
"The D latch equation is ."
Error: this drops the hold term. When it would force , destroying the memory. The correct form adds so the old value survives.
"A NOR-based SR latch holds when ."
Error: is the forbidden case of figure s02 (both outputs go to ); the hold case is . See SR Latch.
"Since the latch is transparent while enabled, glitches on don't matter."
Error: transparency is exactly why glitches matter — any spike on while passes straight through to (figure s04's copy region tracks exactly). This is a core motivation for edge-triggered Clocking and Timing.
"A D latch built from NAND gates needs instead of ."
Error: the mapping is about logic, not gate family; NAND implementations may invert internal signals but the external behaviour is unchanged. See NOR and NAND Gates.

Why questions

Why do we add an enable line to a plain SR latch?
Because a bare latch reacts to inputs at all times, so slightly-mistimed real-world signals flip it randomly; the enable lets us choose when the latch is allowed to change.
Why does tying eliminate the forbidden state?
Because and can never be at the same time, so the internal set and reset lines are always opposites — the one combination (figure s02) that broke the SR latch is now unreachable.
Why is a D latch called "transparent"?
Because while you can "see through" it — the output is just a copy of the input, as if the storage element weren't there at all (figure s04).
Why does the characteristic equation prove the latch has memory?
The term means the output feeds back into its own next value (the feedback wire in figure s03); a variable defined partly in terms of itself is precisely what "remembering the past" looks like in Boolean form.
Why can two D latches be combined to make a flip-flop?
A master-slave pair enables the two latches on opposite phases, so data passes through only at a clock edge instead of during a whole level — converting transparent behaviour into edge-triggered capture (see D Flip-Flop).
Why is level-triggering a problem in a feedback loop?
If the latch stays transparent, a changing output could race back around and change the input during the same enable window, causing unpredictable oscillation — the reason clocked, edge-triggered designs exist (Clocking and Timing).

Edge cases

If and is toggling rapidly, what does do?
toggles right along with — the latch is fully transparent and simply mirrors every change (the wiggle in figure s04's copy region); it stores nothing stable until returns to .
Starting from , apply then later with throughout — what is ?
stays the entire time; enable is never high, so the is ignored and the stored is held.
At the exact moment falls from to , what value gets latched?
Whatever was at that transition instant is frozen (the freeze point in figure s04); this is why must be stable around the falling edge — otherwise the captured value is ambiguous (a timing/setup concern in Clocking and Timing).
Power-on: what is before any pulse ever occurs?
Undefined — a latch has no inherent starting value, so it powers up in an arbitrary or ; real designs add an explicit reset for this reason.
If is stuck at forever due to a fault, how does the latch behave?
It becomes a frozen memory: it keeps its power-on value permanently and ignores every change, since it can never enter the transparent state.
If both and are held constant, is the latch still "storing"?
Functionally no — merely equals the fixed ; genuine storage (holding a value against a changing input) only happens once .