Previous

X74_L85

4-Bit Expandable Magnitude Comparator

XC3000
XC4000E
XC4000X
XC5200
XC9000
Spartan
SpartanXL
Virtex
Macro
Macro
Macro
Macro
Macro
Macro
Macro
N/A

figures/x4163n.gif

X74_L85 is a 4-bit magnitude comparator that compares two 4-bit binary-weighted words A3 - A0 and B3 - B0, where A3 and B3 are the most significant bits. The greater-than output, AGBO, is High when A>B. The less-than output, ALBO, is High when A<B, and the equal output, AEBO, is High when A=B. The expansion inputs, AGBI, ALBI, and AEBI, are the least significant bits. Words of greater length can be compared by cascading the comparators. The AGBO, ALBO, and AEBO outputs of the stage handling less-significant bits are connected to the corresponding AGBI, ALBI, and AEBI inputs of the next stage handling more-significant bits. For proper operation, the stage handling the least significant bits must have AGBI and ALBI tied Low and AEBI tied High.

Inputs
Outputs
A3, B3
A2, B2
A1, B1
A0, B0
AGBI
ALBI
AEBI
AGBO
ALBO
AEBO
A3>B3
X
X
X
X
X
X
1
0
0
A3<B3
X
X
X
X
X
X
0
1
0
A3=B3
A2>B2
X
X
X
X
X
1
0
0
A3=B3
A2<B2
X
X
X
X
X
0
1
0
A3=B3
A2=B2
A1>B1
X
X
X
X
1
0
0
A3=B3
A2=B2
A1<B1
X
X
X
X
0
1
0
A3=B3
A2=B2
A1=B1
A0>B0
X
X
X
1
0
0
A3=B3
A2=B2
A1=B1
A0<B0
X
X
X
0
1
0
A3=B3
A2=B2
A1=B1
A0=B0
1
0
0
1
0
0
A3=B3
A2=B2
A1=B1
A0=B0
0
1
0
0
1
0
A3=B3
A2=B2
A1=B1
A0=B0
0
0
1
0
0
1
A3=B3
A2=B2
A1=B1
A0=B0
0
1
1
0
1
1
A3=B3
A2=B2
A1=B1
A0=B0
1
0
1
1
0
1
A3=B3
A2=B2
A1=B1
A0=B0
1
1
1
1
1
1
A3=B3
A2=B2
A1=B1
A0=B0
1
1
0
1
1
0
A3=B3
A2=B2
A1=B1
A0=B0
0
0
0
0
0
0

Figure 11.2 X74_L85 Implementation XC3000, XC4000, XC5200, Spartans

Figure 11.3 X74_L85 Implementation XC9000

Next