CS/MA 109 Fall Wayne Snyder Computer Science Department Boston University

Similar documents
From last time to this time

ECE 333: Introduction to Communication Networks Fall Lecture 6: Data Link Layer II

CSE 123: Computer Networks

Errors. Chapter Extension of System Model

Chapter 10 Error Detection and Correction 10.1

Describe the two most important ways in which subspaces of F D arise. (These ways were given as the motivation for looking at subspaces.

Error-Correcting Codes

Chapter 10 Error Detection and Correction. Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Error Detection. Hamming Codes 1

The Data Link Layer. CS158a Chris Pollett Feb 26, 2007.

PART III. Data Link Layer MGH T MGH C I 204

Error Correction continued and start on FPGA architecture

CSC 401 Data and Computer Communications Networks

Summary of Digital Information (so far):

Advanced Computer Networks. Rab Nawaz Jadoon DCS. Assistant Professor COMSATS University, Lahore Pakistan. Department of Computer Science

Networked Systems and Services, Fall 2018 Chapter 2. Jussi Kangasharju Markku Kojo Lea Kutvonen

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Building Memory

12/2/2016. Error Detection May Not Be Enough. ECE 120: Introduction to Computing. Can We Use Redundancy to Correct Errors?

Introduction to Data Communications & Networking

Link Layer: Error detection and correction

ELEC 691X/498X Broadcast Signal Transmission Winter 2018

Topic Notes: Building Memory

Chapter 6 Digital Data Communications Techniques

Data Link Layer: Overview, operations

15110 PRINCIPLES OF COMPUTING SAMPLE EXAM 2

Manipulating Digital Information

Error Detection and Parity Lesson Plan

Christian Brothers High School, Lewisham. Year 12 Information Processes & Technology. Assessment Task 3: Communications Systems.

CS 43: Computer Networks The Link Layer. Kevin Webb Swarthmore College November 28, 2017

ENEE x Digital Logic Design. Lecture 3

Inst: Chris Davison

Greats Bugs in History

CS 640 Lecture 4: 09/11/2014

CMSC 2833 Lecture 18. Parity Add a bit to make the number of ones (1s) transmitted odd.

Redundancy in fault tolerant computing. D. P. Siewiorek R.S. Swarz, Reliable Computer Systems, Prentice Hall, 1992

Error correction in Flash memory 1. Error correction in Flash memory. Melissa Worley. California State University Stanislaus.

CSE 461: Multiple Access Networks. This Lecture

CSE 380 Computer Operating Systems

Some portions courtesy Robin Kravets and Steve Lumetta

EECE 580B Modern Coding Theory

Lecture 2 Error Detection & Correction. Types of Errors Detection Correction

CSE 123: Computer Networks Alex C. Snoeren. HW 1 due Thursday!

1 Counting triangles and cliques

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING

CS/ECE 4457 FALL Name: Computing ID: WARM UP. Question 1: What type of transmission mode is depicted in the photo below:

Achieving Reliable Digital Data Communication through Mathematical Algebraic Coding Techniques

416 Distributed Systems. Errors and Failures, part 2 Feb 3, 2016

Link Layer. (continued)

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

Horn Formulae. CS124 Course Notes 8 Spring 2018

CS43: Computer Networks Reliable Data Transfer. Kevin Webb Swarthmore College October 5, 2017

Homework, etc. Computer Science Foundations

UNIT 7A Data Representation: Numbers and Text. Digital Data

Associate Professor Dr. Raed Ibraheem Hamed

The Data Link Layer Chapter 3

EE 6900: FAULT-TOLERANT COMPUTING SYSTEMS

Data Compression. Media Signal Processing, Presentation 2. Presented By: Jahanzeb Farooq Michael Osadebey

CSEP 561 Error detection & correction. David Wetherall

CMSC 341 Lecture 16/17 Hashing, Parts 1 & 2

CSC 4900 Computer Networks: The Link Layer

Ch. 7 Error Detection and Correction

CS321: Computer Networks Error Detection and Correction

Data Link Control Layer, Error Detection, Error Correction, and Framing

416 Distributed Systems. Errors and Failures Feb 9, 2018

Worksheet - Storing Data

14-740: Fundamentals of Computer and Telecommunication Networks

Distributed Systems COMP 212. Lecture 19 Othon Michail

Chapter 6 The Link Layer and LANs

CS254 Network Technologies. Lecture 2: Network Models & Error Detection and Correction. Dr Nikos Antonopoulos

CSE 123A Computer Networks

Week - 04 Lecture - 02 Merge Sort, Analysis

CS 43: Computer Networks. 16: Reliable Data Transfer October 8, 2018

Lecture 4: CRC & Reliable Transmission. Lecture 4 Overview. Checksum review. CRC toward a better EDC. Reliable Transmission

Fault Tolerance & Reliability CDA Chapter 2 Additional Interesting Codes

EITF25 Internet Techniques and Applications L3: Data Link layer. Stefan Höst

Error Checking Codes

CSE123A discussion session

Link Layer and LANs 안상현서울시립대학교컴퓨터 통계학과.

Midterm Exam 2B Answer key

Random Access Memory (RAM)

EE 387 course information

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

Chapter 5 Link Layer and LANs

Lecture 25: Busses. A Typical Computer Organization

CSCI-1680 Link Layer I Rodrigo Fonseca

A Novel Approach for Error Detection using Double Redundancy Check

Data Storage. Slides derived from those available on the web site of the book: Computer Science: An Overview, 11 th Edition, by J.

Problem Set Name the 7 OSI layers and give the corresponding functionalities for each layer.

Lecture 6: Reliable Transmission. CSE 123: Computer Networks Alex Snoeren (guest lecture) Alex Sn

Basics of Database Corruption Repair

(Refer Slide Time: 2:20)

CSCI-1680 Link Layer Reliability Rodrigo Fonseca

Redundancy in fault tolerant computing. D. P. Siewiorek R.S. Swarz, Reliable Computer Systems, Prentice Hall, 1992

LDPC Simulation With CUDA GPU

CS 455/555 Intro to Networks and Communications. Link Layer

CS 4453 Computer Networks Winter

MEMORY AND PROGRAMMABLE LOGIC

The Data Link Layer Chapter 3

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. Nov 1,

15110 Principles of Computing, Carnegie Mellon University - CORTINA. Digital Data

Transcription:

CS/MA 9 Fall 25 Wayne Snyder Department Boston University Today (Friday the 3 th!): Error-detecting and error-correcting codes. Next week: Cryptography

From last time to this time Compression takes advantage of redundancy in the data to store it in less space and take less time to transmit: Receiver Sender Data Communications Data Storage But: transmission and storage media are physical devices and may corrupt the data with errors which show up as flipped bits after processing: 2

From last time to this time Errors can occur separately or together: Single-Bit Errors:.. Burst Errors:.. We will assume errors are: o Single Bits o Independent o Highly unlikely Example: Suppose a single bit has a one in a million chance of being flipped: Prob( error ) = -6 =. Prob( 2 errors ) = -2 =. Prob( 3 errors ) = -8 =.

Error Detection and Error Correction Two encoding techniques are used to improve the accuracy of binary information during communication and storage: Error-Detecting Codes: Transmit the message and report whether an error occurred: Error/OK! Decoding Algorithm Communication Channel Encoding Algorithm Message: 4

Error Detection and Error Correction Two encoding techniques are used to improve the accuracy of binary information during communication and storage: Error-Detecting Codes: Transmit the message and report whether an error occurred: Error/OK! Decoding Algorithm Communication Channel Encoding Algorithm Message: 5

Error Detection and Error Correction Two encoding techniques are used to improve the accuracy of binary information during communication and storage: Error-Detecting Codes: Transmit the message and report whether an error occurred: Yes/No Decoding Algorithm Communication Channel Encoding Algorithm Message: Error-Correcting Codes: Transmit the message and try to repair any errors: Decoding Algorithm Communication Channel Encoding Algorithm Message: 6

Error Detection Error detection codes are widely used on the Internet because you can always ask for another copy of the message: Receiver w@~*wn5#ljf Sender Um come again? When reading data from storage devices (DVDs, CDs, Hard Disks, Bar Codes, ISBN numbers) you can try reading again, but maybe the medium is damaged: no way to get another copy of the message.. Thus, we need more powerful Error Correcting Codes.

Error Detection Parity methods for error detection are based on counting the number of s: Even Parity = even number of s: Odd Parity = odd number of s: Error Detection Codes use a Parity Bit to force a bit sequence to have even parity: Message Encoded Message (odd) (even) (even) (even) (even) (even) (odd) (even) Note: Message can be any length!

Error Detection No error Check for even parity and delete parity bit Communication Channel Calculate parity bit Message: Error! Check for even parity and delete parity bit Communication Channel Calculate parity bit Message:

Error Detection This method can detect any odd number of bit errors: Message Encoded Message Corrupted Message (o) (e) (odd error) (e) (e) (odd error) (e) (e) (odd 3 errors) (o) (e) (odd 5 errors)

Error Detection BUT it will fail to detect an even number of errors: Message Encoded Message Corrupted Message (o) (e) (even 2 errors) (e) (e) (even 4 errors) When errors are rare and independent, this works well: Recall: Suppose a single bit has a one in a million chance of being flipped: Prob( error ) = -6 =. Prob( 2 errors ) = -2 =.

Error Correction Error Correcting Codes add additional bits to locate the errors; if we know the locations of the errors, we can flip them back! Here s a simple-minded but expensive way to do it, that was used on early space flights: Duplicate each message 3 times: Message: Duplicated message: Receiver looks at the bits in each duplicate, and lets them vote on the correct bit: è..

Error Correction Error Correcting Codes can do better than duplicating 3x, by using parity bits to check where the error occurred; if we know the location, we can flip it back! One parity bit tells you there is an error, but nothing about its location: Two parity bits could tell which half of the message the error occurs in: With three parity bits we can find the exact location in a 4-bit message and repair it by flipping it back to its original value

Error Correction With three parity bits we can find the exact location in a 4-bit message and repair it by flipping it back to its original value B B B 2 B 3 P P P 2 P Message Bits Parity Bits Each message bit is checked by a unique set of 2 or 3 parity bits. B B B 3 B B 2 P P 2 P P 2 B P P P P 2 P B B 2 P P 2 B 3 P P 2 P 2 P 2 B 2 P B B B 2 B 3 P P P 2 P B B B 2 B 3 P P P 2 P B B B 2 B 3 P P 2 P P 2

Error Correction To encode a message, we set the parity bits so that each circle has even parity:

Error Correction Note that 3 bits can represent 2 3 = 8 possibilities, and each of the 7 bits is checked by a unique pattern of 3 parity bits. With no error that s 8 possibilities! P P P 2 Error P 2 No Error P 2 P B 2 P B B B 3 Correct Transmission

Error Correction When only one parity bit is wrong, then that bit must have been flipped: P P P 2 Error P 2 No Error P 2 P B 2 P B B B 3 Incorrect Transmission

Error Correction When two parity bits are wrong, then the error was among B, B, or B 2 and the pattern tells us which one: P P P 2 Error P 2 No Error P 2 P B 2 P B B B 3 Incorrect Transmission

Error Correction When three parity bits are wrong, then the error must have been B 3 : P P P 2 Error P 2 No Error P 2 P B 2 P B B B 3 Incorrect Transmission

Error Correction Thus the decoding step fixes any single error produced by faulty transmission or storage: Corrected Message Corrupted Message Message Correction Encoding Faulty Transmission Parity Check

Error Correction If we want more message bits, we have to add more parity bits, following the idea that K parity bits can check at most 2 K bits: For 4 parity bits: 2 4 = 6 possibilities = no error + 5 bit locations 5 bits total = 4 parity bits + message bits So K parity bits can correct 2 K --K message bits. # Par. Bits # Mess. Bits Total Message Length 3 4 7 4 5 5 26 3 6 57 63 Roughly, to send N bits, we need to add about log 2 ( N ) parity bits; this is a lot better than using 3N bits to duplicate the message 3 times!

Error Correction Error Correcting Codes are used just about everywhere! Receiver Sender Data Transmission Data Storage Applications: Internet (at multiple levels) Cell-phone networks Deep Space probes Communication Satellites DVDs Computer Memory ISBN numbers for books Bar Codes QR-Codes