$25
Cyclic Redundancy Check (CRC)
In this homework, you are asked to write a MATLAB program for the cyclic redundancy check (CRC) code, using CRC-32. Please download the data M(x) (inputdata.mat that contains a binary vector of 12000bits named “packet”) on eLearn.
1. Use the inputdata M(x) and the generator of CRC-32
C(x)x32x26x23x22x16x12x11
x10x8x7 x5x4x2x1
to find the transmitted message P(x) (as a binary vector of 12032 bits). (Note: Do not use the function of CRC32 in MATLAB.)
2. Suppose that you are a middle man and you would like to corrupt the transmitted message P(x) by adding an undetectable error E(x) into P(x). A trivial way to do this is to let E(x)=C(x) and add C(x) to P(x). But this will change 15 bits in P(x) as there are 15 nonzero terms in C(x). Can you find an E(x) that only needs to change at most 10 bits in P(x)? Your score for this problem will depend on the number of bits that you need to change in P(x).
Upload a compressed files (YourID.rar, e.g., 99064599.rar) that contents your results as two binary arrays P(x) and E(x) in a file (YourID.mat, e.g., 99064599.mat) that contains two binary vectors of 12032bits named
“codepacket” (P(x)) and “error”( E(x) ) and the two source code files (YourID_1.m, e.g., 99064599_1.m for generating P(x) and YourID_2.m, e.g., 99064599_2.m for generating E(x)) to eLearn.