MOULDLKnowledge BaseElectrical Knowledge Base3D Model DownloadsMembership
中文版Model Store »
Knowledge Base › Electrical Knowledge Base › How do you detect and remove hazards and glitches in combinational logic?
HomeModels
Table of contents

On this page

Electrical & Electronic Basics (600 articles)

Quick Reference

  • PLC & Programming
  • Electrical & Electronic Basics (monthly)(每月更新中)
  • Electrical Control & Drawings (monthly)(每月更新中)
  • Drives & Actuators (monthly)(每月更新中)
  • Sensors & Detection (monthly)(每月更新中)
  • Industrial Communication & Networks (monthly)(每月更新中)
  • HMI & Host Systems (monthly)(每月更新中)
  • Industrial Robots & Motion Control (monthly)(每月更新中)
  • Mechatronic System Integration (monthly)(每月更新中)
  • Fault Diagnosis & Standards (monthly)(每月更新中)

How do you detect and remove hazards and glitches in combinational logic?

Sometimes a combinational output spits a narrow pulse it should never produce when an input changes; that is a hazard. This page shows how to spot it on the Karnaugh map, why it happens, and how redundancy or filtering removes it.

1. How it works

A hazard starts with race: signals reach the output through different gate depths and trace lengths, so they arrive at different times. When one input changes and the output should stay put, a fast path and a slow path can briefly drive a wrong level, a glitch. It appears only at the transition edge and is invisible in steady state, yet it can falsely trigger a later flip-flop or interrupt.

2. Numbers and practice

On the Karnaugh map, if two adjacent 1-loops are separated by only one variable change and no third loop covers the join, a glitch appears when that variable toggles. The test: two K-loops touching at a single point means a possible hazard. Fill the touching point with a redundant loop, a redundant term, and the glitch is covered.

3. Pitfalls and fixes

The cleanest fix is a redundant term: add a loop at the touching point so the output stays 1 across the transition and the glitch vanishes. Next is a small capacitor or Schmitt gate at the output to filter the narrow pulse, at the cost of slower edges. Third, clock-latch the next stage so it samples only on the active clock edge. Prefer the redundant term and leave timing alone.

4. Hazard detection and handling quick reference

SymptomHow to judgeFix
Output glitchAt input edge onlyConfirm hazard
K-map touchTwo loops meet at pointAdd redundancy
False triggerWrong interruptAdd latch
Edge slowsCapacitor filterAccept slower
Redundant termOne more AND termSlight area up
Steady okInvisible staticScope the edge

5. Notes

Control, interrupt and trigger outputs must never glitch. After editing logic, scope the output at the input transition edge to confirm no narrow pulse before handover.

6. References

The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: Reliable digital design per GB/T 4728 and IEC 60748. Always check the device datasheet and the product design file for ratings and derating.

7. Cautions

⚠️ Three common pitfalls:
① K-map touching not filled:Glitch at the edge falsely triggers the next interrupt
② Filtering with a cap:Edges slow down and high-speed timing breaks
③ Steady-state test looks fine:Glitch lives only at the edge, a meter cannot see it

Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.

Related reading

Related 3D models: Ready to build it? Download free 3D models & CAD drawings at MOULDL »
MOULDL · Electrical Knowledge Base · free self-study reference for electrical & automation engineers, 3D CAD models at MOULDL