CRC cyclic redundancy error checking test center computer network (illustration)

Demand use:
a communication link reality not ideal, errors may occur in the bit transmission: 0,0 1 may become 1 may become. We call this bit error, so we need the data transmission error check is performed to reduce the error rate. In the data link layer, in order to facilitate the hardware detects an error , an error checking field typically stored error check code provided at the end of the entire frame of the frame, the error check field is often referred to as a frame check sequence.
CRC appreciated:
requires knowledge base include:
a modulo 2 division : the binary division actually bitwise exclusive-or operation, i.e. the same bit comparison, the same result as the corresponding bits of both "0", the result is different "1".
Polynomial coding (CRC coding): to generate a divisor G , CRC generator polynomial also corresponds to a set of binary numbers, e.g., the title, CRC generating polynomial: x ^ 4 + x ^ 2 + x ^ 1 + 1 ( constant item 1 is X ^ 0)
is: 2 ^ 4 + 2 ^ 2 + 2 ^ 1 + 1, corresponding to the index bit is 1, otherwise 0, the corresponding binary is: 10111
algorithm requires a most significant bit and the least significant bit of G's bit is 1.

CRC error checking operation step :
1, the sender and receiver to negotiate a r + 1 bits to generate bit- G .
2, the sender selects a suitable r -bit redundancy code R & lt (i.e., error detection code), and attach it to d the (data to be sent), so that d + r bit pattern obtained after the XOR operation just to the dividend G divisible.

Description : To calculate the redundancy R, the divisor in the data plus one minus the number 0 (0 generating polynomial times a highest entry), XOR, to obtain the same number of bits of the remainder bits of R, then, the the residue was added to a binary number after the data to be transmitted obtained after the XOR operation with a divisor G, necessarily divisible, then, we see the result, the remainder is 0, the data string there is no bit error, otherwise, occurs change of bits. (On such a process must be understood)

Processing of the sender
Process recipient

Here Insert Picture Description

Next, look at an example:
Here Insert Picture Description
step
Here Insert Picture Description
So, the final form is sent:
Here Insert Picture Description
the question is how to calculate redundancy, the following questions to determine a redundant code:
Here Insert Picture Description
Here Insert Picture Description
Description : Business is not what, but we calculate role in the process of marking, indicating count to the first of several, simultaneously, is 1, in addition to be explained, the dividend a, is 0, indicating insufficient addition, this time labeled 0, and then again removed borrow.
The textbook (Xie Xiren 5th edition) are generally commercially all 1, but in the calculation procedure, the XOR with 0, the moving rearward.

Well, that's all. Examination steady.
(The above picture comes from Hunan University of Science and Technology computer network class teacher .B stations have this problem video)

Released six original articles · won praise 11 · views 491

Guess you like

Origin blog.csdn.net/qq_44114055/article/details/103826356