Hazard
- A hazard in digital logic
is a fault in the logic system due to a change at the input.
- Definition: "When one input variable changes, the output
changes momentarily when it shouldn't"
- A static hazard
is when the output of a logic circuit momentarily changes when its
final value is the same as its value before the hazard (when the output
is "trying" to remain the same, it jumps once, then settles down). For
example, output going from 0 to 1 to 0 (it's "trying" to stay at zero
but failing once - thus the hazard).
- A dynamic hazard is where a logic circuit will
momentarily change back to
its original
value while changing to a new value. For example, output going from 0
to 1 to 0 and finally to 1 (it's "trying" to go from simply 0 to 1).
- There are two types of static hazards: a low-going glitch
(or static one
hazard) is where the high output transitions to a low and back high
(1-0-1) and a high-going glitch (or static zero hazard
) is where the low output transitions to a high and back low (0-1-0).
- Static 0 hazards occur
in product-of-sums implementations, but do not occur
in sum-of-products implementations. Static 1
hazards occur in sum-of-products implementations, but do not occur in
product-of-sums implementations
Example of
Static Hazards: The Static '1' Hazard.
Let us consider an imperfect circuit that suffers from a delay in
the physical logic elements i.e. AND gates etc.
The simple circuit performs the function:
f = X1.X2 + X1'.X3
and the logic diagram can be shown as follows:
If we first look at the starting diagram, it is clear that if no
delays were to occur, then the circuit would function normally. However
since this isnt a perfect circuit, and an error occurs when the input
changes from 111 to 011. i.e. When X1 changes state.
Now we know roughly how the hazard is occuring, for a clearer picture
and the solution on how to solve this problem, we look to the Karnaugh
Map:

This Karnaugh Map shows the circuit. The two gates are shown by solid
rings, and the hazard can be seen under the dashed ring.
The theory proved by Huffman tells us that by
adding a redundant loop 'X2X3' this will elimate the hazard. So the
resulting logic is of the form shown in the next figure.
So our original function is now: f =X1.X2 + X1'.X3 + X2.X3
Now we can see that even with imperfect logic elements, our example
will not show signs of hazards when X1 changes state.