# Multi Parity Check Codes

Lectures No. 15 and 16 Dr. Aoife Moloney

School of Electronics and Communications Dublin Institute of Technology

Lectures No. 15 and 16: Multi parity Check Codes

Overview
This lecture will look at the following: • Multi parity check codes • Examples • Sample question

DT008/2 Digital Communications Engaineering II

Slide:

1

Lectures No. 15 and 16: Multi parity Check Codes

Introduction
• Single error parity check codes can detect a single error in a codeword but cannot locate and correct it. • If multiple parity bits are used it is possible to locate and hence to correct a single errored bit.

DT008/2 Digital Communications Engaineering II

Slide:

2

Lectures No. 15 and 16: Multi parity Check Codes

Multi-Parity Check Codes
• Consider the 15 bit codeword shown below, where there are 11 data bits (d1 to d11) and 4 parity bits (p1 to p4) located as shown:
d1 d2 d3 d4 d5 d6 d7 p1 d8 d9 d10 p2 d11 p3 p4

• In this table: – p1 is parity control bit for d1, d2, d3, d4, d5, d6, d7
DT008/2 Digital Communications Engaineering II Slide:

3

Lectures No. 15 and 16: Multi parity Check Codes

and itself p1. – p2 is parity control bit for d1, d2, d3, d4, d8, d9, d10 and itself p2. – p3 is parity control bit for d1, d2, d5 ,d6, d8, d9, d11 and itself p3. – p4 is parity control bit for d1, d3, d5, d7, d8, d10, d11 and itself p4. • This is shown in the table below where the parity bits and their protected bits are highlighted.

DT008/2 Digital Communications Engaineering II

Slide:

4

Lectures No. 15 and 16: Multi parity Check Codes

d1 d1 d1 d1 0

d2 d2 d2 d2 1

d3 d3 d3 d3 2

d4 d4 d4 d4 3

d5 d5 d5 d5 4

d6 d6 d6 d6 5

d7 d7 d7 d7 6

p1 p1 p1 p1 7

d8 d8 d8 d8 8

d9 d9 d9 d9 9

d10 d10 d10 d10 10

p2 p2 p2 p2 11

d11 d11 d11 d11 12

p3 p3 p3 p3 13

p4 p4 p4 p4 14

• The parity bits are locations 7, 11, 13 and 14. • When the codeword is received each parity bit can be evaluated and it is determined: – If it is correct it is assigned a value of 1
DT008/2 Digital Communications Engaineering II Slide:

5

Lectures No. 15 and 16: Multi parity Check Codes

– If it signals an error it is given a value of 0 • The parity bits are then used to produce a binary number p1p2p3p4. • The value of this number indicates the location of the error, by reference to the bottom row of the table. • This is not a systematic code - the data word is visible, but is mixed in with the error control bits.

DT008/2 Digital Communications Engaineering II

Slide:

6

Lectures No. 15 and 16: Multi parity Check Codes

Example
• Say that bit d6 was errored. In this case p1 and p3 will detect the error and will be each given the value 0. Parity bits p2 and p4 are not checking d6, and therefore will not detect the error and will have a value 1. • The binary number produced is p1 p2 p3 p4 = 0101. This is binary number 5, giving that the error is in location 5, i.e. the error is in data bit d6.

DT008/2 Digital Communications Engaineering II

Slide:

7

Lectures No. 15 and 16: Multi parity Check Codes

Example
• Say parity bit p2 was errored in transmission. This will be detected and p2 given the value 0. All other parity bits will have the value 1. • This gives p1p2p3p4 = 1011. This is binary for number 11 pointing to location 11 and hence to p2. • This error can be ignored, there is no need to repair it as the parity bits are all discarded when the parity checking is done.
DT008/2 Digital Communications Engaineering II Slide:

8

Lectures No. 15 and 16: Multi parity Check Codes

Example
• Say that bits d6 and d8 are both errored. In this case: – p1 will detect the error in d6 - p1=0 – p2 will detect the error in d8 - p2=0 – p3 will detect no error as there are two errors which gives 0 for parity - p3=1 – p4 will detect the error in d8 - p4=0 • The binary number produced is p1p2p3p4 = 0010. This indicates an error in location 2, i.e. d3 which it will change. The recovered data now has 3 errors d3, d6 and
DT008/2 Digital Communications Engaineering II Slide:

9

Lectures No. 15 and 16: Multi parity Check Codes

d8. • This technique can repair one error. If there is more than one error in the received codeword this technique can detect that there is an error, and it attempts to repair it, but in doing so it only adds more errors. • This technique is useful only if the probability of two or more errors in a received codeword is very small.

DT008/2 Digital Communications Engaineering II

Slide:

10

Lectures No. 15 and 16: Multi parity Check Codes

Multi Parity Check Codes
• Multi parity checking can be extended as shown below:

No of data bits (d = t - p) 1 4 11 26 57

No of parity bits (p) 2 3 4 5 6

Total no of bits (t = 2p - 1) 3 7 15 31 63

Parity bit locations 1, 2 3, 5, 6 7, 11, 13, 14 15, 23 ,27, 29, 30 31, 47, 55, 59, 61, 62

Efficiency (d/t*100%) 33% 57% 73% 84% 91%

DT008/2 Digital Communications Engaineering II

Slide:

11

Lectures No. 15 and 16: Multi parity Check Codes

• As can be seen, the eﬃciency of the technique is high when long code words are used. However, when the codewords are long the probability of 2 errors in the word increases and the protection disappears.

DT008/2 Digital Communications Engaineering II

Slide:

12

Lectures No. 15 and 16: Multi parity Check Codes

Sample Question
• What is meant by the term ‘Channel Coding’ ? • Append a single parity check bit to the following data for the case of (i) even parity and (ii) odd parity: – 1010 – 11001101 – 10001110 • The codewords shown below have 11 data bits and 4 check bits (shown in bold). Even parity was used when assignDT008/2 Digital Communications Engaineering II Slide:

13

Lectures No. 15 and 16: Multi parity Check Codes

ing values to the check bits. Locate the error in each codeword. – 101110011011111 – 101010011001011

DT008/2 Digital Communications Engaineering II

Slide:

14

Lectures No. 15 and 16: Multi parity Check Codes

Conclusion
This lecture has looked at the following: • Multi parity check codes • Examples • Sample question

DT008/2 Digital Communications Engaineering II

Slide:

15