早教吧 育儿知识 作业答案 考试题库 百科 知识分享

关于HammingCodeisdesignedtocorrecterrors.ThekeytotheHammingCodeistheuseofextraparitybitstoallowtheidentificationofasingleerror.Markallbitpositionsthatarepowersoftwoasparitybits.(positions1,2,4,8,16,32,64,etc.)

题目详情
关于
Hamming Code is designed to correct errors.The key to the Hamming Code is the use of extra parity bits to allow the identification of a single error.Mark all bit positions that are powers of two as parity bits.(positions 1,2,4,8,16,32,64,etc.) And all other bit positions are for the data to be encoded.(positions 3,5,6,7,9,10,11,12,13,14,15,17,etc.)
To each data bit,we expand it as the form 1+2+4…(e.g.9=1+8) Then we mark parity bit at 2^i positon 1 or 0 to allow the number of all the data bit whose expandedness contains 2^i plus parity itself to be even or odd.
Here is an example:
A byte of data:10011010
Create the data word,leaving spaces for the parity bits:_ _ 1 _ 0 0 1 _ 1 0 1 0
Calculate the parity for each parity bit (a represents the bit position being set):
Position 1 checks bits 1,3,5,7,9,11:
_ 1 _ 0 0 1 _ 1 0 1 0.Even parity so set position 1 to a 0:0 _ 1 _ 0 0 1 _ 1 0 1 0
Position 2 checks bits 2,3,6,7,10,11:
0 1 _ 0 0 1 _ 1 0 1 0.Odd parity so set position 2 to a 1:0 1 1 _ 0 0 1 _ 1 0 1 0
Position 4 checks bits 4,5,6,7,12:
0 1 1 0 0 1 _ 1 0 1 0.Odd parity so set position 4 to a 1:0 1 1 1 0 0 1 _ 1 0 1 0
Position 8 checks bits 8,9,10,11,12:
0 1 1 1 0 0 1 1 0 1 0.Even parity so set position 8 to a 0:0 1 1 1 0 0 1 0 1 0 1 0
Code word:011100101010.
这是个例子,不过我没太看懂
POSITION是怎么空出来的
还有CHECK THE BITS的那些数 是怎么选取的
100分送上
不要复制粘贴的啊.最好是简单易懂的通俗语言.
▼优质解答
答案和解析
POSITION就是把 1, 2, 4, 8, 16, 32, 64 这些2的0,1,2,3,4,5.次方的位置空出来,其他的位置依次填上原来的数 就变成了_ _ 1 _ 0 0 1 _ 1 0 1 0
3=1+2
5=1+4
6=2+4
7=1+2+4
9=1+8
10=2+8
11=1+2+8
12=4+8
比方说第三位影响第1和2标志位,第12位影响第4和8标志位,以此类推.
Position 1 跟1,3,5,7,9,11相关: 使得1,3,5,7,9,11标志位上的值异或得0 所以第1位是0
? _ 1 _ 0 0 1 _ 1 0 1 0. Even parity so set position 1 to a 0: 0 _ 1 _ 0 0 1 _ 1 0 1 0
其他这几个以此类推,不明白的话再发信息给我
Position 2 checks bits 2,3,6,7,10,11:
0 ? 1 _ 0 0 1 _ 1 0 1 0. Odd parity so set position 2 to a 1: 0 1 1 _ 0 0 1 _ 1 0 1 0
Position 4 checks bits 4,5,6,7,12:
0 1 1 ? 0 0 1 _ 1 0 1 0. Odd parity so set position 4 to a 1: 0 1 1 1 0 0 1 _ 1 0 1 0
Position 8 checks bits 8,9,10,11,12:
0 1 1 1 0 0 1 ? 1 0 1 0. Even parity so set position 8 to a 0: 0 1 1 1 0 0 1 0 1 0 1 0
Code word: 011100101010