Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Product Codes An extension of the concept of parity to a large number of words of data 0110…10 1001…101 0101…110 1000…100 0011…000 1101…001 1001…101.

Similar presentations


Presentation on theme: "1 Product Codes An extension of the concept of parity to a large number of words of data 0110…10 1001…101 0101…110 1000…100 0011…000 1101…001 1001…101."— Presentation transcript:

1 1 Product Codes An extension of the concept of parity to a large number of words of data 0110…10 1001…101 0101…110 1000…100 0011…000 1101…001 1001…101 …………………… …………………… 1001…10… 0011…011 Data block Column parity bit Row parity bit ----advantage ---- disadvantages

2 2 Number the group of bits starting with position 1 (not 0, as we usually do) and place the parity bits in logical positions 1, 2, 4, 8, etc. (i.e. integer powers of 2). The data bits take up the remaining positions. For example, suppose we were encoding a 7-bit ASCII character. Our bits would be: bit position:1 2 3 4 5 6 7 8 9 10 11 p p (p indicates a parity bit; the remaining positions are data bits) Each parity bit checks for parity on a group of bits (including itself). The groups are determined in the following manner: Each bit is checked by all parity bits such that the sum of the parity bits' position numbers yields the position number of the bit in question. E.g. bit 6 (binary 0110) is checked by bits 4 and 2 since 4 + 2 = 6; bit 7 (binary 0111) is checked by bits 4 and 2 and 1 since 4 + 2 + 1 = 7; etc.) Hamming code method for error correction

3 3 Another way of stating this is that each parity bit x (1, 2, 4, 8, etc.) checks all bits whose binary position representation has a 1 in place value x. Using these criteria, we come up with the following groups for the example of the 7-bit ASCII character: bit 1 checks bit 2 checks bit 4 checksbit 8 checks places: places: bin. dec. bin. dec. 0001 10010 2 0100 4 1000 8 0011 30011 3 0101 5 1001 9 0101 50110 6 0110 6 1010 10 0111 70111 7 0111 7 1011 11 1001 91010 10 1011 11 1011 11

4 4 Suppose that our initial 7-bit character is 0011101. What values should be assigned to the parity bits initially? First, put the parity bits at the proper logical positions, as indicated above. This would give us: value: 0 0 1 1 1 0 1 bit position:1 2 3 4 5 6 7 8 9 10 11 P P Now the groups are checked: Since bits 3, 5, 7, 9, 11 have values 0, 0, 1, 1, 1 bit 1 should be assigned a value of 1 Since bits 3, 6, 7, 10, 11 have values 0, 1, 1, 0, 1 bit 2 should be assigned a value of 1 Since bits 5, 6, 7 have values 0, 1, 1 bit 4 should be assigned a value of 0 Since bits 9, 10, 11 have values 1, 0, 1 bit 8 should be assigned a value of 0 So the initial group of bits stored or transmitted would be: value:1 1 0 0 0 1 1 0 1 0 1 bit position:1 2 3 4 5 6 7 8 9 10 11

5 5 Now suppose that some electronic disturbance causes one bit to be changed (i.e. an error). Let us arbitrarily change bit 5. This gives the new value: value:1 1 0 0 1 1 1 0 1 0 1 bit position:1 2 3 4 5 6 7 8 9 10 11 The error-detection procedure (before the data is used) would also need to check the groups: Since bits 1, 3, 5, 7, 9, 11 have values 1, 0, 1, 1, 1, 1, the parity in this group is odd (incorrect). This means that there is an error in one of these bits. Since bits 2, 3, 6, 7, 10, 11 have values 1, 0, 1, 1, 0, 1, the parity in this group is even (OK). This narrows down the choice of suspect bits to bits 1, 5, or 9, since these are the bits in the first (incorrect) group that are not also in the second (correct) group.

6 6 Since bits 4, 5, 6, 7 have values 0, 1, 1, 1, the parity in this group is odd (incorrect). Of the suspect bits 1, 5, or 9, only 5 is in this group, so this must be the bit in error. Since bits 8, 9, 10, 11 have values 0, 1, 0, 1, the parity in this group is even (OK). This is what we would expect, since bit 5 does not appear in this group. If a computer is using a Hamming code system like this, it does the error checking in a more "mechanical" way. It sets up a "parity check word" which has one bit for each of the groups. It puts a value of 0 in the bit if the group is OK, and a value of 1 in the bit if the parity for the group is incorrect. For the example shown above, this would give a parity check word of: 0 1 0 1 = 5dec

7 7 Hamming Code Parity is taken over various combinations of the bits in a longer data block. the generated check bits are used to form part of the code block. An extension of the concept of parity to a large number of words of data. Parity digitPosition in code word Digit positions checked C0C0 11,3,5,7,9,11,… C1C1 22,3,6,7,10,11,… C3C3 44,5,6,7,12,13,14,15,… C4C4 88,9,10,11,12,13,14,15,… The checking number (in binary) is C n =1 for failure, C n =0 for tally. (C 3 C 2 C 1 C 0 ) gives actual position of error in code word. Denoted as (n,k) where n is total number of bits, k is the number of data bits, (n-k) is number of parity bits.

8 8 Example: A single-error-correction/double-error-detecting hamming code for 16 symbols. C0C0 C1C1 C2C2 (P) 12345678 (1)A00000000 (2)B11010010 (3)C01000101 (4)D10000111 …... (10)J00110011 …… (15)O00001101 (16)P11111111 (yellow column: Extra parity check makes code double error detecting).

9 9

10 10 Cyclic Codes An important subdivision of block codes is easy to decode 1)The sum of any two code words in the code is also a code word. 2)Any cyclic shift of a code word in the code is also a code word. Bose-Chadhuri-Hocquenghem (BCH) Codes These are cyclic block codes and are a generalisation of Hamming codes that can be used for multiple-error correction. Implementation is very complicated. Reed Solomom Codes These are a subclass of BCH codes which have the largest possible code minimum distance. Often refered as nonbinary codes

11 11 Symbol error-correcting property t of R-S code T=(MHD-1)/2 and MHD=(n-k+1) So n=k+2t, t=(n-k)/2 Here n, k, t refer to symbols of more than one binary digit, so the error correction capability will be in terms of groups or bursts of bits of error.

12 12 Convolution code Hagelburger’s code 1234567 Parity check IN OUT The information digits are fed to a shift register and a parity check carried out between the first and fourth positions. The parity digit is then interleaved between successive information digits by means of the switch S.

13 13 Input bit Shift register Check digit Output stream 0 0 0 0 0 0 000 11 0 0 0 0 0 010 0 1 0 11 1 0 0 0 0 010 0 1 0 1 0 00 1 1 0 0 0 000 0 1 0 1 0 0 0 11 0 1 1 0 0 000 0 1 0 1 0 0 0 0 0 00 1 0 1 1 0 010 0 1 0 1 0 0 0 0 0 1 0 11 0 1 0 1 1 010 0 1 0 1 0 0 0 0 0 1 0 1 0 00 1 0 1 0 1 110 0 1 0 1 0 0 0 0 0 1 0 1 0 1 1 00 0 1 0 1 0 100 0 1 0 1 0 0 0 0 0 1 0 1 0 1 1 0 1 Decoding complex Corrects bursts of errors up to 6 digits in length provided there are >19 correct digits between bursts.


Download ppt "1 Product Codes An extension of the concept of parity to a large number of words of data 0110…10 1001…101 0101…110 1000…100 0011…000 1101…001 1001…101."

Similar presentations


Ads by Google