STATISTIC & INFORMATION THEORY (CSNB134) MODULE 12 ERROR DETECTION & CORRECTION.

Slides:



Advertisements
Similar presentations
Cyclic Code.
Advertisements

Applied Algorithmics - week7
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
Quantum Error Correction SOURCES: Michele Mosca Daniel Gottesman Richard Spillman Andrew Landahl.
DIGITAL COMMUNICATION Coding
Transmission Errors1 Error Detection and Correction.
EEE377 Lecture Notes1 EEE436 DIGITAL COMMUNICATION Coding En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) Room 2.14.
Reliability and Channel Coding
Rutvi Shah1 ERROR CORRECTION & ERROR DETECTION Rutvi Shah2 Data can be corrupted during transmission. For reliable communication, errors must be detected.
Lecture 6 Topics Character codes Error Detection and Correction
Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall,
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 8 INTRODUCTION TO INFORMATION THEORY.
Error Detection and Correction
E RROR D ETECTION A ND C ORRECTION C ODES Error Detection Code (Parity bit) Error Correction Code ( Hamming Code)
Information Coding in noisy channel error protection:-- improve tolerance of errors error detection: --- indicate occurrence of errors. Source.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 1 Communication Reliability Asst. Prof. Chaiporn Jaikaeo, Ph.D.
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.
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.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Cyclic Redundancy Check CRC Chapter CYCLIC CODES Cyclic codes are special linear block codes with one extra property. In a cyclic code, if a codeword.
Practical Session 10 Error Detecting and Correcting Codes.
Introduction to Coding Theory. p2. Outline [1] Introduction [2] Basic assumptions [3] Correcting and detecting error patterns [4] Information rate [5]
Unit 5 Lecture 2 Error Control Error Detection & Error Correction.
Basic Characteristics of Block Codes
Error Control Code. Widely used in many areas, like communications, DVD, data storage… In communications, because of noise, you can never be sure that.
Error Detection and Correction
DIGITAL COMMUNICATIONS Linear Block Codes
Chapter 31 INTRODUCTION TO ALGEBRAIC CODING THEORY.
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
1 © Unitec New Zealand CRC calculation and Hammings code.
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.
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 Data can be corrupted during transmission. Some applications require that errors be detected and.
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
Winter 2007CS244a Handout 141 CS244a: An Introduction to Computer Networks Handout 14: Error Detection and Correction Nick McKeown Professor of Electrical.
Hamming Distance & Hamming Code
Transmission Errors Error Detection and Correction.
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.
Computer Architecture and Assembly Language
ERROR DETECTION AND CORRECTION
Error Detection and Correction
ERROR CORRECTING CODES
Subject Name: COMPUTER NETWORKS-1
DATA COMMUNICATION AND NETWORKINGS
Advanced Computer Networks
CIS 321 Data Communications & Networking
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.
Part III Datalink Layer 10.
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.
Packetizing Error Detection
Packetizing Error Detection
Chapter 7 Error Detection and Correction
Information Redundancy Fault Tolerant Computing
Transmission Errors Error Detection and Correction
Packetizing Error Detection
DATA COMMUNICATION Lecture-33.
Communicating Efficiently
Error Detection and Correction
Reliability and Channel Coding
Computer Architecture and Assembly Language
Transmission Errors 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:

STATISTIC & INFORMATION THEORY (CSNB134) MODULE 12 ERROR DETECTION & CORRECTION

Noise in Channels With real channels being imperfect, we have to consider the noise introduced: Noise is one of the reasons for transmission errors. It may be caused by electrical interference, thermal noise, etc. A transmission error occurs when a bit sent with a specific value reaches the drain in a different state (e.g. sent ‘1’, received ‘0’ and vice versa)

Error Detection All network technologies employ some form of error detection. The basic idea is to use extra bits added to message to determine if errors have been introduced. In the extreme case of error detection – we can transmit additional copy of message. If the receiver has received 2 identical messages, then no error has occurred. However this is not practical since it results in 100% redundancy. Thus, it is best to adopt error detection mechanism which is effective enough to detect most errors yet which yield low level of redundancy (i.e. that require the least extra bits for error detection purposes)

Error Correction There are also techniques available to correct errors in addition to detect errors (i.e. error correcting codes). However, error correction techniques often requires many more redundant bits. Sometimes, for less crucial security application, it is ‘cheaper’ to use error detection and throw away bad messages and / or request for retransmission of erroneous messages (i.e. avoid having to correct any erroneous messages).

Error Detection & Error Correction Here, we shall study about two methods of error correction and detection, namely:- (i) Parity checking (ii) Hamming Coding

Parity Checking Parity Bit was inserted in the early days per Byte: 7 bits plus 1 parity bit (sometimes still used today – remember ASCII code, 7 data bits + 1 parity bit that make up a byte). The parity bit identifies an odd / even number of '1' per group of data bits (e.g. 7 data bits) Example (even parity) Data BitsData + Parity Bits Example (odd parity) Data BitsData + Parity Bits Note: Number of ‘1’ is even Note: Number of ‘1’ is odd

Parity Checking (cont.) Limitations of Party checking error detection: - Detects any odd number of errors. - Cannot detect even number of errors. (Note: See example below based on even parity)

2-Dimensional Parity Checking Extension of 1-D parity checking. Example (even parity): parity bit parity byte Detects any odd number of errors and all 2-bit errors

Exercise 1 Derive the parity bit P 1, P 2, P 3 and P 4 and the parity byte P 5 P 6 P 7 P 8 P 9 P 10 P 11 P 12 assuming even parity checking is being deployed. parity bit P P P P 4 parity byte P 5 P 6 P 7 P 8 P 9 P 10 P 11 P

Exercise 2 Identify erroneous bit/s and erroneous codeword/s assuming even parity is being deployed. parity bit parity byte Therefore possible error could be either: the pair of bit A and bit D or the pair of bit B and bit C Thus, it is capable of detecting any 2 bits error of 2 different code- words, HOWEVER incapable of correcting them. AB CD

Exercise 3 Identify erroneous bit/s and erroneous codeword/s assuming even parity is being deployed. parity bit parity byte Therefore possible error is bit A! Thus, this 2-D parity checking only allows for 1 bit error correction!! A

Hamming Coding Hamming Coding is introduced mainly to increase the capability of error detection and error correction without having too many redundant bits. Before understanding Hamming Coding, we shall need to learn two other parameters related to this: (1) Hamming Weight - The number of non-zero elements in a codeword c. It is written as w(c). (2) Hamming Distance - The number of places in which two codewords c i and c j differ. It is written as d(c i, c j )

Exercise 4 Let code C consists of 4 codewords: {110101, , , } Derive the Hamming Weights Derive the Hamming Distances cic1c2c3c4 Codeword Hamming Weight w(ci)4334 cicjd(ci,cj)cicjd(ci,cj)

Hamming Coding (cont.) (n, k) Hamming Code consists of: - n total number of bits per codeword (i.e. data bits + parity bits) - k total number of data bits per codeword Suppose m is the total number of parity bits per codeword, n and k can be derived based on the following formulae: (n, k) Hamming Code = (2 m – 1, 2 m – 1 – m) Hamming Code Note: n – k = m Where m = total number of parity bits / control bits

Exercise 5 Suppose that a Hamming Code of n bits consists of k data bits – i.e. (n, k) Hamming Code. (a) If the total control bits m = 3, derive n and k. (b) If the total control bits m = 4, derive n and k. Compare the percentage of the redundancy in (a) and (b). n = 2 m – 1 = 2 3 – 1 = 7 where as k = n – m = 7 – 3 = 4 Percentage of redundancy in (a) = (3/4)x100% = 0.75% Percentage of redundancy in (b) = (4/11)x100% = 0.36% n = 2 m – 1 = 2 4 – 1 = 15 where as k = n – m = 15 – 4 = 11

Hamming Coding (cont.) Previously we have learned how to calculate n and k of an (n, k) Hamming Code. We also know that n - k = m total number of parity check bits in Hamming code. Unlike in normal parity checking, where parity bit is always placed at the first bit, in Hamming code, the parity check bits are placed at 2 x position. For example for (7,4) Hamming code, where total number of parity bits = 7 – 4 = 3, the parity check bits are placed at: (1) 2 0 position = 1 st bit (2) 2 1 position = 2 nd bit (3) 2 2 position = 4 th bit

Hamming Coding (cont.) Suppose that a (7, 4) Hamming Code is decoded based as the following formulas: B7B6B5B4B3B2B1Remarks Data ParityDataParity Code- word Data- - -ParityB1 Even Parity Data -- ParityB2 Even parity Data Parity---B4 Even Parity Note: The parity bits B1, B2 and B4 are related to the data bits B3, B5, B6 AND B7 B7 affecting B1, B2 & B4 B6 affecting B2 & B4 B5 affecting B1 & B4 B3 affecting B1 & B2

Exercise 6 Based on the previous formulae, derive the Hamming codeword if we want to transmit 1101: B7B6B5B4B3B2B1Remarks Data 1 Data 0 Parity 0 Data 1 Parity 1 Parity 0 Code- word B1 Even Parity B2 Even parity B4 Even Parity Thus, the Hamming codeword is

Exercise 7 Based on the previous formulae, derive the Hamming codeword if we want to transmit 0100: B7B6B5B4B3B2B1Remarks Data 0 Data 1 Data 0 Parity 1 Data 0 Parity 1 Parity 0 Code- word B1 Even Parity B2 Even parity B4 Even Parity Thus, the Hamming codeword is

Exercise 8 Detect the erroneous data bit, assuming a single error has occurred in the received Hamming Code (which follows previous formulae) B7B6B5B4B3B2B1Remarks Data 1 Parity 0 Data 1 Parity 1 Parity 0 Code- word ERROR! OK! ERROR! B1 & B4 indicate an error!! Common data bits effecting B1 & B4 - {B7, B5} - potential erroneous bits However, B2 is free of error. Data bits affecting B2 – {B7, B6 and B3} - eliminate B7 from potential erroneous bit list! Therefore, the erroneous bit is B5

Exercise 9 Detect the erroneous data bit, assuming a single error has occurred in the received Hamming Code (which follows previous formulae) B7B6B5B4B3B2B1Remarks Data 1 Data 0 Parity 1 Data 0 Parity 1 Parity 0 Code- word ERROR! B1, B2 & B4 indicate an error!! Common data bits effecting B1, B2 & B4 - {B7} - potential erroneous bit Therefore, the erroneous bit is B7

STATISTIC & INFORMATION THEORY (CSNB134) ERROR DETECTION & CORRECTION --END--