Skip to main content

Hazards in asynchronous design; 2-bit comparator

Short answer

Hazards cause unwanted glitches that can lead to wrong states in asynchronous circuits, so they must be removed. A 2-bit magnitude comparator gives E = (A1⊙B1)(A0⊙B0), G = A1B1' + (A1⊙B1)A0B0', L = A1'B1 + (A1⊙B1)A0'B0.

What is the role of hazards in asynchronous circuit design? Explain two bit magnitude comparator with necessary diagrams.

Role of hazards in asynchronous circuit design

A hazard is an unwanted momentary pulse (glitch) at a circuit output caused by unequal propagation delays along different paths when an input changes. Types: static-1 (output should stay 1 but dips to 0), static-0, and dynamic hazards; essential hazards come from feedback delays.

In asynchronous circuits there is no clock to wait until signals settle, and outputs are fed back as state variables. A glitch can therefore be taken as a real change and drive the circuit into a wrong stable state, causing malfunction. So hazards must be removed, e.g. by adding redundant (consensus) terms in the K-map so that every pair of adjacent 1s is covered by a common group, and by careful delay control.

Two-bit magnitude comparator

It compares A=A1A0A = A_1A_0 and B=B1B0B = B_1B_0 and gives three outputs: GG (A>BA > B), EE (A=BA = B) and LL (A<BA < B).

Let x1=A1⊙B1x_1 = A_1 \odot B_1 and x0=A0⊙B0x_0 = A_0 \odot B_0 (bit-equal signals). Compare the MSBs first; only if they are equal, compare the LSBs:

E=x1x0G=A1B1′+x1A0B0′L=A1′B1+x1A0′B0\begin{aligned} E &= x_1 x_0 \\ G &= A_1B_1' + x_1A_0B_0' \\ L &= A_1'B_1 + x_1A_0'B_0 \end{aligned}

From K-maps the same functions in plain SOP are:

G=A1B1′+A0B1′B0′+A1A0B0′,L=A1′B1+A0′B1B0+A1′A0′B0G = A_1B_1' + A_0B_1'B_0' + A_1A_0B_0', \quad L = A_1'B_1 + A_0'B_1B_0 + A_1'A_0'B_0

Partial truth table:

A1A0A_1A_0B1B0B_1B_0GEL
1001100
0101010
0111001
1110100
 A1,B1 --[XNOR]-- x1      A0,B0 --[XNOR]-- x0
 x1, x0 ------------------[AND]------------ E

 A1,B1' ---[AND]---+
 x1,A0,B0' [AND]---+------[OR]------------- G

 A1',B1 ---[AND]---+
 x1,A0',B0 [AND]---+------[OR]------------- L

Example: A=11A = 11, B=10B = 10: x1=1x_1 = 1, A0B0′=1A_0B_0' = 1, so G=1G = 1. All 16 input combinations were verified.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Logic chapter 4 questions →