0

I know how to detect and correct 1 error, but as i read, to detect double error i need to add one more bit for parity at the end of the message.

So whats next after adding that bit, how can i find out that there is double error?

jovanMeshkov
  • 757
  • 5
  • 12
  • 29

1 Answers1

2

Simply compute the Hamming code and parity bit from the data, and compare to the transmitted Hamming code and parity bit. If any don't match, you have detected an error.

Mark Adler
  • 101,978
  • 13
  • 118
  • 158
  • Would you like to write some example...? Or am i doing it right, coz the test examples that are given, say i am wrong. I will check parity bits and find if there is an error, i will fix it, and after that i will check if parity bits in transmitted code are equal to fixed code? – jovanMeshkov May 01 '14 at 01:40
  • Yes. First see if the Hamming code and parity match what was sent. If so, no detected errors. Otherwise, use the Hamming code to correct the data bits. Now check the parity. If the parity is correct, then you detected and corrected a one-bit error. If the parity is wrong, then you detected, but are not able to correct, a two-bit error. – Mark Adler May 01 '14 at 04:23
  • would you like to solve those for me: 11111110001, 00111110010. First one should be OK, second should have two errors, but as my calculations go, both are OK... – jovanMeshkov May 02 '14 at 12:28