Data link layer - CRC what does divide by 1 + x mean?

时间:2017-12-18 05:38:28

标签: networking crc

Can someone please explain what this part of CRC codes from Tannenbaum computer networks means!

If there has been a single-bit error, E(x) = x^i , where i determines which bit is in error. If G(x) contains two or more terms, it will never divide into E(x), so all single-bit errors will be detected.

And

If there have been two isolated single-bit errors, E(x) = x^i + x^j , where i > j. Alternatively, this can be written as E(x) = x^j (x^(i − j) + 1). If we assume that G(x) is not divisible by x, a sufficient condition for all double errors to be detected is that G(x) does not divide x ^k + 1 for any k up to the maximum value of i − j (i.e., up to the maximum frame length). Simple, low-degree polynomials that give pro- tection to long frames are known. For example, x ^15 + x ^14 + 1 will not divide x ^k + 1 for any value of k below 32,768.

Please post in simple terms so I can understand it a bit more!. EXAMPLEs are appreciated. Thanks in advance!

1 个答案:

答案 0 :(得分:2)

消息是一系列位。您可以将任何位序列转换为多项式,只需将每个位的系数设为1,x,x 2 等,从第一位开始。因此100101变为1 + x 3 + x 5

你可以通过将它们的系数视为最简单的有限域GF(2)的成员来使这些多项式变得有用,它只包含元素0和1.还有一个是异或运算和乘法是和操作。

现在,您可以完成高中时使用多项式所做的所有事情,但系数高于GF(2)。因此,添加到x + x 2 的1 + x变为1 + x 2 。 1 + x乘以1 + x变为1 + x 2 。 (解决它。)

循环冗余校验(CRC)是从这种二进制消息算法的方法得到的,其中转换为多项式的消息除以特殊常数多项式,其度数是CRC中的位数。然后,该多项式除法的余数的系数是该消息的CRC。

阅读Ross William's CRC tutorial了解更多信息。 (真正的CRC不只是剩下的,但你会看到。)