20. Equality Comparator Synthesis

Loading simulator…

Solution Explanation

From the behavioral table, Equality Output = 1 only when both corresponding bit pairs are equal:

  • A0 = B0
  • A1 = B1
A1A0B1B0Equality Output
00001
01011
10101
11111
Any other combination   0

NOT, OR, NAND, NOR, and XNOR gates are prohibited. Only XOR and AND gates can be used.

Use XOR to compare each corresponding bit pair:

X = A0 ⊕ B0
Z = A1 ⊕ B1

XOR gives 0 when both inputs are equal. So the required output must be 1 only when both X and Z are 0.

XZY
001
010
100
110

From the table, this is NOR behavior:

Y = (X + Z)'

Using De Morgan's theorem:

Y = X' · Z'

Since NOT gates are prohibited, invert X and Z using XOR with logic HIGH:

X' = X ⊕ 1
Z' = Z ⊕ 1

Therefore:

Y = (X ⊕ 1) · (Z ⊕ 1)

Substituting X and Z:

Equality Output = ((A0 ⊕ B0) ⊕ 1) · ((A1 ⊕ B1) ⊕ 1)

Connect each corresponding bit pair to an XOR gate, invert both XOR outputs using XOR with logic HIGH, then AND the two results to generate Equality Output.