1

Is it true that for CRC-N maximum message length is 2^(n-1) bits? So for CRC-8 it's 127 bits (15 bytes), for CRC-16 it's 32767 bits (4Kb) and for CRC-4 it's just one byte?

If I need to 'protect' 12 bits with 4 bits of checksum, can I still use CRC-4 or is there a better alternative?

Amomum
  • 6,217
  • 8
  • 34
  • 62
  • Wikipedia got a [good writeup here](https://en.wikipedia.org/wiki/Cyclic_redundancy_check) -- but the use of CRC for anything is debatable and results in opinionated discussions for this to be a good question here – Soren Apr 28 '16 at 16:55
  • Also note that there is a [extensive list](https://en.wikipedia.org/wiki/Error_detection_and_correction) of how to handle error detection and error correction with Hamming code being the classical ways of making 12 bits self correcting by adding 4 extra bits – Soren Apr 28 '16 at 16:58
  • 4
    The following seems relevant: http://stackoverflow.com/questions/2321676/data-length-vs-crc-length?rq=1, possible duplicate. – Matsmath Apr 28 '16 at 16:59
  • @Soren Maybe my eyes are deceiving me but I can't find any kind of formula for message length in wikipedia. Can you please tell me if I'm right or not about 2^(n-1) bits maximum? I need to know if what I have already coded (quite some time ago) is correct or not. I'm very grateful for links and will read them. – Amomum Apr 28 '16 at 17:51
  • @Soren by the way, I'm only seeing Hamming code of 15 bits with 7 bits of data on wikipedia. Can you please clarify? – Amomum Apr 28 '16 at 18:29
  • The `Hamming(15,11)` uses a total of 15 bit with 11 data bits (and 4 check bits), so I recalled wrong when I believed you could have 12 bits in the data. – Soren Apr 29 '16 at 19:58
  • @Soren what would you advise to use instead? – Amomum Apr 30 '16 at 11:34
  • As the polynomial is a feedback system, it will eventually repeat sequence. Some early XOR (short) feedback systems were used as drum machines and tone generators for instance. Is there any work that shows what at what data lengths various standard CRCs start to become less effective ? – user50619 Nov 13 '18 at 12:26

0 Answers0