A summing content-addressable memory ($\Sigma$-CAM) is a device which consists of an $\ell \times n$ array of cells, where each cell can be programmed to one of two states, 0 or 1. The input to the array is a binary $\ell$-vector, and the output is an integer $n$-vector whose entries are the Hamming distances between the input vector and the contents of the columns. A summing ternary CAM ($\Sigma$-TCAM) is a variant of a $\Sigma$-CAM where the state/input alphabet is endowed with a third symbol (“don’t care”) whose Hamming distance from any symbol is defined to be 0. The purpose of this work is to present coding schemes for on-access correction of errors in both \Sigma$-CAMs and $\Sigma$-TCAMs. In the case of $\Sigma$-CAMs, our scheme builds upon schemes that have been proposed for discrete vector–matrix multipliers. The adaptation of such schemes to $\Sigma$-TCAMs, however, is more involved and requires a special type of positional binary representation of integer pairs where the representations of the two integers in a pair do not share a 1 in the same position.