hamming-code
hamming-code is one function. Everything below came out of it during this
build, at parameters taken from the essays rather than invented for this page — so a figure
here is the same figure a reader meets in an essay, and if the generator changes, this page
changes with it.
At its defaults
show: "bound"
show: "syndrome"
show: "cosets"
What it checks while it draws
Collected by running the family and recording what it asserted, not written here. The count is how many separate times the claim was put to the test while these drawings were made.
- class 000 has as many words as the code has ×8
- class 000 has exactly one lightest word ×8
- a row called exact really divides to a power of two ×1
- and it weighs no more than one, which is what perfection means ×1
- and none of them is zero ×1
- at distance three the bound is only ever exact one short of a power of two ×1
- every codeword passes all three parity checks ×1
- every word in the space is repaired to a codeword by its own syndrome ×1
- four data bits give sixteen codewords ×1
- the 128 words fall into eight classes ×1
- the highlighted codeword is a whole number between -1 and 15 ×1
- the lightest non-zero codeword weighs what the closest pair are apart ×1
- the longest word length in the table is a whole number between 5 and 23 ×1
- the minimum distance over all 120 pairs is three ×1
- the minimum distance the bound is taken at is a whole number between 3 and 7 ×1
- the number of cosets shown across is a whole number between 4 and 8 ×1
- the received word is seven bits ×1
- the repetition code and the Hamming code both meet the bound exactly ×1
- the repetition code meets the bound at n = d ×1
- the seven columns of the parity-check matrix are distinct ×1
- the seven single errors give seven different syndromes ×1
- the syndrome of a single error is the column of the position it hit ×1
- the word the syndrome repairs really is a codeword ×1
Where it is called
Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.
Distance is a picture
A message is a corner of a cube and an error is a step along an edge. Everything a code can do is decided by how far apart the corners it uses are — and that is a fact about a drawing.
ComputationFinding the error without reading the message
Three parity checks on a seven-bit word produce three bits. If they are all zero nothing is wrong; otherwise they are the number of the position that broke. The message is never consulted, because the answer does not depend on it.
ComputationSixteen spheres that fill a cube
A hundred and twenty-eight seven-bit words, sixteen of them chosen, and a ball of eight around each. Sixteen times eight is a hundred and twenty-eight exactly — so the balls tile the space with nothing left over, and the code wastes nothing at all.