A method and circuit to implement a match against range rule
functionality. A first rule entry and a second rule entry are stored. The
first rule entry includes at least two consecutive identical bits. The
first rule entry represents a numerical range. A first field of a binary
key is compared with the first rule entry to determine whether any of the
bits of the first field are not identical. A logical result of the
comparison between the first field and the first rule entry is inverted
to generate a first comparison result. A second field of the binary key
is compared with a second rule entry to generate a second comparison
result. The first comparison result is then logically ANDed with the
second comparison result to determine whether the binary key falls within
the numerical range represented by the first rule entry and matches the
second rule entry.