Presentation is loading. Please wait.

Presentation is loading. Please wait.

Error Detecting and Error Correcting Codes

Similar presentations


Presentation on theme: "Error Detecting and Error Correcting Codes"— Presentation transcript:

1 Error Detecting and Error Correcting Codes
By R. W. Hamming

2 What is this about? How to transit bits over a possibly noisy communication channel Noisy communication channel may introduce a variety of errors In transmitting information from one place to another digital machines use codes which are simply sets of symbols to which meaning or values are attached

3 Transmitting Bits noise Message or “error” code word’ word message
encoder channel decoder

4 Applications RAM in pc I/O bus on high performance servers
Serial data transmission

5 Motivation Large scale computing machines in which a large number of operations must be performed without a single error in the end result.

6 Systematic Codes Transmitting equipment handles information in the binary form of sequences of 0’s 1’s As codes in which each code symbol has exactly n binary digits, m digits are associated with the information k digits are used for error detection and correction k=n-m

7 Redundancy As the ratio of the number of binary digits used to the minimum number necessary to convey the same information R = n/m Measure the efficiency of the code for transmission of information

8 Single Error Detecting Codes
Constructing n binary digits code In the first n-1 positions, put n-1 digits of information In the n-th position, place either 0 or 1 so that the entire n positions have an even number of 1’s

9 Example n-1 information digits 100 n-th position 1001 Received code
1000 Error detected

10 Parity Check Determine whether or not the symbol has any single error
Even parity check uses the even number of 1’s to determine the setting of the check position Odd parity check uses odd number of 1’s May check over selected positions only

11 Single Error Correcting Codes
Constructing the code : Assign m as information positions Assign k (=n-m) as check positions Determine the values in the k positions Even parity checks over selected information positions

12 Received coded symbol Apply k-parity checks on a coded symbol Parity check assigns the value observed in its check position, 0 is written Checking Number: The sequence of k 0’s and 1’s written from right to left in a line

13 Check Number Requirements of checking number
Give the position of the any single error, with zero value meaning no error in the symbol Check must describe m+k+1 different things 2k >= m+k+1 2m <= 2n/(n+1)

14 n m Corresponding k 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

15 Parity check positions
Checking number is obtained digit by digit from right to left Check for even parity inorder The checking number gives the position of any error in a code symbol

16 Any position which has a 1 on the right of its binary representation must cause the first check to fail 1 = 1 3 = 11 5 = 101 7 = 111

17 Parity Check Positions
First parity check position must use positions that have a 1 on the extreme right 1,3,5,7,9…… Second : which have 1’s for the second digit from the right of their binary rep 2,3,6,7,10,11,.. Third: 4,5,6,7,12,….

18 Choice of the check positions 1,2,4,8..
Advantage of making the setting of the check positions independent of each other

19 Check Number Check Positions Positions Checked 1 2 3 4 . 8
1,3,5,7,9,11,13,15,17,…. 2,3,6,7,10,11,14,15,18,… 4,5,6,7,12,13,14,15,20,… 8,9,10,11,12,13,14,15,24,… WORK out the example of constructing the code on the board

20 Decimal Value of Symbol
1 2 3 4 5 6 7 Decimal Value of Symbol 8 9 10 11 12 13 14 15 Work out the example of error detection and correction on the board

21 Single Error Correcting + Double Error Detecting Codes
Start with a single error correcting code Add one more position for checking all the previous positions, using an even parity check

22 Cases No error : All parity checks are satisfied
Single error : The last parity check fails in all situations. The original checking number gives the position of the error Two errors : Last parity check is satisfied, and the checking number indicates some kind of error

23 1 2 3 4 5 6 7 8

24 Geometrical Model Symbols of the code with vertices of a unit n-dimensional cube Distance : A single error in a code point changes one coordinate, two errors, two coordinates, and in general d errors result in a difference in d coordinates

25 Distance D(x,y), distance between two points x and y as the number of coordinates for which x and y are different Least number of edges which must be traversed in going from x and y

26 000 010 001 110 111 101 100 011

27 Single Error Detecting Codes
Packing the maximum number of points in a unit n-dimensional cube such that no two points are closer than 2 units from each other If the packing is optimal, then each of the two sub-cubes has half the points

28 Single Error Correcting Codes
In Codes we considered A distinction was made between information and check positions In Geometrical model No real distinction between the various coordinates

29 Systematic Codes Symbol lengths are all equal
The positions checked are independent of the information contained in the symbol The checks are independent of each other Use parity checks

30 Single Error Correcting + Double Error Detecting Codes
To prove the codes constructed are of minimum redundancy

31 Conclusions Construction of systematic codes Single error detection
Single error correction Single error correction and double error detection


Download ppt "Error Detecting and Error Correcting Codes"

Similar presentations


Ads by Google