I am trying to understand what hamming distance of a code is needed to detect a d-bit error, or to correct a d-bit error.
This is what I have found around the web:
If two codewords are Hamming distance $d$ apart, it will take $d$ one-bit errors to convert one into the other.
To detect (but not correct) up to $d$ errors per length n of a codeword, you need a coding scheme where codewords are at least $(d + 1)$ apart in Hamming distance. Then d errors can't change into another legal code, so we know there's been an error.
To correct $d$ errors, need codewords $(2d + 1)$ apart. Then even with $d$ errors, bit string will be $d$ away from original and $(d + 1)$ away from nearest legal code. Still closest to original. Original can be reconstructed
I have seen in my other post that, in the image, the calculation of the bits that can be detected and correct is done using the reversed formula of the above statements 1. and 2:
If we have a hamming distance of $d$, we can detect $d - 1$ errors (inverse of the formula 1.), so to detect a $d - 1$ error, we need a hamming distance of
d (same thing said in another way). So for example, if we want to know what is the hamming distance required to detect a 4 errors, we just have to apply the formula 1.
$4 = d - 1$
$4 + 1 = d$
We need a hamming distance of 5.
So to find the hamming distance required to correct $d$-bit errors, we have to apply the formula 1. $2d + 1$, where $d$ are the bit errors.
Am I correct?
If yes, could you explain me what the second part of the point 2. is saying:
Then even with $d$ errors, bit string will be $d$ away from original and $(d + 1)$ away from nearest legal code. Still closest to original. Original can be reconstructed
d-bit errors, we mean d number of errors, right?