我有一个多项式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.我的计算有什么问题?
发布于 2017-07-13 15:41:23
我不明白你的"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 resulthttps://stackoverflow.com/questions/45073412
复制相似问题