A CAM includes a parity bit system for error detection. In one embodiment,
in each CAM cell, the data portion has its own data parity bit while the
status portion has an independent status parity bit. The status parity
bit is recalculated and updated whenever a status bit in the entry is
changed. In another embodiment, each status bit is provided with a
corresponding shadow status bit. Each status bit and its corresponding
shadow status bit is always loaded with the same data. In this manner,
every change 1-bit change to a status bit is made as two identical 1-bit
changes to the status bit and its corresponding shadow status bit. The
two identical 1-bit changes are parity neutral, thereby permitting status
changes without requiring recomputing and saving a new parity.