ERROR DETECTION&ERROR CORRECTION1MSRIT INFORMATION SCIENCE
AMAKA-> ANKITA (1MS07IS133)M-> MAYANK (1MS07IS047)A-> ANSHUJ (1MS07IS011)K-> KRISH (1MS07IS038)2MSRIT INFORMATION SCIENCE
INTRODUCTION TO ERRORREDUNDANCYCODINGLINEAR BLOCK CODING
HAMMING CODE
CYCLIC REDUNDANCY CHECK(CRC)
IMPLEMENTATION OF HAMMING CODETABLE OF CONTENTS:3MSRIT INFORMATION SCIENCE
What is an error???Unpredictable change of bits from 1->0 or 0->1.TypesSingle bit error
Burst error(Multiple)
Redundancy: Correction or detection of errors. INTRODUCTION 4MSRIT INFORMATION SCIENCE
Forward error correction: Method of Guessing the actual message using the redundant bits.Retransmission: Repeated sending of message until error free.Modulo Arithmetic:Modulo 2- Remainder after division can be either 0 or1.
Modulo 3- Remainder after division can be either 0,1 or 2....Modulo n- Remainder after division can be either 0,1,2….n-1.5MSRIT INFORMATION SCIENCE
Adding :       0+0=0   0+1=1   1+0=1  1+1=0Subt:           0-0=0   0-1=1   1-0=1   1-1=0XOR operation:	    1  0  1  1  01  1  1  0  0      0  1  0   1  06MSRIT INFORMATION SCIENCE
CODING: Redundancy is achieved through coding.BLOCK 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 codewords7MSRIT INFORMATION SCIENCE
ERROR DETECTIONIf resulting codeword is invalid.
If multiple errors in the codeword result in valid codeword.ERROR CORRECTIONMore difficult.
Need more number of redundant bits than for detection.
Involves error detection as well as finding the position(s) where error has occurred.8MSRIT INFORMATION SCIENCE
Generation of codewords for each dataword:   C(7,4)      n ,kCodeword is generated by the generator which appends 3 redundant bits at the end of the dataword.Ro =a2 + a1 + a0    Modulo-2R1= a3 + a2 + a1      Modulo-2R2= a1+ a0 + a3     Modulo-2HAMMING CODE GENERATION9MSRIT INFORMATION SCIENCE
A CRC CODE WITH C(7,4)10MSRIT INFORMATION SCIENCE
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-2If the syndrome i.e s2s1s0 is 000 then data is error free…or undetected.Otherwise, received codeword has an error(s).11MSRIT INFORMATION SCIENCE
MAGIC TABLEDepending upon the value of syndrome we can find the position of occurrence of error and then the bit position where error has occurred is flipped.12MSRIT INFORMATION SCIENCE
CODEWORD NOTATION ON SENDER’S AND RECEIVER’S SIDEa3   a2   a1   a0  R2  R1  R0b3b2 b1  b0  q2  q1   q0 13MSRIT INFORMATION SCIENCE
Number of bit change occurring between two codewords.		0 1 1 1 0 1 01 0 1 1 1  1 1        0 1 0 0 1 0 1The total number of ones is equal to the number of bit changes between two codewords. HAMMING DISTANCE14MSRIT INFORMATION SCIENCE

GROUP03_AMAK:ERROR DETECTION AND CORRECTION PPT

  • 1.
  • 2.
    AMAKA-> ANKITA (1MS07IS133)M->MAYANK (1MS07IS047)A-> ANSHUJ (1MS07IS011)K-> KRISH (1MS07IS038)2MSRIT INFORMATION SCIENCE
  • 3.
  • 4.
  • 5.
  • 6.
    IMPLEMENTATION OF HAMMINGCODETABLE OF CONTENTS:3MSRIT INFORMATION SCIENCE
  • 7.
    What is anerror???Unpredictable change of bits from 1->0 or 0->1.TypesSingle bit error
  • 8.
  • 9.
    Redundancy: Correction ordetection of errors. INTRODUCTION 4MSRIT INFORMATION SCIENCE
  • 10.
    Forward error correction:Method of Guessing the actual message using the redundant bits.Retransmission: Repeated sending of message until error free.Modulo Arithmetic:Modulo 2- Remainder after division can be either 0 or1.
  • 11.
    Modulo 3- Remainderafter division can be either 0,1 or 2....Modulo n- Remainder after division can be either 0,1,2….n-1.5MSRIT INFORMATION SCIENCE
  • 12.
    Adding : 0+0=0 0+1=1 1+0=1 1+1=0Subt: 0-0=0 0-1=1 1-0=1 1-1=0XOR operation: 1 0 1 1 01 1 1 0 0 0 1 0 1 06MSRIT INFORMATION SCIENCE
  • 13.
    CODING: Redundancy isachieved through coding.BLOCK CODING: Message divided into blocks.
  • 14.
    k bit datawords
  • 15.
    r redundant bits
  • 16.
    n= k+r, n>k,n bit codeword.
  • 17.
    2k total datawords(equal to number of valid codewords.)
  • 18.
    2n total codewords
  • 19.
    2n -2k invalid codewords7MSRIT INFORMATION SCIENCE
  • 20.
    ERROR DETECTIONIf resultingcodeword is invalid.
  • 21.
    If multiple errorsin the codeword result in valid codeword.ERROR CORRECTIONMore difficult.
  • 22.
    Need more numberof redundant bits than for detection.
  • 23.
    Involves error detectionas well as finding the position(s) where error has occurred.8MSRIT INFORMATION SCIENCE
  • 24.
    Generation of codewordsfor each dataword: C(7,4) n ,kCodeword is generated by the generator which appends 3 redundant bits at the end of the dataword.Ro =a2 + a1 + a0 Modulo-2R1= a3 + a2 + a1 Modulo-2R2= a1+ a0 + a3 Modulo-2HAMMING CODE GENERATION9MSRIT INFORMATION SCIENCE
  • 25.
    A CRC CODEWITH C(7,4)10MSRIT INFORMATION SCIENCE
  • 26.
    checker on thereceiver 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-2If the syndrome i.e s2s1s0 is 000 then data is error free…or undetected.Otherwise, received codeword has an error(s).11MSRIT INFORMATION SCIENCE
  • 27.
    MAGIC TABLEDepending uponthe value of syndrome we can find the position of occurrence of error and then the bit position where error has occurred is flipped.12MSRIT INFORMATION SCIENCE
  • 28.
    CODEWORD NOTATION ONSENDER’S AND RECEIVER’S SIDEa3 a2 a1 a0 R2 R1 R0b3b2 b1 b0 q2 q1 q0 13MSRIT INFORMATION SCIENCE
  • 29.
    Number of bitchange occurring between two codewords. 0 1 1 1 0 1 01 0 1 1 1 1 1 0 1 0 0 1 0 1The total number of ones is equal to the number of bit changes between two codewords. HAMMING DISTANCE14MSRIT INFORMATION SCIENCE
  • 30.
    Smallest Hamming Distancebetween all sets of codewords.Ex- d(0000000,0001101) = 3d(0001100,0111001) = 4d(0110100,0111001) =3d(11111111,0000000) =7…. & so on..Dmin= 3 for the above set of codewords.MINIMUM HAMMING DISTANCE15MSRIT INFORMATION SCIENCE
  • 31.
    Suppose ‘s’ errorsare 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 the dmin should be 2t+1. in the above example, it can correct upto only 1 error.16MSRIT INFORMATION SCIENCE
  • 32.
    Linear block code?Linearblock code with an extra property: code word is cyclically rotated that generates another codeword.1010110 is a codeword on rotating 0101101 which is another codeword.CYCLIC CODE17MSRIT INFORMATION SCIENCE
  • 33.
    Type of linearblock 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 CHECK(CRC)18MSRIT INFORMATION SCIENCE
  • 34.
    CRC ENCODER ANDDECODER19MSRIT INFORMATION SCIENCE
  • 35.
    Encoder on sender’sside generates codeword.Dataword size is k bits.Desired codeword is n bits.Augment dataword by appending n-k 0’s.Divisor (predefined) of size n-k+1, divides augmented dataword in generator.Obtained remainder is appended to dataword. 20MSRIT INFORMATION SCIENCE
  • 36.
    The generated codewordis sent to receiver via some transmission medium.Decoder on receiver’s side checks for errors.The checker divides the codeword by the same divisor.This generates a remainder which is called a syndrome.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.21MSRIT INFORMATION SCIENCE
  • 37.
    Cyclic codescan be represented using polynomials.Special polynomials in which co-efficient can be either 0 or 1.The bit position of dataword indicates power of the polynomial.Ex:- 1 0 0 1 1 0 1 1x7 x6 x5 x4 x3 x2 x1 x0 equivalent polynomial expression x7+x4+x3+x+1.POLYNOMIAL REPRESENTATION22MSRIT INFORMATION SCIENCE
  • 38.
    The given datawordcan be represented in polynomial terms.Multiply the dataword with xn-kto generate augmented dataword.The augmented dataword is divided by the generator polynomial g(x) and the resulting remainder is added to the augmented dataword.Note in division when we subtract we actually perform XOR operation.CODEWORD GENERATION23MSRIT INFORMATION SCIENCE
  • 39.
    The divisor onthe receiving side divides the received 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 been detected.No error correction is possible using CRC.ERROR DETECTION24MSRIT INFORMATION SCIENCE
  • 40.
    Received codeword canbe 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.25MSRIT INFORMATION SCIENCE
  • 41.
    Two Isolated bit errors: e(x)=xi+xj. e(x)=xi(1+xj-i) where i<j. let j-i=t so, e(x)=xi(1+xt)To catch xi the generator should have x0=1.
  • 42.
    To catch errorof 1+xt the generator polynomial should not divide 1+xt for 0
  • 43.
    Odd number oferrorsGenerator polynomial should be a factor of x+1.26MSRIT INFORMATION SCIENCE
  • 44.
    Polynomial should containmore than one term.Polynomial should have the x0 term equal to 1.Polynomial should contain x+1 as a factor.Polynomial should not divide 1+xt for 0<t<n-1.PROPERTIES OF GOOD GENERATOR POLYNOMIAL27MSRIT INFORMATION SCIENCE
  • 45.
    MSRIT INFORMATION SCIENCE28ACKNOWLEDGEMENTWewould like to thank MydhiliMa’m for giving us an opportunity to present this presentation and for the support extended by her.
  • 46.
    We would alsolike to thank Mr. Mohan Kumar our project incharge.MSRIT INFORMATION SCIENCE29QUESTIONS???