Skip to content
K-Map Solver
Design

Static hazards: why a correct circuit can still glitch

By K-Map Solver · · 2 min read

A 3-variable K-map with two groups that touch but do not overlap, and a dashed third group bridging them.
In this article
  1. The classic example
  2. How the K-map shows it
  3. The fix: add the consensus term
  4. Product-of-sums and other cases
  5. Do you need to care?

Boolean algebra describes what a circuit outputs once everything has settled. Real gates take time, and for a moment after an input changes the output can briefly be wrong even though the starting and ending values are both correct. That blip is a glitch, and the underlying cause is a hazard.

The classic example

Consider F = AB + A'C with B = 1 and C = 1. Then F = A + A' = 1 for either value of A. Now switch A from 1 to 0. The term AB turns off while A'C turns on, and A' is produced by an inverter that takes a little time. If AB drops before A'C rises, there is a short window in which both are 0 and F dips to 0 before returning to 1. This is a static-1 hazard: the output should stay at 1 but momentarily does not.

How the K-map shows it

On the map, the two cells involved are 011 and 111 (minterms 3 and 7). They are neighbours, both must be 1, but they lie in different groups: 3 is in the A'C group and 7 is in the AB group, and no single group contains both. Whenever two neighbouring required cells are not covered by a common group, switching the variable that separates them can produce a glitch.

Worked example: sum of products

The minimal cover has two groups that touch at cells 3 and 7 without sharing a group.

F = Σm(1, 3, 6, 7)

ABC0001111001

Simplified result

F = A'C + AB

  • A'C — minterms (1, 3)
  • AB — minterms (6, 7)

The fix: add the consensus term

Add a third group that spans the troublesome pair. Cells 3 and 7 are both inside BC, so AB + A'C + BC has the same truth table but never lets the output depend on a handover between two terms: while B and C are both 1, the BC term holds F at 1 no matter what A does. The price is one extra term in the circuit.

Product-of-sums and other cases

  • For a POS circuit the mirror-image problem is a static-0 hazard: two neighbouring zeros without a common sum term.
  • Don't-care cells never create a hazard, because the output there is free.
  • This check covers static hazards of two-level circuits. It does not cover dynamic hazards or the hazards that appear when several inputs change at once.

Do you need to care?

In a clocked design, a glitch that dies out before the next clock edge is usually harmless, so hazard-free covers matter most for signals that drive asynchronous inputs: resets, latch enables, clocks. The solver's “Glitch check” panel lists any hazards in your answer and shows the extra terms that remove them.