I have 4-bit data with the hamming code 0010011
.
the parity parameters are: p1=0 , p2=0 , p3=0
and the check codes are: c1 = 0 , c2 = 1 , c3 = 0
so I thought that I have an error in position 2 of my data but the solution says that I can not detect the position of the error.
my question is: when I can find the position of an error in hamming code?
-
$\begingroup$ okay , I think the solution was wrong $\endgroup$– hossein hayatiApr 23, 2019 at 9:56
1 Answer
You can never detect the positions of errors with certainty.
You can make the assumption that there is at most a single bit error. Under that assumption, if your code is not a valid code, you can find all different data where the hamming code differs from your code in only one bit position; if there is exactly one such data then you know where the error is (under your assumption).
You can make the assumption that there is at most a double bit error. Under that assumption, if your code is not a valid code, you can find all different data where the hamming code differs from your code in at most two bit positions; if there is exactly one such data then you know where the error or errors are (under your assumption).