
Variables
Description
What is this formula?
The Hamming Distance measures the number of positions at which two codewords differ.
It is one of the most fundamental concepts in coding theory and digital communications because it determines the error-detection and error-correction capability of a code.
Larger Hamming distances generally provide stronger protection against transmission errors.
When to use it
Use this formula when analyzing:
- Error-correcting codes
- Hamming codes
- BCH codes
- Reed–Solomon codes
- Digital communications
- Data integrity systems
Example
Consider two binary codewords:
1011010
1110010
Comparing each position:
Position 2 differs
Position 4 differs
Total differing positions:
nm = 2
Formula:
dH = nm
Substitution:
dH = 2
Result:
dH = 2
Applications
- Coding theory
- Error detection
- Error correction
- Telecommunications
- Computer networks
- Data storage
Note
The Hamming distance itself is not calculated from a complex equation but from a count of differing symbol positions. In practical coding systems, the minimum Hamming distance among all valid codewords determines the overall error-detection and correction capability of the code.
