A Hamming code starts by putting data bits into fixed positions.

highlighted = computed this step

Data gets fixed slots

A codeword has data slots and check slots. The data bits are 1011.

d=1011d=1011
Data bits have placesHamming encode and correction rows recomputed from pinned bits.Data bits have places - codeword 0110011, syndrome 6rowvaluecheckdata3=1,5=0,6=1,7=1positions 3,5,6,7p10positions 1,3,5,7 evenp21positions 2,3,6,7 evenp40positions 4,5,6,7 evencodeword0110011positions 1..7flip6received bit is toggledreceived0110001one changed bits10positions 1,3,5,7s21positions 2,3,6,7s41positions 4,5,6,7syndrome6s4+s2+s1 as a positioncorrected0110011flip syndrome position

Put data in the data slots

This toy places those data bits in positions 3, 5, 6, and 7.

data positions 3,5,6,7\text{data positions }3,5,6,7
Data bits have placesHamming encode and correction rows recomputed from pinned bits.Data bits have places - codeword 0110011, syndrome 6rowvaluecheckdata3=1,5=0,6=1,7=1positions 3,5,6,7p10positions 1,3,5,7 evenp21positions 2,3,6,7 evenp40positions 4,5,6,7 evencodeword0110011positions 1..7flip6received bit is toggledreceived0110001one changed bits10positions 1,3,5,7s21positions 2,3,6,7s41positions 4,5,6,7syndrome6s4+s2+s1 as a positioncorrected0110011flip syndrome position

Read the first row

The table keeps the placement visible: each data bit is tied to its position before any parity bit is chosen.

place first, then check\text{place first, then check}
Data bits have placesHamming encode and correction rows recomputed from pinned bits.Data bits have places - codeword 0110011, syndrome 6rowvaluecheckdata3=1,5=0,6=1,7=1positions 3,5,6,7p10positions 1,3,5,7 evenp21positions 2,3,6,7 evenp40positions 4,5,6,7 evencodeword0110011positions 1..7flip6received bit is toggledreceived0110001one changed bits10positions 1,3,5,7s21positions 2,3,6,7s41positions 4,5,6,7syndrome6s4+s2+s1 as a positioncorrected0110011flip syndrome position

Summary

The data bits are pinned first. Every later parity and syndrome row is recomputed from those exact bits.

d=1011d=1011
Data bits have placesHamming encode and correction rows recomputed from pinned bits.Data bits have places - codeword 0110011, syndrome 6rowvaluecheckdata3=1,5=0,6=1,7=1positions 3,5,6,7p10positions 1,3,5,7 evenp21positions 2,3,6,7 evenp40positions 4,5,6,7 evencodeword0110011positions 1..7flip6received bit is toggledreceived0110001one changed bits10positions 1,3,5,7s21positions 2,3,6,7s41positions 4,5,6,7syndrome6s4+s2+s1 as a positioncorrected0110011flip syndrome position