Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

https://github.com/xaviermerino/ECE1552/tree/master/CRC-3Lab Task #1You are a detective. You have received the latest intelligence data on the target. The messages might have changed unintentionally w

https://github.com/xaviermerino/ECE1552/tree/master/CRC-3Lab Task #1You are a detective. You have received the latest intelligence data on the target. The messages might have changed unintentionally when traveling through the network. You must implement CRC-3 to discover if the data you've obtained is error-free. Your polynomial is x^3 x 1. Each message is at most 29 bits long. Good luck!This is what you are given:unsigned int polynomial = 11;unsigned int data[3] = {23, 80, 13548};unsigned int crc[3] = {6, 4, 4};The variable polynomial is the decimal representation of x^3 x 1. The array data contains information about latitude, longitude, and elevation of the target. The array crc contains the original calculated CRC-3 for the data.Go through the data array and calculate the CRC-3 for each item in the array. Compare your calculation with the provided one in the crc array. Print [OK] or [FAILED] accordingly. If the calculations do not match, print the calculated CRC and expected CRC. Print the steps required to get to the calculated CRC.In order to calculate the CRC-3 we are going to create a function crc3(). This function returns the check value of the CRC-3. We use printSteps to aide in our debugging. When set to true, it prints the binary steps.The following function prototype is given:unsigned int crc3(unsigned int binary, unsigned int polynomial, bool printSteps = false);Example output is shown below for reference.Latitude: 23[FAILED]Calculated CRC: 3Expected CRC: 61011100010110000--------000010000000100000001011--------00000011Longitude: 80[FAILED]Calculated CRC: 5Expected CRC: 410100000001011000000----------000100000000010000000001011000----------000001100000000110000000010110----------000000111000000011100000001011----------0000000101Elevation: 13548[OK]1101001110110000010110000000000000-----------------011000111011000000110001110110000001011000000000000-----------------001110111011000000011101110110000000101100000000000-----------------000101111011000000001011110110000000010110000000000-----------------000000011011000000000000110110000000000001011000000-----------------000000001101000000000000011010000000000000101100000-----------------000000000110000000000000001100000000000000010110000-----------------000000000011100000000000000111000000000000001011000-----------------000000000001010000000000000010100000000000000101100-----------------00000000000000100

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question