Example

The code in the example of the previous definition can also be depicted graphically.

Let x be a number in {0, ... , 15}. In the diagram below we fill the positions a, b, c, d with zeros and ones in such a way that abcd forms the binary notation of x. We then fill the positions e, f, g with zeros and ones in such a way that any circle contains an even number of zeros. Now the code word for the number x is (abcdefg).

The figure can also be used for a given vector r in (Z/2Z)7 to determine the numbers x for which the code word differs in at most one position from r. Given r, change at most one position in such a way that we get an even number of ones in each circle. Then the number x is the number with binary notation abcd.