A hazard is a property of a circuit's structure: for some single input change, unequal path delays could make the output glitch. Whether a glitch actually appears depends on the real gate delays, so a hazard is a possibility, not a certainty.
There are three kinds:
- Static-1 hazard: the output should stay 1 but can dip to 0.
- Static-0 hazard: the output should stay 0 but can pulse to 1.
- Dynamic hazard: the output should change once but can change three or more times.
The usual cause is a hand-over. In a sum of products circuit, while one input changes, the job of holding the output at 1 passes from one product term to another. If the old term turns off before the new one turns on, the output drops briefly.
You can spot this on a karnaugh map: two adjacent 1s covered by different groups, with no group covering both. The fix is to add a hazard cover term, usually the consensus term, which stays 1 through the hand-over. It doesn't change the function, so the minimal expression and the hazard-free one can differ.
| A\BC | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0m0 | 0m1 | 1m3 | 0m2 |
| 1 | 1m4 | 0m5 | 1m7 | 1m6 |