Sei sulla pagina 1di 3

Error Detection Techniques

Parity Bits

Parity bits are added with the information bits to make the number of 1s odd or even. Parity bits can
detect single errors and odd number of errors. Parity bits incapable of detecting even number of errors.

Example 1
000110 110011
The partity bit in the above case is added to make the number

 of 1s
 even. If 2 or 4 or 6 bits in error,
the parity bit will not be able to detect. So there are 62 + 64 + 66 possible error patterns which the
parity bit is not able to detect.

Example 2
Consider the parity bit scheme as follows. The information contains 8 bits in each and two parity
bits are added, one for the first 4 bits and second for the next 4 bits. Characterize its error detection
capability.
Solution:
0011011101. If there are even number of errrors in thefirst five bits or second five bits separately, the
parity bits cannot detect them. So there are ( 52 + 54 ) 2 patterns which the above scheme cannot
detect.

Checksum

Given information stream is divided into group of L bits. 0001 1110 1010 0111 0110
Transmitter:
1. Step 1: Add all the four integers.
0011 + 1110 + 1010 + 0111 + 0110 = 3 + 14 + 10 + 7 + 6 = 40
40 mod 24 1 = 40 mod 15 = 10
Checksum = 15 10 = 5 = 0101
Checksum

z}| {
2. Step 2: Transmitted Codeword: 0001 1110 1010 0111 0110 0101
3. Step 3: Receiver: Sum all the information bits (4 in a group).
Checksum

z }|{
0001 + 1110 + 1010 + 0111 + 0110 0101 = 1111
Should be all 1s in error free case. If the sum is not equal to all 1s, the receiver detects that there
is an error.
Alternatively, add all the information bits:
0001 + 1110 + 1010 + 0111 + 0110 = 1010, here you should perform modulo 15 addition i.e. your answer
should be only in 4 bits.
Take 1s complement = 0101

Cyclic Redundancy Check-CRC

In CRC, given k information bits, n information bits are generated with (n-k) CRC bits.
Generator polynomial: g(x) = xnk + + 1. For example if n=7, k=4, g(x) = x3 + x2 + 1
or g(x) = x3 + x + 1. However, xnk , 1 terms are compulsory. Intermediate terms have binary
coefficients, i.e. they may or may not be present.
Information polynomial: Highest power xk1 .
First multiply i(x) with xnk xnk i(x)
Then divide xnk i(x) by g(x).
r(x).

xnk i(x)
g(x) .

In this longhand division take the remainder polynomial

Transmitted codeword: b(x) = xnk i(x) + r(x)


r

(x)
In the receiver, it will check the received polynomial by dividing it with g(x) i.e. bg(x)
. The
remainder should be zero if there is no error, i.e. if b(x) = br (x), the remainder is zero. If the
remainder is non zero, it means that b(x) 6= br (x), i.e. it indicates that some error occurred in the
transmission.

Error Detection Capability


Single Error : g(x) should contain at least two terms.
o
n
n1
1+x 1+x2 1+x3
, g(x) , g(x) , , 1+x
should give non zero remainder, where n is the
Double Errors: g(x)
g(x)
length of the codeword.
Odd number of errors: g(x) should contain a factor (1 + x) i.e.

g(x)
1+x

should give zero remainder.

Burst errors of length L (n k) can be detected.

Example 1
Consider the information sequence:1100 and generator polynomial g(x) = x3 + x + 1. Find the transmitted codeword.
Solution:
For the given information bits the value of k=4. The highest power of g(x) will convey the number of
CRC bits (n-k). Therefore, we have k=4 information bits, n-k=3 CRC bits, total codeword length is 7.
This is (n,k)=(7,4) code.
First multiply i(x) with xnk i.e. x3 (x3 + x2 ) = x6 + x5 .
Now divide by g(x):

x6 +x5
x3 +x+1

The remainder is: r(x) = x.


Transmitted Codeword:b(x) = xnk i(x) + r(x) = x6 + x5 + x i.e. b = 1100010, the first 4 bits
are the information bits and the last three bits are CRC bits. The codeword should contain the
information bits intact at the beginning.
If you check

b(x)
g(x) ,

it will give remainder zero at the transmitter.

b(x) or b is the tranmsmitted codeword. Say received code is br or br (x).


In the receiver, it will check

br (x)
g(x)

and remainder should be zero i.e. br (x) = b(x), no error in the

transmission . If there is an error in the transmission, br (x) 6= b(x), the remainder of


not be equal to 0.

br (x)
g(x)

will

Example 2
Consider the information bits 110110 and g(x) = x3 + x2 + 1. Find the transmitted codeword.
Solution
No of information bits k=6. n-k=highest power of g(x)=3. i(x) = x5 + x4 + x2 + x
xnk i(x) = x3 (x5 + x4 + x2 + x) = x8 + x7 + x5 + x4
xnk i(x)
x8 + x7 + x5 + x4
=
: Remainder : r(x) = x2 + x + 1
g(x)
x3 + x2 + 1
Therefore transmitted codeword b(x) = xnk i(x)+r(x) = x8 +x7 +x5 +x4 +x2 +x+1 or b = 110110111,
first 6 bits information and last three CRC bits.
b(x)
In the receiver g(x)
should have remainder 0. Else there is an error occurred.

Example 3
Consider the information bits 110110 and g(x) = x2 + 1. Find the codeword. Can the generator polynomial detect single errors? double errors? Give an example for the detection failure pattern and prove
its incapability to detect.
Solution:
xnk i(x) = x2 (x5 + x4 + x2 + x) = x7 + x6 + x4 + x3 .
7
6
4
xnk i(x)
+x3
= x +xx2+x
Remainder r(x) = 0
g(x)
+1
Transmitted Codeword: b(x) = xnk i(x) + r(x) = x7 + x6 + x4 + x3 , b = 11011000.

Single Errors
All single errors can be detected since g(x) contains two terms. The condition satisfied.
Double Errors
n
o
1+xn1
1+x 1+x2 1+x3
should give non zero remainder, where n is the length of the codeword.
g(x) , g(x) , g(x) , , g(x)
2

1+x
But the above condition fails since 1+x
g(x) = 1+x2 gives remainder zero. Therefore there are some double
errors (not all double errors), that cannot be detected.

To prove this, we have to take one such double error pattern and show that the error is not detected.
Consider the errors as:
11001100 . Two errors at the underlined positions.
|11011000
{z }
| {z }
Transmitted Code b

Received Code br

Now to detect the error, receiver should divide received code with the generator polynomial g(x)
r
(x)
should non zero remainder so that receiver can detect the
and should get non zero remainder i.e. bg(x)
error.
r
7
6
3
(x)
+x2 )
But, bg(x)
= (x +xx2+x
gives remainder zero. (check!!!)
+1
That is, the double errors are not detected since the condition for detecting all the double errors are
not satisfied.
m
)
In essence, to choose the double error, let us say (1+x
g(x) g(x) gives remainder zero, then the undetectable error patterns for various values of m is shown below.

m = 1 b1 b2 b3 b4 b5 b6 b7 b8

m = 2 b1 b2 b3 b4 b5 b6 b7 b8
Spacing between error bits = m 1
m = 3 b1 b2 b3 b4 b5 b6 b7 b8

m = 4 b1 b2 b3 b4 b5 b6 b7 b8
Depending on the value of m in (1 + xm ), you have to choose the double error pattern with space
m-1 and prove that the receiver fails to detect it. The above pattern is a sample. Only spacing between
the error bits is important not its location. For example in m = 2, it means that any double errors like
at the positions at b2 , b4 or b6 , b8 and so on, cannot be detected.
3

Potrebbero piacerti anche