2017-07-13 5 views
0

私は解決できない多項式CRCを持っています。CRC計算が固まった

のx^5 + X^2 + 1

データ:私の計算が間違って何

100101 | 1011100110001 
     100101 
     ------- 
     0010110 
      000000 
      ------ 
      101101 
      100101 
      ------ 
      010001 
      000000 
      ------ 
      100010 
      000000 <- I wrote here 0's because 100101 > 100010 
      ------ 
      1000100 
       100101 
      ------- 
      1100001 <- Here is the problem! It's more than 5 bits. 

:1011100110001

私はこのようましたか?

答えて

0

私はあなたの「000000」の行を理解しますが、これはどうしていない:

Input data: 1011100110001 
Polynom: 100101 (n = 6) 

101110011000100000 <- expand input data by n-1 zeros 
100101    <- polynom aligned to most left 1 of input data 
-------- 
00101101   <- input XOR polynom, then get next input bit 
    100101    
    ------    
    00100010   <- and so on... 
    100101 
    ------- 
    000111001 
     100101 
     ------ 
     0111000 
     100101 
     ------ 
     0111010 
     100101 
     ------ 
     0111110 
      100101 
      ------- 
      0110110 
      100101 
      ------ 
      0100110 
      100101 <- ... until all input bits are "used up" 
      ------ 
      000011 <- CRC result 
+0

あなたが「というように」の行をしたのはなぜ?私はあなたがXORのために十分ではない数からデータから複数の数値を追加したのを見るが、私は結果が小さい場合には、 –