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.

Slides:



Advertisements
Similar presentations
Hamming Code.
Advertisements

parity bit is 1: data should have an odd number of 1's
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Forward Error Correction Demystified Presented by Sunrise Telecom Broadband … a step ahead.
ERROR CORRECTION.
NETWORKING CONCEPTS. ERROR DETECTION Error occures when a bit is altered between transmission& reception ie. Binary 1 is transmitted but received is binary.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
Practical Session 11 Codes. Hamming Distance General case: The distance between two code words is the amount of 1-bit changes required to reach from one.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Error Control.
7/2/2015Errors1 Transmission errors are a way of life. In the digital world an error means that a bit value is flipped. An error can be isolated to a single.
Error Detection and Correction
Hamming It Up with Hamming Codes CSE 461 Section Week 3.
Error Detection and Correction.  Corrupted files  Attachments that won’t open  Files that won’t download  Videos that won’t play Errors occur when.
Rutvi Shah1 ERROR CORRECTION & ERROR DETECTION Rutvi Shah2 Data can be corrupted during transmission. For reliable communication, errors must be detected.
Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall,
Digital Logic Lecture 4 Binary Codes The Hashemite University Computer Engineering Department.
Error Detection and Correction
PART III DATA LINK LAYER. Position of the Data-Link Layer.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 1 Communication Reliability Asst. Prof. Chaiporn Jaikaeo, Ph.D.
ECS 152A 4. Communications Techniques. Asynchronous and Synchronous Transmission Timing problems require a mechanism to synchronize the transmitter and.
COEN 180 Erasure Correcting, Error Detecting, and Error Correcting Codes.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Practical Session 10 Error Detecting and Correcting Codes.
Lecture 3-2: Coding and Error Control (Cont.) ECE
EEC4113 Data Communication & Multimedia System Chapter 5: Error Control by Muhazam Mustapha, October 2011.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
CHAPTER 3: DATA LINK CONTROL Flow control, Error detection – two dimensional parity checks, Internet checksum, CRC, Error control, Transmission efficiency.
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
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can.
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
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Link Layer 1. 2 Single-bit error 3 Multiple-bit error 4.
Practical Session 10 Computer Architecture and Assembly Language.
ERROR DETECTION AND CORRECTION Chapter 8 Data Communications & Networking ERROR DETECTION AND CORRECTION Chapter 8 First Semester 2007/2008.
Coding and Error Control
Lecture 4 Error Detecting and Correcting Techniques Dr. Ghalib A. Shah
parity bit is 1: data should have an odd number of 1's
ERROR DETECTION AND CORRECTION
Error Detection and Correction
ERROR CORRECTING CODES
Error Correcting Code.
Advanced Computer Networks
Representing characters
Data Link Layer What does it do?
Data Link Layer.
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.
EEC4113 Data Communication & Multimedia System Chapter 5: Error Control by Muhazam Mustapha, August 2010.
Packetizing Error Detection
Packetizing Error Detection
Chapter 9 Error Detection and Correction
Dr. Clincy Professor of CS
Chapter Nine: Data Transmission
Error Correction Codes
Packetizing Error Detection
Coding and Error Control
Protocols and the TCP/IP Suite
Chapter 9 Error Detection and Correction
CS 325: CS Hardware and Software Organization and Architecture
Error Detection and Correction
Error Detection and Correction
parity bit is 1: data should have an odd number of 1's
Types of Errors Data transmission suffers unpredictable changes because of interference The interference can change the shape of the signal Single-bit.
Error Detection and Correction
Presentation transcript:

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 bits are needed, total = 7 bits For 8 bit codes, 4 redundant bits are needed, total = 12 bits They are placed in bit positions 1,2,4 and 8 (the powers of 2) and the 8 bit character occupies bit positions 3,5,6,7,9,10, 11 and 12 Each redundant bit is the Vertical Redundancy Check (normally even parity) for a combination of data bits Hamming Codes can be extended to correct a single burst errors of up to n bits, by transmitting a bit in turn from each of n characters 14/12/10 10-Hamming

Hamming Codes Hamming Codes use the redundant bits to check the data bits using the concept of one redundant parity bit covering a number of data bits according to the following binary code table Bit errors can be found by identifying which parity bits are incorrect and determining which data bit was covered by those parity bits An alternative (but possibly more error prone method) is to create a bit string from the bits which would be needed to add to each wrong parity bit make a binary number which is then converted to decimal It is advisable to use both methods, to double check the answer 14/12/10 10-Hamming

14/12/10 10-Hamming

Covered by Parity Bits Data Bits B16 B8 B4 B2 B1 B3 1 B5 B6 B7 B9 B10 1 B5 B6 B7 B9 B10 B11 B12 B13 B14 B15 B17 ... 14/12/10 10-Hamming

14/12/10 10-Hamming

14/12/10 10-Hamming

14/12/10 10-Hamming

14/12/10 10-Hamming

14/12/10 10-Hamming

The 2 (Slightly Alternative) Methods 11 10 9 8 7 6 5 4 3 2 1 To Fix B1 B2 B4 B8 Bits 1, 2 and 4 are the wrong parity (underlined) and bit 7 is the error as it is covered by bits 1, 2 and 4 Alternatively, error is in bit position 7 = 01112 = 1 + 2 + 4 The original code that was sent was 1001101 14/12/10 10-Hamming

Extending Hamming Codes for Burst Errors Data is arranged in a block and the instead of transmitting the bits of each symbol in turn, bit 1 of each symbol is trans- mitted, followed by bit 2 of each symbol, and so on. If there are n symbols in the block, then a single burst error of up to n bits will affect no more than one bit position in every Hamming code and hence can be corrected © Tanenbaum, Prentice Hall International Note: Tanenbaum uses an unconventional bit order (bit 1 leftmost) 14/12/10 10-Hamming

Forward Error Correction v ARQ FEC requires a higher level of redundancy than ARQ FEC cannot recover correctly from multiple burst errors and hence there is a much higher residual error rate ARQ can make use of very powerful (CRC) error detecting codes and can detect virtually all errors The delay caused by retransmitting is preferable to residual errors in most applications FEC tends to be used mainly when there is no return channel (E.g. Teletext) or in real-time applications (E.g. Video on Demand) or over unreliable media 14/12/10 10-Hamming

Example 1 Suppose that an error occurred during the transmission of the even Hamming Code 101111010111 of a binary code. Correct the error bit and write down the original binary code (without parity bits) which was meant to send. 14/12/10 10-Hamming

Example 1 - Solution 12 11 10 9 8 7 6 5 4 3 2 1 To Fix B1 B2 B4 B8 B1 B2 B4 B8 Bits 1 and 4 are the wrong parity (underlined) and bit 5 is the error as it is covered by bits 1 and 4 Alternatively, error is in bit position 5 = 01012 = 1 + 4 The original code that was sent was 10111001 14/12/10 10-Hamming

Example 2 Suppose that an error occurred during the transmission of the odd Hamming Code 010101101110 of a binary code. Correct the error bit and write down the original binary code (without parity bits) which was meant to send. 14/12/10 10-Hamming

Example 2 - Solution 12 11 10 9 8 7 6 5 4 3 2 1 To Fix B1 B2 B4 B8 B1 B2 B4 B8 Bits 1 and 8 are the wrong parity (underlined) and bit 9 is the error as it is covered by bits 1 and 8 Alternatively, error is in bit position 9 = 10012 = 1 + 8 The original code that was sent was 01001101 14/12/10 10-Hamming

Exercise 1 (from Study Guide) The EBCDIC character B is encoded as 11000010. It is transmitted using an even Hamming code. What code is transmitted? The character is received with a one bit error as 110001010010. Show how the bit in error can be corrected to recover the original data (without parity bits) 14/12/10 10-Hamming

Exercise 1 – Solution (coding) 12 11 10 9 8 7 6 5 4 3 2 1 B1 B2 B4 B8 The EBCDIC Character B is transmitted as 110000010010 as an even Hamming Code 14/12/10 10-Hamming

Exercise 1 – Solution (decoding) 12 11 10 9 8 7 6 5 4 3 2 1 To Fix B1 B2 B4 B8 Bits 1, 2 and 4 are the wrong parity (underlined) and bit 7 is the error as it is covered by bits 1, 2 and 4 Alternatively, error is in bit position 7 = 01112 = 1 + 2 + 4 The original code that was sent was 11000010 14/12/10 10-Hamming