the disclosed system and method describe a ternary cam device having , in addition to a data entry and a ternary mask entry , one or more additional control words which can specify a net mask length and status , a table identifier , and / or a validity word to specify a detailed status of the segmented data words stored . this allows for the matching of ternary cam device entries with a comparand without sorting ternary cam device entries . additional status words can be used for table identification to save space in the actual data word entries , and also allowing for matching of data entries with selected table identifiers , precluding having to search the entire ternary cam array . additional status words can also be used to provide additional state information to provide more flexibility in validity checking . the disclosed system and method can be used in ternary cam devices having and / or supporting varying word widths .