Hazard (logic)

In digital logic, a hazard is an undesirable effect caused by either a deficiency in the system or external influences in both synchronous[citation needed] and asynchronous circuits.[1]: 43  Logic hazards are manifestations of a problem in which changes in the input variables do not change the output correctly due to some form of delay caused by logic elements (NOT, AND, OR gates, etc.) This results in the logic not performing its function properly. The three different most common kinds of hazards are usually referred to as static, dynamic and function hazards.

Hazards are a temporary problem, as the logic circuit will eventually settle to the desired function. Therefore, in synchronous designs, it is standard practice to register the output of a circuit before it is being used in a different clock domain or routed out of the system, so that hazards do not cause any problems. If that is not the case, however, it is imperative that hazards be eliminated as they can have an effect on other connected systems.

  1. ^ Cite error: The named reference Lopes2017 was invoked but never defined (see the help page).