Presentation is loading. Please wait.

Presentation is loading. Please wait.

Similar presentations


Presentation on theme: ""— Presentation transcript:

1 http://faculty.chemeketa.edu/ascholer/cs160/Files/ecGrid.html

2 Error Detection and Correction Fixing 0101X011

3 Computer Errors RAM isn't perfect

4 Computer Errors Networks aren't either

5 Computer Errors How the heck do you read 1s and 0's off this?

6 A message 4 bit message: 1010

7 A message 4 bit message: An errror: 1010 1110

8 Trick 1 : Repetition To avoid misunderstanding, repeat yourself… 1010 1010 1010 Copy 1 Copy 2 Copy 3

9 Trick 1 : Repetition An error: 1010 1110 1010 Copy 1 Copy 2 Copy 3

10 Trick 1 : Repetition Most common message wins: 1010 1110 1010 Copy 1 Copy 2 Copy 3

11 Trick 1 : Repetition What if every message is wrong: 0010 1110 1011 Copy 1 Copy 2 Copy 3

12 Trick 1 : Repetition Most common bit wins: 0010 1110 1011 Copy 1 Copy 2 Copy 3 1010Corrected

13 Trick 1 : Repetition More errors: 0000 1110 0011 Copy 1 Copy 2 Copy 3 0010"Corrected"

14 Trick 1 : Repetition Best 3 out of 5? 0000 1110 0011 1111 1000 Copy 1 Copy 2 Copy 3 Copy 4 Copy 5 1010Corrected

15 Overhead Message size : 4 bits Including repetition : 12 bits 1010 1010 1010

16 Overhead Message size : 4 bits Including repetition : 12 bits 200% overhead 10Mb download is now 30Mb! 1010 1010 1010

17 Trick 2 : Redundancy Redundancy : more information than strictly required Common linguistic trick: He took his seat She took her seat They took their seats

18 Trick 2 : Redundancy Redundancy : more information than strictly required Common linguistic trick: He took his seat She took her seat They took their seats

19 Trick 2 : Redundancy Repetion is redundancy – Can we be redundant more efficently?

20 Hamming Distance Hamming Distance : number of different bits 1010 0010, 1110, 1000, 1011 0110, 0000, 0011, 1100, 1111, 1001 1101, 0001, 0111, 0100 0101 Distance 0 1 2 3 4

21 Normal Binary 4 bits : 16 possible values: 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

22 Normal Binary Distance of 1 between values… any error will look like new value 1 bit errors for 1010 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

23 Hamming Code Add extra bits to "space out" messages 4 bit message with 3 error correction bits: MessageCoded Message 0000  0001  0010  0011  0000000 0001011 0010111 0011100

24 Hamming Code 7 bits could be 2 7 = 128 codes Only use 16 of them 0000000 1000110 0001011 1001101 0010111 1010001 0011100 1011010 0100101 1100011 0101110 1101000 0110010 1110100 0111001 1111111

25 Hamming Code Every code word has distance of 3+ from other messages: 0000000 1000110 0001011 1001101 0010111 1010001 0011100 1011010 0100101 1100011 0101110 1101000 0110010 1110100 0111001 1111111

26 Our Message We get: 0110110 Which message was it meant to be? 0000000 1000110 0001011 1001101 0010111 1010001 0011100 1011010 0100101 1100011 0101110 1101000 0110010 1110100 0111001 1111111

27 Errors Assuming – Started with valid code word – Only one error Then – 1 bit from one valid word – 2+ bits from another valid code word Valid Code A Valid Code B Valid Code C Error

28 Our Message We get: 0110110 Find the code with distance of 1 0000000 1000110 0001011 1001101 0010111 1010001 0011100 1011010 0100101 1100011 0101110 1101000 0110010 1110100 0111001 1111111

29 Errors Assuming 1 error bit, we can identify correct message: Received codesAfter decoding 0000000, 0000001, 0000010 0000100, 0001000, 0010000 0100000, 1000000 0 0 0 0 0 0 0

30 Hamming Code Overhead Message size : 4 bits Code word: 7 bits 75% overhead… 512bit message can be encoded with 522bits: 2% overhead!

31 Trick 3 : Checksums Parity – Odd or even number of 1's 1 extra bit used to make odd num of 1's data checkbit 10011001000000111100

32 Trick 3 : Checksums Message: 00001 All 1 bit errors: 10001 01001 00101 00011 00000

33 Trick 3 : Checksums Checksum for decimal number: – Add digits, mod by 10: Message: 46756 – 4 + 6 + 7 + 5 + 6 = 28 – 28 mod (clock size) 10 = 8 Coded message: 467568

34 Trick 3 : Checksums Coded message: 467568 Error message: 461568 Check: 461568 – 4 + 6 + 1 + 5 + 6 = 22 – 22 mod (clock size) 10 = 2!!! we have a problem

35 Two Errors Coded message: 467568 Error message: 421568 Check: 421568 – 4 + 2 + 1 + 5 + 6 = 18 – 18 mod (clock size) 10 = 8!!! we missed it

36 Staircse Code Multiply each digit by its place: 12345 Message: 46756 – 4 x 1 + 6 x 2 + 7 x 3 + 5 x 4 + 6 x 5 = 87 – 87 mod (clock size) 10 = 7 Coded message: 467567

37 Two Errors w Stair Case Coded message: 467567 Error message: 421567 12345 Check: 421567 – 4 x 1 + 2 x 2 + 1 x 3 + 5 x 4 + 6 x 5 = 61 – 61 mod (clock size) 10 = 1!!! we caught it

38 Real Life Stair Case ISBN – books: http://www-math.ucdenver.edu/~wcherowi/jcorner/isbn.html http://www-math.ucdenver.edu/~wcherowi/jcorner/isbn.html

39 Trick 4: Pinpoint How did I do it?

40 Trick 4: Pinpoint How did I do it? Every Row & Col should have odd # of black squares

41 Trick 4: Pinpoint How did I do it? Every Row & Col should have odd # of black squares

42 Trick 4: Pinpoint Message / Checksum

43 Trick 4 : Pinpoint With decimal values: 471 392 76

44 Trick 4 : Pinpoint With decimal values: 471 592 76

45 Trick 4 : Pinpoint With decimal values: 471 592 76 4 9

46 Trick 4 : Pinpoint With decimal values: 471 392 76 4 9 off by 2

47 Hamming Code Hamming Codes as pinpoint parity checks: http://www.systems.caltech.edu/EE/Faculty/rjm /SAMPLE_20040708.html

48 Real Life Checksum Last digit of credit card number calculated to http://tywkiwdbi.blogspot.com/2012/06/checksum-number-on-credit-card.html


Download ppt ""

Similar presentations


Ads by Google