Error Correcting Code.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Hamming Code.
parity bit is 1: data should have an odd number of 1's
CSCI 4717/5717 Computer Architecture
Parity Generator and Checker
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Quantum Error Correction SOURCES: Michele Mosca Daniel Gottesman Richard Spillman Andrew Landahl.
Error Detection / Correction
PART III DATA LINK LAYER. Position of the Data-Link Layer.
EECC341 - Shaaban #1 Lec # 3 Winter Binary Multiplication Multiplication is achieved by adding a list of shifted multiplicands according.
Unit 1 Protocols Learning Objectives: Understand the need to detect and correct errors in data transmission.
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.
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Error Detection and Correction
Digital Logic Design Lecture 3 Complements, Number Codes and Registers.
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
Unit 5 Lecture 2 Error Control Error Detection & Error Correction.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
1 Representation of Data within the Computer Oct., 1999(Revised 2001 Oct)
Copyright © Curt Hill Error detection and correction Techniques to Increase the Reliability.
VLSI AND INTELLIGENT SYTEMS LABORATORY 12 Bit Hamming Code Error Detector/Corrector December 2nd, 2003 Department of Electrical and Computer Engineering.
Data Link Layer. Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless.
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
Error-Detecting and Error-Correcting Codes
Practical Session 10 Computer Architecture and Assembly Language.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
10.1 Types of Errors 10.2 Detection 10.3 Error Correction.
CS Introduction to Operating Systems
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.
Department of Computer Science Georgia State University
parity bit is 1: data should have an odd number of 1's
Signed binary numbers & Binary Codes
Computer Architecture and Assembly Language
ERROR DETECTION AND CORRECTION
ERROR CORRECTING CODES
Character coding schemes
… General Decoder for a Linear Block Code … …
Error detection and correction
Number systems and codes
Introduction to Chapter 2
Binary Arithmetic Binary arithmetic is essential in all digital computers and in many other types of digital systems. Addition, Subtraction, Multiplication,
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.
Part III Datalink Layer 10.
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.
Dhanushiya. R I YEAR BSc COMPUTER TECHNOLOGY.  Error is a condition when the output information does not match with the input information. During transmission,
MAT 105 Spring 2008 Chapter 17: Binary Codes.
PART III Data Link Layer.
Dr. Clincy Professor of CS
Objectives TO UNDERSTAND THAT CAPTURING DATA IS VALIDATED AND VERIFIED TO CHECK THAT IT IS REASONABLE AND CORRECT.
Chapter 9 Error Detection and Correction
Dr. Clincy Professor of CS
RAID Redundant Array of Inexpensive (Independent) Disks
Fundamentals of Data Representation
Error Correction Codes
Protocols and the TCP/IP Suite
Chapter 9 Error Detection and Correction
CS 325: CS Hardware and Software Organization and Architecture
Computer Architecture and Assembly Language
Reliability and Channel Coding
parity bit is 1: data should have an odd number of 1's
Lesson 3.7 Parity Error Checking
Error Detection and Correction
4-Bit Register Built using D flip-flops:
Error Detection Learning Objectives:
Presentation transcript:

Error Correcting Code

Consider a 16 bit sequence Consider a 16 bit sequence. We number the bits from left to right, starting with 1. We add parity bits at the powers of 2: 1,2,4,8,16 to make a total of 21 bits. Add a final bit at the end, bit 22. We place the data bits in the other positions in order left to right. Bit 1 is the parity bit for positions that have a low order 1 bit in binary: 1,3,5,7,9,11,13,15,17,19, 21 Bit 2 is the parity bit for positions that have a 1 in the binary position for 2: 2,3, 6,7, 10,11, 14,15, 18,19 Bit 4 is the parity bit for positions that have a 1 in the binary position for 4: 4,5,6,7, 12,13,14,15, 20,21 Bit 8 is the parity bit for positions that have a 1 in the binary position for 8: 8,9,10,11,12,13,14,15, Bit 16 is the parity bit for positions that have a 1 in the binary position for 16: 16,17,18,19,20,21

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 p1 _ _ _ _ _ _ _ _ _ _ p2 _ _ _ _ _ _ _ _ _ p4 _ _ _ _ _ _ _ _ _ p8 _ _ _ _ _ _ _ p16 _ _ _ _ _ Note that each non-parity position is covered by two or more parity bits, namely the ones that correspond to the binary value for that number. For example, 13 is covered by p1, p4, and p8 and 13 = 1 + 4+ 8.

Given a 16 bit number, 1010 1110 0101 1101, we place its bits in the non-parity positions. We calculate the parity bits to create even parity for each group. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 0 1 0 1 1 1 0 0 1 0 1 1 1 0 1 p1 1 0 0 1 1 0 0 1 1 1 p2 1 1 0 1 1 1 0 1 1 p4 0 1 0 0 0 1 0 0 1 p8 1 1 1 0 0 1 0 p16 1 1 1 0 1 P1 = 0 p2 = 1 p4 = 1 p8 = 0 p16 = 0 The final 21 bit number is 0 1 1 1 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0 1 Finally, we add bit 22 to be an even parity bit for the whole number, in this case a 0. 0 1 1 1 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0 1 0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 0 1 1 1 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0 1 0 In memory, for the original 16 bit number, we store the 22 bits. The circuits to create the parity bits as we go to memory are quite simple. Then when we retrieve the number, we check the parity of the given patterns. For example, suppose the number we read from memory is this: 0 1 1 1 0 1 0 0 1 1 1 0 0 1 1 0 1 1 1 0 1 0 p1 _ _ _ _ _ _ _ _ _ _ p2 _ _ _ _ _ _ _ _ _ p4 _ _ _ _ _ _ _ _ _ p8 _ _ _ _ _ _ _ p16 _ _ _ _ _ Add the bits in each pattern: p1 = 7, odd; p2 = 9, odd; p4 = 5 odd; p8 = 5, odd; p16 = 4, even. The overall parity is 13, odd. So there is a 1 bit error. We find it by adding the values where the parity bits show error: 1 + 2 + 4 + 8 = 15. Bit 15 is an error and should be flipped to get the correct value: Removing the parity bits we get the correct 16-bit value: 1010 1110 0101 1101

If we had the following value read instead, the analysis would be different. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 0 1 1 1 0 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 p1 _ _ _ _ _ _ _ _ _ _ p2 _ _ _ _ _ _ _ _ _ p4 _ _ _ _ _ _ _ _ _ p8 _ _ _ _ _ _ _ p16 _ _ _ _ _ Add the bits in each pattern: p1 = 7, odd; p2 = 8, odd; p4 = 5 odd; p8 = 4, odd; p16 = 4. p1 and p4 indicate an error. However, the overall parity is 12, even, indicating no error. The only way this can happen is if there are two bits wrong. However, there is no way to tell which two bits! If there are more than two bits wrong, there is no way to know this, and it might read as a correct word or have the wrong bit corrected. This is called Single Error Correct, Double Error Detect: SEC/DED. This is commonly used in memory on computers today. Note that for a 64 bit string, 7 bits are needed to correct a single error and one additional one to give the overall parity to create SEC/DED. So memory chips often have 72-bit width.