Hazard Removal
The root cause
A static-1 hazard in a two-level SOP circuit occurs when, on the K-map, a single input change causes the minterm coverage to transition between two prime implicants that are not themselves adjacent, i.e., they do not share a product term covering both. During the brief interval when neither prime implicant is active, the output glitches.
The fix: consensus terms
The remedy is to add a redundant prime implicant that covers both minterms involved in the transition. This extra term “bridges” the gap: during the transition, even as one term de-asserts, the bridging term remains asserted. Once the new term asserts, the bridging term can de-assert — but by then the output is stable.
This extra term is exactly the consensus of the two original product terms.
Worked example
Recall the circuit from the previous note: f = a · b̄ + ā · c, with the hazard occurring when b = 0, c = 1 and a changes.
Plot the K-map for f = a · b̄ + ā · c:
| ab\c | 0 | 1 |
|---|---|---|
| 00 | 0 | 1 |
| 01 | 0 | 0 |
| 11 | 1 | 0 |
| 10 | 1 | 1 |
The prime implicant a · b̄ covers minterms abc̄ = 100, 110. The prime implicant ā · c covers minterms 001, 101.
The transition when a changes from 1→0 with b=0, c=1 is a move from minterm 101 to minterm 001. Minterm 101 has a=1, b=0, c=1, so ā·c = 0·1 = 0 and a·b̄ = 1·1 = 1. Thus 101 is covered by a·b̄. Minterm 001 has a=0, b=0, c=1, so ā·c = 1·1 = 1. Thus 001 is covered by ā·c.
The transition moves from one prime implicant’s coverage to the other’s. The two prime implicants are a·b̄ (covers 100, 101) and ā·c (covers 001, 011). The minterms 101 and 001 differ only in a, so they are adjacent on the K-map. The consensus of a·b̄ and ā·c with respect to a is b̄·c (removing a and ā, taking the product of the remaining literals). Indeed: f = a·b̄ + ā·c + b̄·c.
Now b̄·c covers 001, 101 — exactly the two minterms that were previously split between the two original prime implicants! When a changes from 1→0, b̄·c remains asserted (b=0, c=1 → b̄·c = 1·1 = 1), preventing the glitch.
The consensus theorem connection
The consensus theorem of Boolean algebra states:
The variable that appears in both true and complemented form (here a) is eliminated from the consensus term.
But for hazard removal, we take the minimised expression a·b̄ + ā·c and add the consensus term to get a·b̄ + ā·c + b̄·c. The consensus term is logically redundant (it doesn’t change the function), but it eliminates the hazard.
General procedure for static-1 hazard removal
- Obtain the minimal SOP expression from the K-map.
- Identify all pairs of adjacent 1s on the K-map that are not covered by a single prime implicant (i.e., they belong to different groups in the minimal cover).
- For each such adjacency, add a prime implicant covering both minterms.
- If multiple hazards exist, add consensus terms for each.
Equivalently: take the minimised SOP, compute all pairwise consensus terms, and add those that are not already implied by existing prime implicants.
Static-0 hazard removal
For POS circuits (OR-AND), the dual approach: a static-0 hazard occurs between adjacent 0s on the K-map that are not in the same maxterm group. The fix: add a redundant sum term (the consensus of the two relevant sum terms) to bridge the gap.
After hazard removal
The circuit now has more gates (one per consensus term added) but is hazard-free for single input changes. Multiple simultaneous input changes can still cause glitches, but in a synchronous system, inputs are assumed to change and settle well before the clock edge, with only one input changing at a time.
Summary
| Hazard type | Circuit form | Symptom | Fix |
|---|---|---|---|
| Static-1 | SOP (AND-OR) | 1→0→1 glitch | Add consensus term covering adjacent 1s |
| Static-0 | POS (OR-AND) | 0→1→0 glitch | Add consensus term covering adjacent 0s |
| Dynamic | 3+ level circuits | Multiple oscillations | Eliminate static hazards first |
The connection between the consensus theorem (Boolean algebra) and hazard removal (timing analysis) is a deep insight: algebraic redundancy becomes timing necessity.