2 Bit Error Correction Algorithm
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and reed-solomon error correction algorithm policies of this site About Us Learn more about Stack Overflow the
Error Correction Code Algorithm
company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users hamming code algorithm error correction Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes
Single Bit Error Correction
a minute: Sign up What is the minimum number of bits needed to correct all 2 bit errors? up vote 4 down vote favorite I learned about hamming codes and how to use them to correct 1 bit errors and detect all 2 bit errors, but how extend this to correcting 2 bits, and maybe more? What is the minimum number one bit error correction of bits needed to correct all 2 bit errors? error-correction error-code hamming-code share|improve this question asked Apr 12 '11 at 7:35 user623879 1,83452343 add a comment| 1 Answer 1 active oldest votes up vote 4 down vote accepted I think I figured it out. N=number of data bits, k=number error correcting bits(eg parity for hamming) In any ECC scheme, you have 2^(N+k) possible bit strings. For single bit error: You must find k such that the total number of possible bit strings is larger than the possible number of strings with at most 1 bit error for a given string. The total possible strings with at most 1 bit error is 2^N(n+k+1) 1 string with no error, N+k strings with 1 bit error 2^(N+k)>=(2^N)*(N+k+1) You simply have to plugin values of k until you find the one that satisfies the above(or however you wish to solve it) Similarly for 2 bit error, it is 1 string with no error, N+k strings with 1 bit error, N+k choose 2 strings with 2 bit error. 2^(N+k)>=(2^N)*(N+k+1 + (N+k choose 2)) share|improve this answer
tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings
Multiple Bit Error Correction
and policies of this site About Us Learn more about Stack Overflow
Hamming Distance Error Correction
the company Business Learn more about hiring developers or posting ads with us Electrical Engineering Questions Tags Users error detection and correction using hamming code example Badges Unanswered Ask Question _ Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes http://stackoverflow.com/questions/5631871/what-is-the-minimum-number-of-bits-needed-to-correct-all-2-bit-errors a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Single Bit Error Correction & Double Bit Error Detection up vote 1 down vote favorite Can someone explain, in their own words, what Double Bit Error Detection is and how to derive it? http://electronics.stackexchange.com/questions/71410/single-bit-error-correction-double-bit-error-detection An example of corrupted data and how to detect the double bit would be appreciated. I can do Single Bit Error Correction using parity bits as well as correct the flipped bit. Now when I reach Double Bit Error Detection I understand there is an extra DED bit, which is somehow related to the even or odd parity of the bit sequence. However, I am lost. What I read: http://en.wikipedia.org/wiki/Error_detection_and_correction Video on Hamming Code: http://www.youtube.com/watch?v=JAMLuxdHH8o error-correction parity share|improve this question asked Jun 2 '13 at 20:49 Mike John 117126 Do you understand Hamming distance en.wikipedia.org/wiki/Hamming_distance - it might be worth reading if you don't. Basically in error detection/correction algorithms you add "redundant" bits to your data so that data+redundancy has a hamming distance of at least 4 - this allows one error to make the D+R correctable AND two errors make D+R detectable. 3 errors means you think you can correct but erroneously correct it to a wrong number. Does this make any sense? –Andy aka Jun 2 '13 at 21:47 That much I
(check bits), and the difference between the calculated and actual error correction bits is the position of the bit that's wrong. Very nice, eh? It's called a Hamming Code. Error correction codes are a way to represent a set of symbols so that if any 1 bit of http://burtleburtle.net/bob/math/errorcor.html the representation is accidentally flipped, you can still tell which symbol it was. For example, you can represent two symbols x and y in 3 bits with the values x=111 and y=000. If you flip any one of the bits of these values, you can still tell which symbol was intended. If more than 1 bit changes, you can't tell, and you probably get the wrong answer. So it goes; 1-bit error correction codes can only correct 1-bit changes. If b bits error correction are used to represent the symbols, then each symbol will own 1+b values: the value representing the symbol, and the values differing from it by 1 bit. In the 3-bit example above, y owned 1+3 values: 000, 001, 010, and 100. Representing n symbols in b bits will consume n*(1+b) values. If there is a 1-bit error correction code of b bits for n symbols, then n*(1+b) <= 2b. An x-bit error correction code requires that n*( (b choose 0) + (b bit error correction choose 1) + ... + (b choose x) ) <= 2b. See the Tables of Lexicodes for x-bit codes. Suppose you want a 1-bit error correction code for 211 symbols. Since (14+1)*211>214 but (15+1)*211=215, the code must have at least 15 bits. Such a code would be optimal, every 15-bit arrangement would be owned by one of the 11-bit symbols. OK. Now what exactly is the code? Can we name the symbols 0..211-1 and confine the error correction to just four bits? Yes. Can we calculate four error correction bits easily? Yes. Can we recover easily when an error occurs? Yes. Here's how. 11 10 9 8 7 6 5 4 3 2 1 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 In the diagram above, we have our 15 bits. Bits 8, 4, 2, 1 (the powers of 2) are the error correction bits (check bits). The other 11 bits are data bits, and store the name of the symbol (an 11 bit value). 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 8 1 0 0 0 9 1 0 0 1 101 0 1 0 111 0 1 1 121 1 0 0 131 1 0 1 141 1 1 0 151 1 1 1 To the right i