error detection (1)(4)
Post on 30-May-2018
219 Views
Preview:
TRANSCRIPT
-
8/14/2019 Error Detection (1)(4)
1/29
MSRIT INFORMATION SCIENCE 1
ERROR DETECTIONERROR DETECTION&&
ERROR CORRECTIONERROR CORRECTION
-
8/14/2019 Error Detection (1)(4)
2/29
MSRIT INFORMATION SCIENCE 2
AMAKAMAK
A-> ANKITA (1MS07IS133)
M-> MAYANK (1MS07IS047)
A-> ANSHUJ (1MS07IS011)
K-> KRISH (1MS07IS038)
-
8/14/2019 Error Detection (1)(4)
3/29
MSRIT INFORMATION SCIENCE 3
INTRODUCTION TO ERROR
REDUNDANCY
CODING
LINEAR BLOCK CODING
HAMMING CODE
CYCLIC REDUNDANCY CHECK(CRC)
IMPLEMENTATION OF HAMMING CODE
TABLE OF CONTENTS:TABLE OF CONTENTS:
-
8/14/2019 Error Detection (1)(4)
4/29
MSRIT INFORMATION SCIENCE 4
What is an error???Unpredictable change of bits from 1->0 or 0->1.
TypesoSingle bit error
oBurst error(Multiple)
o
Redundancy: Correction or detection of errors.
INTRODUCTIONINTRODUCTION
-
8/14/2019 Error Detection (1)(4)
5/29
MSRIT INFORMATION SCIENCE 5
Forward error correction: Method of Guessing theactual message using the redundant bits.
Retransmission: Repeated sending of message untilerror free.
Modulo Arithmetic: Modulo 2- Remainder after division can be either 0or1.
Modulo 3- Remainder after division can be either0,1 or 2.
. . .
Modulo n- Remainder after division can be either0,1,2.n-1.
-
8/14/2019 Error Detection (1)(4)
6/29
MSRIT INFORMATION SCIENCE 6
Adding : 0+0=0 0+1=1 1+0=1 1+1=0 Subt: 0-0=0 0-1=1 1-0=1 1-1=0
XOR operation: 1 0 1 1 0 1 1 1 0 0 0 1 0 1 0
-
8/14/2019 Error Detection (1)(4)
7/29MSRIT INFORMATION SCIENCE 7
CODING: Redundancy is achieved through
coding.
qBLOCK CODING: Message divided into blocks.
k bit datawords
r redundant bits n= k+r, n>k,n bit codeword.
2k total datawords(equal to number of valid
codewords.) 2n total codewords
2n -2k invalid codewords
-
8/14/2019 Error Detection (1)(4)
8/29MSRIT INFORMATION SCIENCE 8
ERROR DETECTION
oIf resulting codeword is invalid.
oIf multiple errors in the codeword result invalid codeword.
ERROR CORRECTIONoMore difficult.
oNeed more number of redundant bits than for
detection.oInvolves error detection as well as finding the
position(s) where error has occurred.
-
8/14/2019 Error Detection (1)(4)
9/29MSRIT INFORMATION SCIENCE 9
Generation of codewords for each dataword: C(7,4)
n ,k
Codeword is generated by the generator whichappends 3 redundant bits at the end of the
dataword.Ro =a2 + a1 + a0 Modulo-2R1= a3 + a2 + a1 Modulo-2
R2= a
1+ a
0+ a
3Modulo-2
HAMMING CODE GENERATIONHAMMING CODE GENERATION
-
8/14/2019 Error Detection (1)(4)
10/29MSRIT INFORMATION SCIENCE 10
DATAWORD
CODEWORD
DATAWORD
CODEWORD
0000 0000000 1000 1000110
0001 0001101 1001 1001011
0010 0010111 1010 10100010011 0011010 1011 1011100
0100 0100011 1100 1100101
0101 0101110 1101 1101000
0110 0110100 1110 11100100111 0111001 1111 1111111
A CRC CODE WITH C(7,4)A CRC CODE WITH C(7,4)
-
8/14/2019 Error Detection (1)(4)
11/29MSRIT INFORMATION SCIENCE 11
checker on the receiver side will generate a
3bit syndrome by the formulae given below:s0 = b2 + b1 + b0 + q0 modulo-2
s1 = b3 + b2 + b1 + q1 modulo-2
s2 = b1 + b0 + b3 + q2 modulo-2
If the syndrome i.e s2s1s0 is 000 then data is
error freeor undetected.Otherwise, received codeword has an error(s).
-
8/14/2019 Error Detection (1)(4)
12/29MSRIT INFORMATION SCIENCE 12
MAGIC TABLE
Depending upon the value of syndrome we can find theposition of occurrence of error and then the bitposition where error has occurred is flipped.
SYNDROME
000 001 010 011 100 101 110 111ERROR None q0 q1 b2 q2 b0 b3 b1
-
8/14/2019 Error Detection (1)(4)
13/29MSRIT INFORMATION SCIENCE 13
CODEWORD NOTATION ONCODEWORD NOTATION ON
SENDERS AND RECEIVERS SIDESENDERS AND RECEIVERS SIDE
a3 a2 a1 a0 R2 R1 R0
b3 b2 b1 b0 q2 q1 q0
RECEIVEDCODEWORD
0 1 0 1 0 0 0
CODEWORD SENT
1 1 0 1 0 0 0
-
8/14/2019 Error Detection (1)(4)
14/29MSRIT INFORMATION SCIENCE 14
Number of bit change occurring between twocodewords.
0 1 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 0 1 0 1
The total number of ones is equal to the number of bitchanges between two codewords.
HAMMING DISTANCEHAMMING DISTANCE
-
8/14/2019 Error Detection (1)(4)
15/29MSRIT INFORMATION SCIENCE 15
Smallest Hamming Distance between all sets ofcodewords.
Ex-
d(0000000,0001101) = 3d(0001100,0111001) = 4d(0110100,0111001) =3
d(11111111,0000000) =7. & so on..
Dmin = 3 for the above set of codewords.
MINIMUM HAMMING DISTANCEMINIMUM HAMMING DISTANCE
-
8/14/2019 Error Detection (1)(4)
16/29MSRIT INFORMATION SCIENCE 16
Suppose s errors are to be detected, then dmin
should be s+1.for the example taken, it can detect upto a
maximum of 2 errors.
Suppose t errors are to be corrected, then thedmin should be 2t+1.
in the above example, it can correct upto only 1
error.
-
8/14/2019 Error Detection (1)(4)
17/29MSRIT INFORMATION SCIENCE 17
Linear block code?
Linear block code with an extra property: code
word is cyclically rotated that generatesanother codeword.
1010110 is a codeword on rotating 0101101 which is another codeword.
CYCLIC CODECYCLIC CODE
-
8/14/2019 Error Detection (1)(4)
18/29
MSRIT INFORMATION SCIENCE 18
Type of linear block code which only detects
errors.
Its computation resembles a long division
operation in which the quotient is discarded
and the remainder becomes the result.
CYCLIC REDUNDANCY CHECKCYCLIC REDUNDANCY CHECK
(CRC)(CRC)
-
8/14/2019 Error Detection (1)(4)
19/29
MSRIT INFORMATION SCIENCE 19
CRC ENCODER AND DECODERCRC ENCODER AND DECODER
-
8/14/2019 Error Detection (1)(4)
20/29
MSRIT INFORMATION SCIENCE 20
Encoder on senders side generates codeword.
Dataword size is k bits.
Desired codeword is n bits.
Augment dataword by appending n-k 0s.
Divisor (predefined) of size n-k+1, dividesaugmented dataword in generator.
Obtained remainder is appended to dataword.
-
8/14/2019 Error Detection (1)(4)
21/29
MSRIT INFORMATION SCIENCE 21
The generated codeword is sent to receiver via
some transmission medium.
Decoder on receivers side checks for errors. The checker divides the codeword by the same
divisor.
This generates a remainder which is called asyndrome.
If the syndrome is 0 then there is no error or
the error is undetected. If syndrome is non zero, error has been
detected and data is discarded.
-
8/14/2019 Error Detection (1)(4)
22/29
-
8/14/2019 Error Detection (1)(4)
23/29
MSRIT INFORMATION SCIENCE 23
The given dataword can be represented inpolynomial terms.
Multiply the dataword with xn-k to generateaugmented dataword.
The augmented dataword is divided by the
generator polynomial g(x) and the resultingremainder is added to the augmented dataword.
Note in division when we subtract we actually
perform XOR operation.
CODEWORD GENERATIONCODEWORD GENERATION
-
8/14/2019 Error Detection (1)(4)
24/29
MSRIT INFORMATION SCIENCE 24
The divisor on the receiving side divides thereceived code word and generates a
remainder.
Remainder is also called as a syndrome. If the syndrome generated is 0 then there is no
error in transmission or undetected error.
Non zero syndrome means that error has beendetected.
No error correction is possible using CRC.
ERROR DETECTIONERROR DETECTION
-
8/14/2019 Error Detection (1)(4)
25/29
MSRIT INFORMATION SCIENCE 25
Received codeword can be represented as Received codeword=c(x)+e(x) where c(x) is
original codeword e(x) is the error. The error is detected if
received codeword=c(x)+e(x) is not divisible.
g(x) If e(x) is divisible by g(x) then error goes
undetected.Single bit error:
e(x)=xi.
xi should not be divisible by g(x). x0 term should be 1 so that we can catch
the error.
-
8/14/2019 Error Detection (1)(4)
26/29
MSRIT INFORMATION SCIENCE 26
Two Isolated bit errors: e(x)=xi+xj.
e(x)=xi(1+xj-i ) where i
-
8/14/2019 Error Detection (1)(4)
27/29
MSRIT INFORMATION SCIENCE 27
Polynomial should contain more than oneterm.
Polynomial should have the x0 term equal to1.
Polynomial should contain x+1 as a factor. Polynomial should not divide 1+xt for
0
-
8/14/2019 Error Detection (1)(4)
28/29
-
8/14/2019 Error Detection (1)(4)
29/29
QUESTIONSQUESTIONS
???
top related