3.3.14Combinational Circuits

Hazards (static and dynamic) in combinational logic

2,157 words10 min readdifficulty · medium1 backlinks

WHY do hazards exist at all?

The classic culprit: an input feeds the output both directly and through an inverter. The inverter adds delay, so for a short window both a signal and "NOT that signal" look the same (both 0 or both 1).


WHAT are the types?


HOW does a static-1 hazard arise? (Derivation from scratch)

Take the function F=AB+BˉCF = AB + \bar{B}C

Setup. Hold A=1A=1, C=1C=1, and let BB change from 101\to 0.

  • With B=1B=1: F=(1)(1)+(0)(1)=1F = (1)(1) + (0)(1) = 1.
  • With B=0B=0: F=(1)(0)+(1)(1)=1F = (1)(0) + (1)(1) = 1.

So FF should stay 1. Now trace the paths while BB falls:

  1. Term ABAB: as B0B\to0, AB0AB\to 0 immediately (BB feeds an AND directly).
  2. Term BˉC\bar B C: this needs Bˉ\bar B, computed by an inverter. So Bˉ\bar B goes 010\to1 one gate-delay later. Until then BˉC=0\bar B C = 0.

The bad window: for one inverter-delay, ABAB has already dropped to 0 but BˉC\bar B C hasn't yet risen to 1. Both product terms are 00FF momentarily =0=0. That is the glitch 1011\to0\to1.

Figure — Hazards (static and dynamic) in combinational logic

Worked Examples


Common Mistakes


The 80/20 core


Flashcards

What is a hazard in combinational logic?
A momentary incorrect output (glitch) during an input transition, caused by unequal propagation delays along reconvergent paths; the steady-state output is still correct.
What causes a hazard fundamentally?
One input reaching the output through two (or more) paths of different delay (classically direct vs. through an inverter).
Static-1 hazard definition?
Output should stay 1 but momentarily goes to 0 (1→0→1).
Static-0 hazard definition?
Output should stay 0 but momentarily spikes to 1 (0→1→0).
Dynamic hazard definition?
Output should change once but changes 3 or more times before settling (e.g. 0→1→0→1); needs ≥3 unequal-delay reconvergent paths.
How do you detect a static-1 hazard on a K-map?
Look for two adjacent 1-cells that are covered by different prime implicants with no single implicant covering both — a handoff point.
How do you fix a static-1 hazard in SOP?
Add the redundant consensus product term that covers the adjacent 1s (e.g. add AC to AB+B'C).
Consensus of AB and B'C?
AC (drop the variable appearing complemented in one term and true in the other).
How do you fix a static-0 hazard in POS?
Add the consensus sum factor covering the adjacent 0-cells (e.g. add (A+C) to (A+B)(B'+C)).
Why can't you remove a hazard by Boolean simplification?
Because the consensus term is logically redundant at steady state but essential during transitions; simplifying it away reintroduces the glitch.
Can consensus terms fix dynamic hazards?
No — dynamic hazards require redesigning the multi-level network (or a hazard-free two-level form); a single consensus term is insufficient.
Why do glitches sometimes not matter?
In synchronous designs, if outputs are sampled by a register after they settle, transient glitches are ignored — but they still matter for async logic, clocks, and enables.

Recall Feynman: explain to a 12-year-old

Imagine two runners carrying the same message to a friend, but one runs a longer, twistier path. For a split second the friend hears the old message from the slow runner and the new message from the fast runner — and gets confused, giving a wrong answer for just a blink. Then the slow runner arrives and everything's fine. That blink of confusion is a hazard. We fix it by adding a third runner who always carries the correct message on a direct road, so the friend is never confused even during the swap.

Connections

Concept Map

causes

is a

during

logic correct only

type

type

output should stay same

output should stay same

needs 3+ paths

creates

explains

fixed by

removes

Unequal path delays

Hazard glitch

Momentary wrong value

Input transition

Timing problem not logic

Static hazard

Dynamic hazard

Static-1 dip 1-0-1

Static-0 spike 0-1-0

Changes 3+ times

Direct path vs inverter path

K-map non-adjacent implicants

Redundant consensus term

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, combinational circuit ka final output hamesha sahi hota hai — bas jab input badalta hai, us beech me ek chhoti si galti ("glitch") aa sakti hai. Iska reason hai delay. Har gate ko switch hone me thoda time lagta hai. Agar ek input do alag raaston (paths) se output tak pahunchta hai — ek seedha aur doosra inverter ke through (jo thoda late hota hai) — to ek chhote se moment ke liye output confuse ho jaata hai. Isko hazard kehte hain.

Teen type hote hain. Static-1: output ko 1 rehna tha, par woh 1→0→1 kar deta hai. Static-0: output ko 0 rehna tha, par 0→1→0 spike maar deta hai. Dynamic: output ko sirf ek baar change hona tha, par woh 3 ya usse zyada baar wobble karta hai (jaise 0→1→0→1) — ye tab hota hai jab 3+ alag-delay wale reconvergent paths hote hain.

Example: F=AB+BˉCF = AB + \bar{B}C me, jab A=C=1A=C=1 aur BB 1 se 0 hota hai, dono cases me F=1F=1 hona chahiye. Par ABAB turant 0 ho jaata hai aur BˉC\bar{B}C inverter delay ke baad late me 1 hota hai. Beech ke window me dono 0 → FF galti se 0 dikha deta hai. Fix: ek redundant consensus term ACAC add karo → F=AB+BˉC+ACF=AB+\bar BC+AC. Ab jab A=C=1A=C=1, ACAC output ko 1 pe pakde rakhta hai, chahe BB kuch bhi ho. Glitch gaya!

Yaad rakhna — ye term Boolean algebra me "useless/redundant" lagta hai, par timing ke liye zaroori hai. Isliliye hazard-free design me consensus terms ko kabhi simplify karke hatao mat. Static hazard consensus se theek hota hai; dynamic hazard ke liye pura circuit redesign karna padta hai.

Go deeper — visual, from zero

Test yourself — Combinational Circuits

Connections