A method of operation within a content addressable memory (CAM) device. An
input data word having a plurality of data bits and a plurality of mask
bits is received in the CAM device. An encoded data word is generated
based, at least in part, on states of the mask bits within the input data
word. A write data word is selected from a group of data words that
includes at least the input data word and the encoded data word. The
write data word is stored within a row of CAM cells within the CAM
device.