Network Engineer Exam note--------CRC cyclic redundancy check calculation

Source: Internet
Author: User

CRC Detailed verification code calculation

(Network engineer Exam required)

Example Description: 2008 second half of the morning question (18).

The CRC is used to test the error, the generation of the polynomial is G (X) =x4+x+1, the information code word is 10110, the computed CRC check code is:

A. 0000 B. 0100 C. 0010 d.1111

Analysis

The symbolic representation assumes that the coefficients of the polynomial and the polynomial are represented by the same symbol, as

G (X) = X4+x+1

G (X) =10011

1. The known conditions are as follows:

The original code word to do m (x), namely: M (x) = 10110

Generate Polynomial notation g (x), i.e.: g (x) = 10011

The highest order of G (X) does r, here R = 4

2. Calculation Steps

(1) Calculation xrm (X)

That is, add the tail of M (X) to R 0.

XrM (X) = 10110 0000

(2) Calculate XRM (x) long except g (x), the remainder is recorded as Y (x)

The "Long divide" method here is calculated as follows:

XrM (X) 10110 0000

--G (X) 10011 (note bit correspondence mode, corresponding bit is different or operation can be)

00101 0000

--G (X) 100 11 (Same as calculation method)

001 1100

--G (X) 100 11

01111 (this number is already less than g (x), the calculation ends here, i.e. y (x))

Note that Y (x) is the number of bits R (here is 4), so y (x) = 1111

Y (X) is the CRC check code.

(3) Calculate transfer code word t (x) = XrM (x)-Y (x)

Calculation method: Connect y (x) at the end of M (x) to

i.e.: T (X) = 10110 1111

Answer

This problem only calculates the checksum y (X). The correct answer is: D

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.