Computer Architecture (iii) -- Cyclic Redundancy Verification

Source: Internet
Author: User

In the verification code system, there are various verification methods: parity verification, Haiming code verification, and Cyclic Redundancy verification. Today we will discuss with you about common cyclic redundancy verification.

Cyclic Redundancy check (CRC, cyclic redundancy check) is the most common error check code. It is characterized by the length of information fields and verification fields that can be arbitrarily selected. It has been widely used in network communication, that is, disk storage. Polynomial: a binary number can be expressed by a polynomial. For example, 1011 is expressed as X3 + X1 + x0. The maximum power of N can be converted to the binary number with a length of N + 1.
CRC encoding: After the K-bit information code is combined with the R-bit verification code, the length of the entire code is N bits. Therefore, this encoding is also called (n, k) code. Generate a polynomial: divide the encoding Equation by the polynomial of the Information Code. The obtained remainder polynomial is the verification code. The decoded equation divides the received information by the generated polynomial. If the remainder is 0, the result is correct. Otherwise, the transfer fails, and the remainder is the error location. The specific generation process of the Verification Code is as follows: ① assume that the sending information is represented by the information polynomial C (x), and C (X) is shifted to the r bit, it can be expressed as C (X) * The r power of 2, so that the right side of C (x) will be blank out of the r bit, which is the position of the verification code. ② Divide the information after the shift by the remainder polynomials obtained by the generated polynomial g (x), which can be converted to the R-bit binary. ③ Embed the remainder after the original information. For example, if the information bit is 10100110 and the generated polynomial is a (x) = X5 + X4 + x + 1, then C (x) = a (x) * X5 = (X7 + X5 + X2 + x) * X5 =   X12 +   X10 + X7 + X6

The remainder is X4 + X3 and is converted to binary 11000, so the CRC code is 10100110110000. The above method is solved by polynomial. Now we will try it in binary mode. The information bit is 10100110, And the generated polynomial is a (x) = X5 + X4 + x + 1. Then a (x) is converted to a binary value of 110011, and the information bit is shifted to the r bit (that is, the maximum power + 1 = 6 digits). That is, after the information is filled with 5 zeros, 10100110000000 is obtained, divide it by 110011 of the (x) conversion, and take the R-bit remainder, that is, 6 digits. Then, embed the remainder after the original information. Figure:

The remainder is 112.16,6 digits, which is exactly the same as the result of the preceding method.

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.