Hamming It Up with Hamming Codes CSE 461 Section Week 3.

Slides:



Advertisements
Similar presentations
Error Control Code.
Advertisements

Ch 2.7 Error Detection & Correction CS-147 Tu Hoang.
Chapter 10 Error Detection and Correction
Quantum Error Correction SOURCES: Michele Mosca Daniel Gottesman Richard Spillman Andrew Landahl.
Error Detection / Correction
Reliability and Channel Coding
Unit 1 Protocols Learning Objectives: Understand the need to detect and correct errors in data transmission.
Forward Error CORRECTION A little magic. Hamming in perspective Typically errors are corrected with retransmission. Hamming lets the receiver determine.
Error Detection and Correction
Error Detection/Correction Section 1.7 Section 3.9 Bonus Material: Hamming Code.
Lesson 2 0x Coding ASCII Code.
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
Error Detection and Correction
British Computer Society
Error Control Code. Widely used in many areas, like communications, DVD, data storage… In communications, because of noise, you can never be sure that.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Cyclic Code. Linear Block Code Hamming Code is a Linear Block Code. Linear Block Code means that the codeword is generated by multiplying the message.
MIMO continued and Error Correction Code. 2 by 2 MIMO Now consider we have two transmitting antennas and two receiving antennas. A simple scheme called.
Chapter 10. Error Detection and Correction
Error Control Code. Widely used in many areas, like communications, DVD, data storage… In communications, because of noise, you can never be sure that.
AS Computing Data Transmission and Networks. Transmission error Detecting errors in data transmission is very important for data integrity. There are.
Error Detection and Correction
Copyright © Curt Hill Error detection and correction Techniques to Increase the Reliability.
CSE 461 Section: The Last One (!!!!!!111). A Joke Worst thing Traceroute packet Network engineer.
David Wetherall Professor of Computer Science & Engineering Introduction to Computer Networks Error Detection (§3.2.2)
Lecture 5 Checksum. 10.2CHECKSUM Checksum is an error-detecting technique that can be applied to a message of any length. In the Internet, the checksum.
Error Detection and Correction
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
CS 111 – Sept. 13 Error detection Error correction Review/practice chapter 1 questions Commitment: –Please read sections 2.1 and 2.2.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Computer Communication & Networks Lecture 10 Datalink Layer: Error Correction Waleed Ejaz
Error Detection and Correction – Hamming Code
Data Link Layer. Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless.
Data Communications and Networking
Hamming Distance & Hamming Code
Hamming (4,7) Code Binary Linear Codes Hamming Distance Weight of BLC
Data Link Layer 1. 2 Single-bit error 3 Multiple-bit error 4.
ERROR DETECTION AND CORRECTION Chapter 8 Data Communications & Networking ERROR DETECTION AND CORRECTION Chapter 8 First Semester 2007/2008.
Data Transmission and Networks Transmission error checking & correcting.
Hamming Codes The Hamming Code is a Forward Error-correcting Code (FEC) that uses redundant bits to correct a single bit error For 4 bit codes, 3 redundant.
parity bit is 1: data should have an odd number of 1's
Modulo-2 Digital coding uses modulo-2 arithmetic where addition becomes the following operations: 0+0= =0 0+1= =1 It performs the.
ERROR DETECTION AND CORRECTION
Error Detection and Correction
ERROR CORRECTING CODES
Character coding schemes
Error detection and correction
Error Correcting Code.
Advanced Computer Networks
OCR AS Level F451: Data transmission
Representing characters
Even/odd parity (1) Computers can sometimes make errors when they transmit data. Even/odd parity: is basic method for detecting if an odd number of bits.
Error Detection Bit Error Rate(BER): It is the ratio of number Ne of errors appearing over a certain time interval t to the number Nt of 1 and 0 pulses.

Detecting and Correcting Bit Errors
Packetizing Error Detection
II. Linear Block Codes.
Packetizing Error Detection
Chapter 9 Error Detection and Correction
RAID Redundant Array of Inexpensive (Independent) Disks
Fundamentals of Data Representation
Packetizing Error Detection
Chapter 9 Error Detection and Correction
Error Detection and Correction
CS 325: CS Hardware and Software Organization and Architecture
Reliability and Channel Coding
Error Detection and Correction
parity bit is 1: data should have an odd number of 1's
Error Detection and Correction
Presentation transcript:

Hamming It Up with Hamming Codes CSE 461 Section Week 3

Error Detection/Correction  We want to know when there are errors in communication  Correcting errors would be even better! Why?  It’d save lots of time  What are some ways we can correct errors?  Send data multiple times  Send longer symbols  Send data with the payload that’s a function of the payload  E.g., parity bits

Parity Bits  Problem  We want to send 1101  Last bit gets flipped  1100 is sent instead  How can we detect this?  Add another bit at the end: the sum (without carry) of all the bits  So instead of 1101 we send…   If is received, we know that it’s wrong—how?  The parity bit for 1100 should be 0, but it’s not… something was flipped!  Even and odd parity

Error Detection/Correction  Parity bits don’t let us correct errors (by themselves)  Can we do any better?  What’s the best way to detect and correct?

Hamming Codes: Background  Richard Hamming  Worked at Bell Labs  Developed Hamming Codes to save time on punchcard reading errors  Mixed message bits and parity bits to detect and correct specific errors  Hamming codes now used for network communications as well as hard drive RAIDs

Hamming Codes: How They Work Bits in 1, 2, 4, 8, etc. positions are parity bits All other bits are message bits

Hamming Codes: How They Work We want to send We put its message bits into the non-2 n places, like so: ? ? 1 ? ? P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11

Hamming Codes: How They Work ? ? 1 ? ? Each message bit is added to the parity bits that sum up to that message bit’s place For m 3, 3 = 2 + 1, so we add to p 1 and p 2 P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 +1

Hamming Codes: How They Work ? ? 1 ? ? For m 5, 5 = 4 + 1, so we add to p 4 and p 1 But m 5 = 0, so we don’t add anything P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 +1

Hamming Codes: How They Work ? ? 1 ? ? For m 6, 6 = 4 + 2, so we add to p 4 and p 2 P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 +1

Hamming Codes: How They Work ? ? 1 ? ? For m 7, 7 = , so we add to p 4, p 2 and p 1 P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 +1

Hamming Codes: How They Work ? ? 1 ? ? What would we do for m 9 ? 9 = 8 + 1, so we add to p 8 and p 1 P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 +1

Hamming Codes: How They Work ? ? 1 ? ? What would we do for m 10 ? 10 = 8 + 2, so we add to p 8 and p 2 But m 10 = 0, so we don’t add anything P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 +1

Hamming Codes: How They Work ? ? 1 ? ? What would we do for m 11 ? 11 = , so we add to p 8, p 2 and p 1 But m 11 = 0, so we don’t add anything P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 +1

Hamming Codes: How They Work ? ? 1 ? ? Now we add up all of the parity bits What would each one be? (Even parity) P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 +1

Hamming Codes: How They Work 1 ? 1 ? ? Now we add up all of the parity bits What would each one be? (Even parity) P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 +1

Hamming Codes: How They Work ? ? Now we add up all of the parity bits What would each one be? (Even parity) P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 +1

Hamming Codes: How They Work ? Now we add up all of the parity bits What would each one be? (Even parity) P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 +1

Hamming Codes: How They Work Now we add up all of the parity bits What would each one be? (Even parity) P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 +1

Hamming Codes  So we get as our bit string to send  The receiver can recalculate the parity bits and make sure they match

Error Syndromes The sender sent but what if we received ? Can we correct this?

Error Syndromes P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 Recalculate parity bits and you get the numbers in blue: (We know there’s an error because we didn’t get 1101)

Error Syndromes P 1 p 2 m 3 p 4 m 5 m 6 m 7 p 8 m 9 m 10 m 11 Add calculated parity bits to parity bits in received data: =1 =1 =0 =0 Then reverse the sum and it will tell you the bit in error: > third bit is wrong!

Now, you try! Decode this ASCII message (0b = 65 = ‘A’) There may be bit errors! Assume each line encodes one byte of message data. (I.e., pad with a leading zero.)

Answers Correct errors Extract message bits Convert to ASCII PIG