关于
HammingCodeisdesignedtocorrecterrors.ThekeytotheHammingCodeistheuseofextraparitybitstoallowtheidentificationofasingleerror.Markallbitpositionsthatarepowersoftwoasparitybits.(positions1,2,4,8,16,32,64,etc.)Andallotherbitpositionsareforthedatatobeencoded.(positions3,5,6,7,9,10,11,12,13,14,15,17,etc.)
Toeachdatabit,weexpanditastheform1+2+4…(e.g.9=1+8)Thenwemarkparitybitat2^ipositon1or0toallowthenumberofallthedatabitwhoseexpandednesscontains2^iplusparityitselftobeevenorodd.
Hereisanexample:
Abyteofdata:10011010
Createthedataword,leavingspacesfortheparitybits:__1_001_1010
Calculatetheparityforeachparitybit(arepresentsthebitpositionbeingset):
Position1checksbits1,3,5,7,9,11:
_1_001_1010.Evenparitysosetposition1toa0:0_1_001_1010
Position2checksbits2,3,6,7,10,11:
01_001_1010.Oddparitysosetposition2toa1:011_001_1010
Position4checksbits4,5,6,7,12:
011001_1010.Oddparitysosetposition4toa1:0111001_1010
Position8checksbits8,9,10,11,12:
01110011010.Evenparitysosetposition8toa0:011100101010
Codeword:011100101010.
这是个例子,不过我没太看懂
POSITION是怎么空出来的
还有CHECKTHEBITS的那些数是怎么选取的
100分送上
不要复制粘贴的啊.最好是简单易懂的通俗语言.