HiveBrain v1.2.0
Get Started
← Back to all entries
debugMinor

How to pick Hamming distance

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
pickhammingdistancehow

Problem

Wikipedia's article Cyclic redundancy check states that for the same n (bits) there are multiple CRCs possible with different polynomial. Then it lists this Best CRC Polynomials article that gives some variations with different polynomials. I am looking to implement a simple CRC-8. What should be my criteria for picking one polynomial over another?

I assume that it boils down to selecting the Hamming distance, but how is that related to my problem at hand? How do I pick the correct/best Hamming distance for best detecting possible errors in my case (and in what terms should I describe my case)? For example, will the choice depend on the media for storing/transmitting data or other physical factors or something else?

Solution

The author of the list that you mention has written a thorough report on the problem of selecting a CRC polynomial, which probably contains the answers to all your questions. See page C-19:

Important to select CRC polynomial based on:

  • Data Word length



  • Desired HD



  • Desired CRC size



Safety-critical applications commonly select HD=6 at max message length

For example, HD-6 detects between 1-6 error bits in the Data Word, so the bigger the HD the better (for the given Data Word length).

Context

StackExchange Computer Science Q#55038, answer score: 2

Revisions (0)

No revisions yet.