3.3.14 · D4Combinational Circuits

Exercises — Hazards (static and dynamic) in combinational logic

2,983 words14 min readBack to topic

Before we start, four plain-word definitions we will lean on the whole page:


Level 1 — Recognition

Recall Solution

Before , after , so expected transitions (rule above). Actual . Holding-1-but-dipping is a static-1 hazard. Surplus (even ✔), so the output ends correctly at .

Recall Solution

Before , after , so expected transitions . Actual (odd, ). That is a dynamic hazard (matches the up-front definition). The two extra transitions form one spike (surplus , even), so the final value is still the correct "changed once" result.

Recall Solution

All three have → expected . Only (b) has actual : a static-0 (held but spiked to ). (a) and (c) have actual — no glitch. A slow-but-clean edge is propagation delay, not a hazard — see Propagation Delay and Gate Timing.


Level 2 — Application

Recall Solution
  • : .
  • : . Same value static-1 candidate. In the bad window has already fallen to but has not yet risen (the inverter that makes is one gate-delay late), so both product terms are and momentarily . Glitch: .
Recall Solution

Consensus of and (drop the variable ): . During L2.1, , so regardless of . The output is pinned at the whole time — no handoff, no dip.

Recall Solution
  • : . : . Holds static-0.
  • Mid-transition both factors can briefly be (the delayed ), so spikes to .
  • Consensus sum factor (from the up-front definition): the two factors are and ; the split variable is ; drop it and OR the leftovers . Fixed: When , pins at for any . See Sum of Products and Product of Sums Forms.

Level 3 — Analysis

The figure below is the answer diagram: read the K-map (rows are , columns are the pair in Gray order ). The purple loop is the prime implicant ; the coral loop is ; the dashed green loop is the consensus that bridges them. The arrow marks the two adjacent -cells that live in different loops — the handoff.

Figure — Hazards (static and dynamic) in combinational logic
Figure s01 — K-map of . Observe: the two -cells in the top row with (at and ) are neighbours but are boxed by two different coloured loops; the dashed green loop covers both, so adding removes the handoff.

Recall Solution

The minterms of are where : combos . The hazard pair is (covered by , the purple loop) and (covered by , the coral loop). They are adjacent (only differs) yet sit in different prime implicants with no single term covering both — the handoff point marked by the arrow. The dashed-green consensus loop covers both cells and removes the gap.

Recall Solution

Path of falling: = ns. Path of rising: ns. The OR sees fall at ns but rise at ns. Glitch window ns — exactly the extra delay the inverter injects on one path.

The waveform below is the answer: time runs left to right, the purple staircase is , and the three dashed vertical lines mark the moments each path's signal arrives and toggles the output.

Figure — Hazards (static and dynamic) in combinational logic
Figure s02 — Dynamic hazard timing. Observe: starts at ; at ns it flips to , at ns back to , at ns up to . Three flips = three transitions on a "change once" output.

Recall Solution

Start . Arrival at ns flips ; at ns flips ; at ns flips . Sequence : 3 transitions (odd, ) dynamic hazard. Expected was transition (before , after ); the two extras came as a pair, so the final value is still the correct "changed once" result.


Level 4 — Synthesis

The K-map below is the working: purple loop (minterms ), coral loop (minterms ), and the dashed-green consensus that bridges the adjacent handoff cells and .

Figure — Hazards (static and dynamic) in combinational logic
Figure s03 — Hazard-free cover for minterms {1,3,6,7}. Observe: minterms and (both have ) are neighbours but boxed by different loops; the dashed-green loop covers both, closing the handoff.

Recall Solution

Group on the K-map. Prime implicants: (covers minterms ) and (covers ). Base cover . Now check adjacencies between the two groups: minterm and minterm are adjacent (only differs) but in different implicants — a hazard handoff. Add their consensus: consensus of and (drop the split variable , AND the leftovers and ) . The loop covers both and , closing the gap. Every pair of adjacent 1s now shares a covering term.

Recall Solution

Use the up-front consensus sum factor rule on the two sums and :

  1. Find the split variable. appears true in the first factor and complemented () in the second → the split variable is .
  2. Drop it, OR the leftovers. Remove and ; the leftover of the first factor is , the leftover of the second is . OR them: .
  3. Simplify. (idempotence). So the consensus sum factor is just . Why it cures the glitch: whenever the two original factors could hand off (both briefly during an transition), the new factor is exactly there (it is whenever , which is the only time both original factors evaluate the way that risks a spike), pinning . This is the exact dual of the SOP fix: sums-and-zeros instead of products-and-ones.
Recall Solution

Take (output equals a single input). One prime implicant, one path, no reconvergence — nothing to hand off, so no consensus term is ever needed. More generally: if every pair of adjacent 1-cells lies inside a single prime implicant of your chosen cover, the two-level circuit is already hazard-free. The extra term is needed only when a transition crosses between two different terms.


Level 5 — Mastery

Recall Solution

Static hazards need one input reaching the output through a direct path and an inverted (delayed) path. Only appears both true () and complemented (). So only a transition (with , holding ) can cause the static-1 glitch. Changing or alone routes through a single polarity — no reconvergent disagreement, no glitch.

Recall Solution

Minimal: → 2 AND, 1 OR, 1 inverter. Hazard-free: 3 AND, 1 OR (now 3-input, to accept the extra term), 1 inverter. Cost of glitch-freedom: one extra AND gate (for ) plus widening the OR to 3 inputs. Cheap insurance against a transient failure.

Recall Solution

A flip-flop samples one instant; if you sample after the circuit settles (respecting setup/hold, see Metastability and Setup-Hold Time), the glitch is invisible — but only masked, not removed. It still causes real failures when the glitchy signal drives an asynchronous input: a clock, a latch enable, an edge-triggered reset, or a combinational feedback loop — see Synchronous vs Asynchronous Circuits. There, the spike can toggle state at the wrong time.

Recall Solution

A dynamic hazard comes from three or more reconvergent unequal-delay paths, so the output toggles multiple times as arrivals stagger. A single consensus term patches one handoff between two terms; it cannot guarantee the monotonic (single-step) switching that paths violate. Cure: flatten to a two-level network with all consensus terms (so every adjacency is covered and there are no internal multi-path reconvergences), or otherwise ensure the multi-level structure is provably hazard-free.