What is CRC? And how does it help in error detection?

▼魔方 西西 提交于 2019-12-07 07:16:35

问题


What is CRC? And how does it help in error detection?


回答1:


CRC stands for Cyclic Redundancy Check. it helps in error detection.. It consists of the following

b(x)-> transmitted code word
q(x)-> quotient
i(x)-> information polynomial
r(x)-> remainder polynomial
g(x)-> generated polynomial

step 1: x^(n-k) * i(x)

step 2: r(x) = (x^(n-k) * i(x))%g(x)

step 3: b(x) = (x^(n-k) * i(x)) XOR with r(x) 
        which results in a transmitted code word.

this b(x) is send to the reciever end from the sender and if u divide the 
transmitted code word i.e. b(x) with g(x) and if the remainder 
i.e. r(x) is equal to 0 at the reciever end then there is no error 
otherwise there is an error in the transmitted code word during the 
transmission from sender to reciever.

In this way it is helpful in error detection.



回答2:


CRC is a non-secure hash function designed to detect accidental changes to raw computer data, and is commonly used in digital networks and storage devices such as hard disk drives.

A CRC-enabled device calculates a short, fixed-length binary sequence, known as the CRC code, for each block of data and sends or stores them both together. When a block is read or received the device repeats the calculation; if the new CRC code does not match the one calculated earlier, then the block contains a data error and the device may take corrective action such as requesting the block be sent again.

Source: Wikipedia




回答3:


Cyclic Redundancy Check is a hash function that allows you to compute an unique value given some input which is guaranteed to be always the same for the same input. If the input changes somehow from the original, a different CRC checksum will be generated. So if you have an input and a checksum you could calculate a new checksum from the input and compare both checksums. If they are the same it means that the input hasn't changed.



来源:https://stackoverflow.com/questions/1957756/what-is-crc-and-how-does-it-help-in-error-detection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!