Lab Task #1 You 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.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Image shows the question, below is an example output:

Latitude: 23    [FAILED]
    Calculated CRC: 3
    Expected CRC: 6

10111000
10110000
--------
00001000

00001000
00001011
--------
00000011


Longitude: 80    [FAILED]
    Calculated CRC: 5
    Expected CRC: 4

1010000000
1011000000
----------
0001000000

0001000000
0001011000
----------
0000011000

0000011000
0000010110
----------
0000001110

0000001110
0000001011
----------
0000000101


Elevation: 13548    [OK]

11010011101100000
10110000000000000
-----------------
01100011101100000

01100011101100000
01011000000000000
-----------------
00111011101100000

00111011101100000
00101100000000000
-----------------
00010111101100000

00010111101100000
00010110000000000
-----------------
00000001101100000

00000001101100000
00000001011000000
-----------------
00000000110100000

00000000110100000
00000000101100000
-----------------
00000000011000000

00000000011000000
00000000010110000
-----------------
00000000001110000

00000000001110000
00000000001011000
-----------------
00000000000101000

00000000000101000
00000000000101100
-----------------
00000000000000100

Lab Task #1
You 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);
Transcribed Image Text:Lab Task #1 You 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);
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY