Summary of CRC cyclic redundancy check code

Source: Internet
Author: User


I. INTRODUCTION of CRC

First here is what is CRC: Cyclic redundancy Code Check English name is cyclical redundancy check, referred to as CRC, it is the use of division and the remainder of the principle of false detection (error detecting). In practical application, the transmitting device calculates the CRC value and sends it along with the data to the receiving device, and the receiving device recalculates the CRC to the received data and compares it with the received CRC, which indicates that the data communication error occurs if the two CRC values are different.
In fact, CRC has more than a variety of, such as CRC16, CRC32, why call 16, 32 it. There is not a relationship with a bit here. It is determined by the highest power of the polynomial. as shown below. Theoretically, the higher the power of the college test results better.
CRC (12-bit) =x12+x11+x3+x2+x+1
CRC (16-bit) = X16+x15+x2+1
CRC (CCITT) = x16+x12 +x5+1
CRC (32-bit) = x32+x26+x23+x16+x12+x11+x10+ x8+x7+x5+x4+x2+x+1
Second, the basic principle of cyclic redundancy check code (CRC):

After the K-bit information code and then splicing R-bit check code, the entire encoding length is N bits, therefore, this code is called (n,k) code. For a given (n,k) code, it can be proved that there is a polynomial g (x) with a maximum power of n-k=r. A checksum of K-bit information can be generated according to G (X), and g (x) is called the generating polynomial of the CRC code.
The specific generation process of the verification code is: Assume that the sending information with the information polynomial C (x), the C (x) to the left R-bit, it can be expressed as C (x) *2R, so that the right side of C (x) will be vacated R bit, this is the location of the check code. The remainder from the C (x) *2r divided by the generation of the polynomial g (x) is the check code.


Principle Mind Map Summary:



Iii. Common CRC in Communication and network
In data communication and network, usually K is quite large, consisting of 1000 or even thousands of data bits, and then using CRC code to generate the check digit of R bit. It can only detect errors and not correct them. Generally take r=16, the standard 16-bit generation polynomial has crc-16=x16+x15+x2+1 and crc-ccitt=x16+x15+x2+1.
In general, R-bit generation polynomial generated CRC code can detect all double-fault, odd-bit error and burst length is less than or equal to r of the burst error and (1-2-(r-1)) burst length of r+1 burst error and (1-2-R) burst length is greater than r+1 burst fault. For example, in the case of the above r=16, it is possible to detect any burst error with a burst length of less than or equal to 16 and 99. The burst length of 997% is 17 burst error and 99. 998% burst length is greater than 17 burst error. So CRC code error detection ability is still very strong. Here, a burst error is a string of errors that occur almost continuously, and the burst length refers to the length of the last digit from the first error to the error (however, the middle does not necessarily mean that every one is wrong).


"Example 1" a cyclic Redundancy code (CRC) of the generation of a polynomial G (x) =x3+x2+1, with this generation of redundant bits generated by the polynomial, added to the information bit after the formation of CRC code. If the information bits 1111 and 1100 are sent, its CRC code is _a_ and _b_ respectively. For some reason, the receiving end receives a CRC code that can be judged to be faulty by a certain rule, such as code-word _c_, _d_, and _E_. (1998 question 11)
Alternative answers:
a:①lllll00②1111101③1111110④1111111
b:①1100100②1100101③1100110④1100111
c~e:①0000000②0001100③0010111⑤1000110⑥1001111⑦1010001⑧1011000
Solution:
A:g (x) =1101,c (x) =1111 C (x) *23÷g (x) =1111000÷1101=1011 remainder 111
The resulting CRC code is 1111111.
B:g (x) =1101,c (x) =1100 C (x) *23÷g (x) =1100000÷1101=1001 remainder 101
The resulting CRC code is 1100101.
C~e:
Using g (x) =1101 to ①~⑧ 2 in addition to: ①0000000÷1101 More than 000②1111101÷1101 001
③0010111÷1101 Yu 000④0011010÷1101 more than 000⑤1000110÷1101 000
⑥1001111÷1101 Yu 100⑦1010001÷1101 more than 000⑧1011000÷1101 100
So the answer to _C_, _d_ and _e_ is ②, ⑥, ⑧.


"Example 2" computer is commonly used in the error code is CRC, that is, _a_ code. The _b_ operation is used in the encoding process. Assuming that the generated polynomial is G (X) =x4+x3+x+1, the original message is 11001010101, then the encoded message is _C_. CRC code _d_ is the right thing to say.
It is often used in radio communication to specify a code word length of 7 bits. And there are always and only 3 "1". The coding efficiency of this code is _E_.
Alternative answers:
A:① Horizontal vertical parity parity ② cyclic summation ③ cyclic redundancy ④ positive ratio
B:① modulo 2 Division ② fixed-point binary Division ③ two-decimal division ④ Cyclic Shift method
C:①1100101010111②110010101010011③110010101011100④110010101010101
D:① can correct one error ② can detect all even-bit errors
        ③ detects all burst errors that are less than the length of the check bit ④ detect any burst errors that are less than, equal to, the length of the check bit
        E:①3/7②4/7③log23/log27④ (log235)/7
Solution: From the previous discussion of CRC, can be drawn: a:③ cyclic redundancy B:① modulo 2 division
        C:g (x) =11011,c (x) =11001010101,c (x) *24÷g (x) =110010101010000÷11011 remainder 0011
        The resulting CRC code is ②110010101010011
        D: From the previous discussion on communication and the common CRC in the network can be concluded that: ④ can detect all less than, equal to the length of the check bit burst error
        E: The fixed code is also called fixed RE, is the promotion of parity check. In a fixed code, an odd or even number of properties remains the same, whereas a limit of 1 per word is fixed. With use, there may be more than one additional check digit required for a fixed code, but more error-checking capability than a single parity check.
The so-called 7 in the 3 fixed code, that is, the entire code word length is 7 bits, where 1 of the number of bits is set to 3. Only 1 of all 128 7-bit codes (0000000~1111111) have a fixed number of digits of 3, which is the legitimate code word. Can be used to find a combination of the formula of its legal code word number: c73=7!/(3!* (7-3)!) =7*6*5/(1*2*3) =35
        Encoding efficiency = number of digits required for legal code Word/number of digits total = (log235)/7
There are two ways to realize CRC, namely polynomial and table-checking.


Summary of CRC cyclic redundancy check code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.