Question:

Can a CRC (Cyclic Redundancy Check) detect a change in the order of the data?

by  |  earlier

0 LIKES UnLike

Can a CRC (Cyclic Redundancy Check) detect a change in the order of the data?

 Tags:

   Report

4 ANSWERS


  1. not it's job. it merely seeks out repeated code .....tom


  2. It can. it depends on which CRC you're using and how the data are organized. I think as a rule if you have n-bit order, you need at least a 2n CRC to get the guarantee of detecting a single nearest-neighbor swap, but you will catch some swaps with a shorter CRC. The problem with a shorter CRC is that the "error burst" then spans more bits than are in the CRC, which makes it possible (albeit generally unlikely) for the error to go undetected.

    Edit: I agree, CRC is not usually the best way to detect order errors (that depends on the structure of the data and what you're expecting to happen exactly), but I think several other answers are confusing CRCs with parity checks and checksums. Parity is like a 1-bit CRC, and it will never detect an order change, but when people say "CRC", they usually mean at least an 8-bit CRC and often a 12-bit or greater CRC. Simple checksums, like parity, can't detect order errors. Part of the reason for using a CRC instead of parity or checksum is that it can in fact detect order errors. I've written CRC code and I can personally attest that if you get the byte order wrong in processing multi-byte data streams, it can and will mess up your CRC calculation.

  3. CRC checks whether a data is getting copied again and again. It does not check the order of files. It just checks whether the copied file or part gets copied again(This is shown as an error while you try to copy files from a scratched (damaged) cd)

  4. Not normally.  It's just worried about the amount of bits.  Changing the order of the bits doesn't change the number of them.

Question Stats

Latest activity: earlier.
This question has 4 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions