FIG. 6A is a table that illustrates an example of data values and prefix (inverse mask) values for a given ternary CAM. The table includes a LOCATION column which indicates eight locations, numbered 0-7, within the ternary CAM. In the particular example of FIG. 6A, each location stores a four-bit data value.