【问题标题】:hamming code parity distribution issue汉明码奇偶校验分布问题
【发布时间】:2017-04-24 04:58:57
【问题描述】:

有人可以澄清我哪里出错了。我在这 2 个小时......我知道代码中的第一个奇偶校验包含它自己,并以是和否的顺序跳过它之后的每个第一个数字。第二个跳过它自己和后面的数字之后的每一组数字。第 4 个应在包含自身和前 3 个数字后跳过 4。

These are my message bits in its original form: 1101011011000110 
   and I want to add the hamming parity bits onto them.
   ? = Parity
so this means ??1?101?01101100011?0 
Parity 1 = ?110110010 
Parity 2 = ?101111011 
Parity 3 = ?1010110?0 (this is where my issue is so I cant move on)
Parity 4 = cant get to this part...

【问题讨论】:

    标签: bits parity hamming-code


    【解决方案1】:

    您的第 5 个奇偶校验位似乎在错误的位置。

    你有:

    ??1?101?01101100011?0

    但应该是:

    ??1?101?0110110?00110

    所以,重新计算奇偶校验位(粗体表示“保持”,否则跳过),我们遵循“保持 1,跳过 1,保持 1...”的模式:

    ? ? 1 ? 1 0 1 ? 0 1 1 0 1 1 0 ? 0 0 1 1 0

    P1: ?1110110010 (even number of 1s, so 0 parity)
    

    (丢弃前 1 位)遵循模式“保留 2,跳过 2,保留 2...”:

    ?1 ?1 01 ?0 11 01 10 ?0 01 10

    P2: ?101111001 (even number of 1s, so 0 parity)
    

    (丢弃接下来的 2 位)遵循模式“保留 4,跳过 4,保留 4...”:

    ?101 ?011 0110 ?0011 0

    P4: ?10101100 (even number of 1s, so 0 parity)
    

    (丢弃接下来的 4 位)遵循“keep 8, skip 8, keep 8...”的模式(但我们只能做 keep 8, skip 6,这样就足够了):

    ?0110110 ?00110

    P5: ?0110110 (even number of 1s, so 0 parity)
    

    所以最终的汉明 (21,16) 编码值为:

    001010100110110000110
    

    (21位,其中16位为数据位)

    【讨论】:

      猜你喜欢
      • 2014-03-06
      • 1970-01-01
      • 2013-06-28
      • 1970-01-01
      • 1970-01-01
      • 2016-01-31
      • 2015-04-04
      • 2015-06-29
      相关资源
      最近更新 更多