A cyclic SEC-DED-PEC code is provided and circuitry therefor which has the
characteristics of two different distance codes. When w[i] and w[j] are
two different code words in the code, then distance(w[i],w[j]).gtoreq.4
for all i.noteq.j and, when w[i] and w[j] differ in both of an adjacent
pair of bits, then distance(w[i],w[j]).gtoreq.6 where distance(w1,w2) is
the ordinary Hamming distance. When the code is permuted by a cyclic
permutation, the same code results. The code may be thought of in
hyperspace as a hypersphere of a certain distance having spikes extending
from the center of the hypersphere to the tip of the spike a further
distance. This presents a "hyper-mace", thus the name "Mace Code", having
the property that it is a certain distance code generally and a further
distance code in the direction of the spikes. The circuitry further
provides for a code that is only slightly more complex than an ordinary
distance-4 code but which can correct more errors that are likely to
occur.