我有一个我无法解决的多项式CRC。
x ^ 5 + x ^ 2 + 1
数据:1011100110001
我确实喜欢这个:
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.
我的计算有什么问题?
答案 0 :(得分:0)
我不明白你的&#34; 000000&#34;行,但是怎么样:
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