Other

Hamming Code Calculator

Find the parity bits needed for a Hamming code.

Parameters Live Compute
Calculated Output
Parity bits (r) 3
Total code length 7
Formula: Smallest r with 2^r >= m + r + 1
Step-by-Step Breakdown
1. Values used:
2. Data bits (m) = 4
3.
4. Parity bits (r) = 3
5. Total code length = 7
Did this calculator solve your problem today?
Report issue to loopingon.com
Sponsored

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)).

Frequently Asked Questions

What can it correct?

Any single-bit error, and it can detect (not fix) some double-bit errors.

Advertisement