0% found this document useful (0 votes)
122 views24 pages

Final CRC

The document discusses Cyclic Redundancy Check (CRC), which is an error detection technique used widely in computer networks. It describes how CRC works by using a generator polynomial to calculate a checksum that is appended to the data, and how the receiver can detect errors by recalculating the checksum and comparing it.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
122 views24 pages

Final CRC

The document discusses Cyclic Redundancy Check (CRC), which is an error detection technique used widely in computer networks. It describes how CRC works by using a generator polynomial to calculate a checksum that is appended to the data, and how the receiver can detect errors by recalculating the checksum and comparing it.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Cyclic Redundancy Check (CRC)

 Cyclic Redundancy Check (CRC) is an error


detection technique to detect changes to raw
data and is used widely in today’s computer
networks.
 CRC codes are also known as polynomial
codes, since it is possible to view the bit string
to be sent as a polynomial.
• Cyclic redundancy check (CRC) codes
• – Invented by W. Wesley Peterson, and published in 1961
• – A type of linear block codes
• • Generally, not cyclic, but derived from cyclic codes
• – A systematic error detecting code
• • a group of error control bits (which is the remainder of a
• polynomial division of a message polynomial by a
generator
• polynomial) is appended to the end of the message block
• • with considerable burst-error detection capability
• – The receiver generally has the ability to send
• retransmission requests back to the data source through a
• feedback channel.
Application
• When a codeword is received or read, a CRC-
enabled device performs a CRC on the whole
codeword and compares the resulting check
value with an expected residue constant.
• If the CRC check values do not match, then the
block contains a data error
• The device may take corrective action, such as
rereading the block or requesting that it be
sent again.
CRC Generator and Checker
CRC generator and checker
Generator
• The sender and receiver must first agree on an
pattern, known as a generator, which we will
denote as G.
• If the generator is a polynomial, it must follow
the following two properties:
a. It should not be divisible by x , because otherwise
the last bit of the checksum would always be 0.
b. It should be divisible by x
The Technique
Suppose m is the number of bits of the CRC
generator.
On Sender Side
 Step 1
• Append (m-1) number of zeroes to the data on
the Least Significant Bit (LSB) (rightmost) side.
• Divide it by the CRC Generator. (XOR operation
is performed instead of Subtraction while
dividing)
 Step 2
• The remainder from this division is added to
the data generated earlier in Step 1.

This data is then sent to the destination


On Receiver Side
 Step 1
• Received data is again divided by the CRC
generator.
 Step 2
• If remainder is zero No Error in Data
• If remainder is not zero Data was altered
somewhere in
the network.
Example
• In this example, we shall encode 14 bits of
message.
• Generator is the polynomial x3 + x + 1.
• The polynomial is written in binary as the
coefficients (1x3 + 0x2 + 1x + 1).
• In this case, the coefficients are 1, 0, 1 and 1.
• Generator = 1011
• Start with the message to be encoded:
11010011101100
• We have m = 4, so we append 3 zeroes to the
LSB side. 11010011101100000
• Now we divide It by 1011
• Remainder = 100
• Now Add 100 to our original dividend.
11010011101100000
+ 100
____________________
11010011101100100
• Now for instance if fourth bit from LSB was
accidentally altered. The receiver can easily
detect that error by dividing the received data
by the generator. The remainder now comes
out to be 1 which is not equal to 0
• Now that it is established that the received
data has error The device may take corrective
action, such as rereading the block or
requesting that it be sent again.
• CRC is evaluated during transmission and appended to the
output stream as soon as the last bit goes out onto the
physical medium.
• It is better to have the CRC in a trailer. Because then we can
compute the CRC as you transmit the packet.
• The CRC is computed while the packet is being transmitted
and then incorporated in a trailer. Similarly, the receiver
computes the CRC and compares it with the transmitted one.
• If we put it in the header, we would have to make several
passes in order to compute the CRC and then actually stuffing
each byte.
Division in the sender :
Division in the receiver (two cases) :
• If generator is x3 + 1 and message to be sent is
“CAT” . Find What Data is Sent. Further if 5th
Bit is Changed show that the error can be
detected.
C - 1000011
A - 1000001
T – 1010100
• Generator = 1001
• Append Three Zeroes
• Solve with the same steps

You might also like