ASCII IN MATLAB and error-detection mechanism using standard CRC algorithm
Show older comments
The goal of this lab exercise is to implement an error-detection mechanism using standard CRC algorithm. Write two programs, generator and verifier. The generator program reads from standard input (or a file) a line of ASCII text containing an n-bit message consisting of a string of 0s and 1s. The second line is the k-bit polynomial, also in ASCII. It outputs to standard output (or a file) a line of ASCII text with n + k 0s and 1s representing the message to be transmitted. Then it also outputs the polynomial, just as it read it in. The verifier program reads in the output of the generator program and outputs a message indicating whether it is correct or not. Finally, write a program, alter, that takes the outputs of the generator program, inverts 1 bit on the first line depending on its argument (the bit number/position, counting from the leftmost bit as 1) but copies the second line correctly. By running generator on the input file and polynomial, and then run verifier on the output of generator, you should see that the message is correct, but by running generator on the input file and polynomial, and then alter arg on the output of generator, and run verifier again, you should get the error message. File size will be no longer than 1024 bits (i.e., 128 characters) and the polynomial will be less than or equal to 8 degrees). So make sure that your program works for general inputs and not only for one specific input. Please write a description of the logic flow of your implementation.
Answers (0)
Categories
Find more on Other Formats in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!