|
|
Why is CRC is so popular:
|
|
|
|
|
Polynomial: -x3 + 2x + 1
The polynomial in module 2 representation: x3 + 1 (mod 2)
(Coefficient -1 is odd and is mapped to 1)
(Coefficient 2 is even and is mapped to 0)
(Coefficient 1 is odd and is mapped to 1)
|
(x3 + x) + (x + 1) = x3 + 2x + 1
= x3 + 1 (mod 2)
|
(x3 + x) - (x + 1) = x3 - 1
= x3 + 1 (mod 2)
|
(x2 + x) × (x + 1) = (x3 + x2) + (x2 + x)
= x3 + 2x2 + x
= x3 + x (mod 2)
|
x2 + 1
----------------
x + 1 / x3 + x2 + x
x3 + x2
---------
x
x + 1
------
-1
x3 + x2 + x
------------ = x2 + 1 remainder 1 (mod 2)
x + 1
|
0 1 0 1
+ 0 + 0 + 1 + 1
----- ----- ----- -----
0 1 1 0
|
Observation:
|
|
|
Example:
Polynomial:
x5 + x4 + x2 + 1
x5 + x4 + x2 + 1
= 1x5 + 1x4 + 0x3 + 1x2 + 0x1 + 1x0
|
|
(x3 + x) + (x + 1) = x3 + 2x + 1
= x3 + 1 (mod 2)
|
(x3 + x) - (x + 1) = x3 - 1
= x3 + 1 (mod 2)
|
(x2 + x) × (x + 1) = (x3 + x2) + (x2 + x)
= x3 + 2x2 + x
= x3 + x (mod 2)
|
x2 + 1
----------------
x + 1 / x3 + x2 + x
x3 + x2
---------
x
x + 1
------
-1
x3 + x2 + x
------------ = x2 + 1 remainder 1 (mod 2)
x + 1
|
|