-2

I am looking for a simple answer to a simple question but I have yet to find a straight forward answer.

For the Hamming code sequence (7 4), it can either do 1-bit detection and correction or 2-bit error detection.

I would like to know the same thing for the (255 247) Hamming sequence. If there is an algorithm to work this out I would very much appreciate it as I am interested in knowing this information for the other Hamming sequences.

Is there also perhaps a C code example for (255 247) encoding exclusively?

Gareth T.
  • 115
  • 7

1 Answers1

2

The minimum hamming distance determines the error detection/correction capabilities of a code.

Hamming codes (eg. Hamming(7,4) or Hamming(255,247)) have a hamming distance of 3 (d = 3), so can detect 2-bit errors (d - 1 = 2) or correct 1-bit errors ((d - 1) / 2 = 1).

Sander De Dycker
  • 16,053
  • 1
  • 35
  • 40
  • How would I calculate the hamming distance of the Hamming code (8,4)? – Gareth T. Jan 28 '19 at 07:17
  • 1
    @GarethT. : Hamming(8,4) is an "extended" Hamming code - ie. it's [Hamming(7,4) with an extra parity bit](https://en.wikipedia.org/wiki/Hamming_code#[7,4]_Hamming_code_with_an_additional_parity_bit). That extra parity bit makes he code have a minimum hamming distance of 4 (`d = 4`), so it can detect (up to) 3-bit errors (`d - 1 = 3`) or correct 1-bit errors (`(d - 1) / 2 = 1`). I really recommend reading through the links in my answer to get a better understanding. – Sander De Dycker Jan 28 '19 at 07:31