Hamming Code Calculator
Find the parity bits needed for a Hamming code.
Hamming codes add parity bits so single-bit errors can be detected and fixed.
The math behind it
You need the smallest r where 2^r >= m + r + 1, giving m + r total bits.
Worked example
4 data bits need 3 parity bits (a 7-bit code, the classic Hamming(7,4)).
FAQ
What can it correct?
Any single-bit error, and it can detect (not fix) some double-bit errors.