Networking CRC计算卡滞

Networking CRC计算卡滞,networking,error-handling,crc,Networking,Error Handling,Crc,我有一个多项式CRC,我无法解决 x^5+x^2+1 数据:101110001 我喜欢这样: 100101 | 1011100110001 100101 ------- 0010110 000000 ------ 101101 100101 ------ 010001 000000

我有一个多项式CRC,我无法解决

x^5+x^2+1

数据:101110001

我喜欢这样:

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.
100101 | 101110001
100101
-------
0010110
000000
------
101101
100101
------
010001
000000
------
100010
000000我不明白你的“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
输入数据:101110001
多项式:100101(n=6)
10111000100000你为什么要做“等等”这行?我看到您从数据中添加了多个数字,其中的数字对于XOR来说是不够的,但我认为,在所有情况下,结果都小于除法器,我们添加数字