什么是CRC?它是如何在错误检测帮助?

有帮助吗?

解决方案

CRC表示循环冗余校验。 它有助于错误检测.. 它由以下的

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.

其他提示

CRC是一个非安全散列函数设计为检测到的原始计算机数据意外更改,并且在数字网络和存储设备是常用的,例如硬盘驱动器。

一个启用CRC-装置计算一个短的,固定长度的二进制序列,被称为CRC码,对于每个数据块,并发送或存储它们两者一起。当一个块被读取或接收的装置重复该计算;如果新的CRC码不匹配早先计算出的一个,则该块中包含的数据错误并且该装置可采取纠正措施,如请求块被再次发送。

来源:维基百科

循环冗余校验是散列函数,允许你计算给定的某些输入,其被保证是总是对相同的输入相同的唯一值。如果输入从原来的以某种方式改变,不同的CRC校验将会产生。所以,如果你有一个输入和校验,你可以计算出从输入一个新的校验和比较这两个校验。如果它们是相同的则意味着输入并没有改变。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top