Hamming (4,7) Code Binary Linear Codes Hamming Distance Weight of BLC

Slides:



Advertisements
Similar presentations
Mahdi Barhoush Mohammad Hanaysheh
Advertisements

parity bit is 1: data should have an odd number of 1's
Applied Algorithmics - week7
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
NETWORKING CONCEPTS. ERROR DETECTION Error occures when a bit is altered between transmission& reception ie. Binary 1 is transmitted but received is binary.
Chapter 10 Error Detection and Correction
EEE377 Lecture Notes1 EEE436 DIGITAL COMMUNICATION Coding En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) Room 2.14.
The OSI Reference Model
Chapter 2 Error-Detecting Codes. Outline 2.1 Why Error-Detecting Codes? 2.2 Simple Parity Checks 2.3 Error-Detecting Codes 2.4 Independent Errors: White.
Error detection and correction
Chapter 2 Parity checks Simple codes Modular arithmetic.
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.
MAT 1000 Mathematics in Today's World Winter 2015.
Error Detection and Correction
The Mathematics of Star Trek Data Transmission Michael A. Karls Ball State University.
Hamming Code Rachel Ah Chuen. Basic concepts Networks must be able to transfer data from one device to another with complete accuracy. Data can be corrupted.
Hamming Code A Hamming code is a linear error-correcting code named after its inventor, Richard Hamming. Hamming codes can detect up to two bit errors,
Hamming It Up with Hamming Codes CSE 461 Section Week 3.
MAT 1000 Mathematics in Today's World Winter 2015.
Shashank Srivastava Motilal Nehru National Institute Of Technology, Allahabad Error Detection and Correction : Data Link Layer.
Chapter 17: Information Science Lesson Plan
Mathematics in Management Science
The Mathematics of Star Trek
Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall,
Chapters 16 & 17 Sarah Cameron 18 March  Review of Modular Arithmetic  Identification Numbers ZIP Codes Bar Codes  Binary Codes  Encryption.
Information Coding in noisy channel error protection:-- improve tolerance of errors error detection: --- indicate occurrence of errors. Source.
Copyright © NDSL, Chang Gung University. Permission required for reproduction or display. Chapter 10 Error Detection and Correction 長庚大學資訊工程學系 陳仁暉 副教授.
British Computer Society
Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that.
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.
Chapter 10. Error Detection and Correction
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.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Integrity © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada.
Error Detection and Correction
DIGITAL COMMUNICATIONS Linear Block Codes
Overview All data can be corrupted, for reliable communications we must be able to detect and correct errors implemented at the data link and transport.
Error Detection and Correction
CHAPTER 3: DATA LINK CONTROL Flow control, Error detection – two dimensional parity checks, Internet checksum, CRC, Error control, Transmission efficiency.
1 © Unitec New Zealand CRC calculation and Hammings code.
Error Detection.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Block Coding Messages are made up of k bits. Transmitted packets have n bits, n > k: k-data bits and r-redundant bits. n = k + r.
The parity bits of linear block codes are linear combination of the message. Therefore, we can represent the encoder by a linear system described by matrices.
10.1 Chapter 10 Error Detection and Correction Data can be corrupted during transmission. Some applications require that errors be detected and.
1 Kyung Hee University Position of the data-link layer.
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
Error Detection and Correction
Hamming Distance & Hamming Code
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
8 Coding Theory Discrete Mathematics: A Concept-based Approach.
Modulo-2 Digital coding uses modulo-2 arithmetic where addition becomes the following operations: 0+0= =0 0+1= =1 It performs the.
The Mathematics of Star Trek Workshop
Computer Architecture and Assembly Language
Error Detection and Correction
Advanced Computer Networks


Error Detection and Correction
Computer Architecture and Assembly Language
Error Detection and Correction
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 (4,7) Code Binary Linear Codes Hamming Distance Weight of BLC Parity-Check Sums Hamming (4,7) Code Binary Linear Codes Hamming Distance Weight of BLC Mathematics in Management Science Spring 2015

Parity A bit string has odd parity if the number of 1s in the string is odd. A bit string has even parity if the number of 1s in the string is even. 01100, 000, 11001001 – even parity. 1000011, 1, 00010 – odd parity.

Partity & Modular Arithmetic For two numbers n and p (p ≠ 0), n mod p is the remainder when we divide n by p . So, n mod 2 = 0 if n is even and n mod 2 = 1 if n is odd.

Partity & Modular Arithmetic Let n be the sum of the binary digits in some word (bit string) w. Then w has even parity if n mod 2 = 0 and w has odd parity if n mod 2 = 1 .

Error Correcting Code A method of encoding data with sufficient redundancy to allow the recovery of data in the face of (a limited number of) errors. Messages encoded by appending extra digits, determined by parity (even or odd sums) of certain portions of the messages.

Example To encode 4 bits, we use 7 bits with parity-check sums. Want to send a1a2a3a4. Will append parity check-sum digits c1c2c3 . These determined as follows. Write digits a1a2a3a4 inside circles as pictured.

a1 c1 a4 a2 a3 c3 c2

Example Sending a1a2a3a4. Write a1a2a3a4 inside circles as pictured. The parity check-sum digits c1c2c3 are chosen so that inside each circle the sum has even parity; so, want an even number of ones inside each circle 

To send 1010 Append ??? 1 ? ? 1 ?

To send 1010 Append 001 Transmit 1010001 1 1 1

To send 1011 Append 001 Transmit 1011010 1 1 1 1

Error Correction Suppose code received is 1010010. Transmission error? How to correct?

The black circle is ok—it has even parity sum. But, the two blue circles have incorrect parity. We assume at worst one bit error. 1 The error lies inside both the blue circles. But outside the black circle. So, the digit a4 is incorrect—it should be a 1.

Error Correction Code word received was 1010010. Should have been 1011010.

Reliable Data Transmission How to decode?

Hamming (7,4) Code Above code one of many invented by Richard Hamming at Bell labs. Each code word consists of 4 data bits (the message) plus 3 parity bits. Recovering message from code word is easy—just drop the parity bits. 

Hamming (7,4) Code East to write formulas for parity bits. Given message a1a2a3a4 calculate parity check-sum digits c1c2c3 via: c1= (a1+a2+a3 ) mod 2 c2= (a1 +a3+a4 ) mod 2 c3= ( a2+a3+a4 ) mod 2 These give same as using circles! RHS equations are parity check-sums.

Binary Linear Code Strings (words) of 0’s and 1’s with extra digits for error correction used to send full-text messages. Words composed of all possible messages of a given length plus parity-check sum digits appended to messages; resulting strings are the code words. A binary linear code is set of binary strings where each string has two parts—the message part and the check-digits part.

Hamming (7,4) binary code 0000000, 0001011, 0010111, 0100101,1000110, 1100011, 1010001, 1001101,0110010, 0101110, 0011100, 1110100,1101000, 1011010, 0111001, 1111111

Detecting & Correcting Errors Valid code words must satisfy parity check-sums; if not, have an error. But, if bunch of errors, a code word could get transformed to some other code word.  How many 1-bit errors does it take to change a legal code word into a different legal code word?

Hamming Distance The Hamming distance between two binary strings is the number of bits in which the two strings differ. dist btwn 10 and 01 is 2 dist btwn 10001 and 11001 is 1 dist btwn 00000 and 01101 is 3 dist btwn pixd words is 3

Hamming Distance Here are the Hamming distances between the string v=1010110 and all the Hamming (7,4) code words.

Weight of a Binary Code The distance between two code words is exactly the number of 1-bit changes needed to change the one code word into the other code word. The weight of a binary code is the minimum distance btwn any 2 code words; this is the minimum number of 1’s in any non-zero word.

Example What is the weight of the Hamming (7,4) code? What is the min number of ones? Wt is t=3.

Weight of a Binary Code Suppose the weight of some binary code is t; so, it takes t 1-bit changes to convert any code word into another. Therefore, we can detect up to t-1 single bit errors. The Hamming (7,4) code has weight t=3. Thus using it we can detect 1 or 2 single bit errors.

We assume at worst one bit error. Code word received is 1101110. Two blue circles have incorrect parity. We assume at worst one bit error. 1 The error lies inside both blue circles and outside black circle. a1 should be 0, or c1 ,c2 should be 0,0, or a2 ,a4 should be 0,0.

Weight of a Binary Code Suppose the weight of some binary code is t. Then, can detect up to t-1 single bit errors, or, we can correct up to (t-1)/2 errors (if t is odd), (t-2)/2 errors (if t is odd). Cannot do both.

Hamming (3,1) Code Simplest Hamming code encodes 1 bit by using 3 bits: a is coded as abc where the 2 parity bits bc are chosen so that the 2 overlapping circles each have an even number of 1’s. What are possible code words? a b c

a b c

a1 c1 a4 a2 a3 c3 c2