Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.

Slides:



Advertisements
Similar presentations
Hamming Code.
Advertisements

10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
Chapter 10 Error Detection and Correction
Error Detection / Correction
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 11 Introduction to Computer Networks.
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.
Error detection and correction
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.
Error Detection and Correction
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Error Detection and Reliable Transmission EECS 122: Lecture 24 Department of Electrical Engineering and Computer Sciences University of California Berkeley.
Organization of a Simple Computer. Computer Systems Organization  The CPU (Central Processing Unit) is the “brain” of the computer. Fetches instructions.
Error Detection and Correction Rizwan Rehman Centre for Computer Studies Dibrugarh 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.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Topic 2 – Introduction to Computer Codes. Computer Codes A code is a systematic use of a given set of symbols for representing information. As an example,
Fuw-Yi Yang1 數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi.
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.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Link Layer: Error Detection and Correction
Chapter 10. Error Detection and Correction
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
ENEE244-02xx Digital Logic Design Lecture 3. Announcements Homework 1 due next class (Thursday, September 11) First recitation quiz will be next Monday,
Practical Session 10 Error Detecting and Correcting Codes.
ECE453 – Introduction to Computer Networks Lecture 4 – Data Link Layer (I)
Error Detection and Correction
Computer Science Division
Error Detection and Correction
VLSI AND INTELLIGENT SYTEMS LABORATORY 12 Bit Hamming Code Error Detector/Corrector December 2nd, 2003 Department of Electrical and Computer Engineering.
ERROR DETECTING AND CORRECTING CODES -BY R.W. HAMMING PRESENTED BY- BALAKRISHNA DHARMANA.
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.
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.
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.
Chapter 10 Error Detection And Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
Error Detection and Correction
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 PART III: DATA LINK LAYER ERROR DETECTION AND CORRECTION 7.1 Chapter 10.
Data Communications and Networking
Error-Detecting and Error-Correcting Codes
1 Digital Design Debdeep Mukhopadhyay Associate Professor Dept of Computer Science and Engineering NYU Shanghai and IIT Kharagpur.
Hamming Distance & Hamming Code
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Computer Architecture Error Correcting Codes Ralph Grishman Oct (Text pp and B-65-67) NYU.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Error Correction/Detection.
Practical Session 10 Computer Architecture and Assembly Language.
Computer Architecture and Assembly Language
Error Detection and Correction
Error Correcting Code.
EEC-484/584 Computer Networks
EEC-484/584 Computer Networks
Error Detection and Correction
Error Detection and Correction
Reliability and Channel Coding
Computer Architecture and Assembly Language
Reliability and Channel Coding
Types of Errors Data transmission suffers unpredictable changes because of interference The interference can change the shape of the signal Single-bit.
Chapter 10 Error Detection and Correction
Presentation transcript:

Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization & Assembly Language Lecture 7 (Computer System Organization) Error Detection & Correction

 From Text Book:  Error Detection & Error Correction  Hamming Distance  Hamming Algorithm 2Error Detection & Error Correction

3  Computer memories could make errors due to electric spikes leading to incorrect behavior  To protect against such behavior, two ways are adopted 1.Error-detection codes 2.Error-Correction codes  Extra bits are added to the memory word in a special way so that when the word is read out from memory these extra bits are checked for errors

4Error Detection & Error Correction  Consider a memory word of size m bits to which r redundant check bits are added  The total length of the unit is n = m+ r  This n bit unit is called a code word m r n (codeword)

5Error Detection & Error Correction  Exclusive OR (XOR) is used to know the number of bits that differ between two code words  Example  Hamming Distance is the number of bit positions in which two valid code words differ  In the above example it is 3

6Error Detection & Error Correction  With m-bit memory word, 2 m words are valid (i.e. all word combinations)  With n-bit code words, only 2 m out of 2 n will be valid.  If an invalid code word is read out of memory, the computer knows that an error occurred  There are algorithms for computing the check bits  Using this algorithm, the set or list of valid code words could be set  Compute the hamming distance between the code words  The minimum hamming distance computed will set the

7Error Detection & Error Correction  With m-bit memory word, 2 m words are valid (i.e. all word combinations)  With n-bit code words, only 2 m out of 2 n will be valid.  If an invalid code word is read out of memory, the computer knows that an error occurred  There are algorithms for computing the check bits and setting the list of valid code words  Compute the hamming distance (HD) between the code words ( two at a time)  The minimum hamming distance computed will set the Code Hamming Distance

8Error Detection & Error Correction  Error-detecting and error-correcting properties of a code depends on its hamming distance  To detect d single bit errors in a code word read A distance d + 1 code is needed (minimum HD between 2 code words)  With such a code there is no way that d single-bit errors can change a valid codeword into another valid code word  To correct d single bit errors in a code word read A distance 2d + 1 code is needed (minimum HD between 2 code words)  the valid code words are so far apart that even with d changes, the original codeword is still closer than any other codeword, so it can be uniquely determined

9Error Detection & Error Correction  Consider the word , adding a parity bit  Even parity, to have even number of 1s   Odd parity, to have odd number of 1s   The code with such a parity bit will have a hamming distance of 2, as it will take 2 single bit error to move from one code word to another  With this, a single error could be detected  No errors could be corrected  When the error is detected, an error signal is set and the program will stop running

10Error Detection & Error Correction  Consider the following code that has only 4 valid code words , , ,  The hamming distance of the code is 5  Single-bit errors that could be detected is 4  Single-bit errors that could be corrected is 2  If the code word is received  If there is only a double error, then the computer knows that the value should be  If there is a triple error, (the three lower ones are wrong) then the error wouldn’t be corrected

11Error Detection & Error Correction A BC Encoding of 1100 A BC Even parity added 0 01 A BC Error in AC 0 01 error

12Error Detection & Error Correction  Hamming algorithm is used to build error correcting codes for any memory word size  In a hamming code, r parity bits are added to m bit data word forming a new word of length n = m + r  The bits are numbered starting at 1 (not 0) with bit 1 the leftmost (high order) bit.  All bits whose bit numbers are a power of 2 are parity bits  All other bits are data bits

13Error Detection & Error Correction  Ex. 16-bit word  Each of the parity bits checks specific bit positions  The parity bit is set so that the number of 1s in the bit positions checked is even  Bit 1 checks bits: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21  Bit 2 checks bits: 2, 3, 6, 7, 10, 11, 14, 15, 18, 19  Bit 4 checks bits: 4, 5, 6, 7, 12, 13, 14, 15, 20, 21  Bit 8 checks bits: 8, 9, 10, 11, 12, 13, 14, 15  Bit 16 checks bits: 16, 17, 18, 19, 20,

14Error Detection & Error Correction  Ex. 16-bit word  Each of the parity bits checks specific bit positions  The parity bit is set so that the number of 1s in the bit positions checked is even  Bit 1 checks bits: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21  Bit 2 checks bits: 2, 3, 6, 7, 10, 11, 14, 15, 18, 19  Bit 4 checks bits: 4, 5, 6, 7, 12, 13, 14, 15, 20, 21  Bit 8 checks bits: 8, 9, 10, 11, 12, 13, 14, 15  Bit 16 checks bits: 16, 17, 18, 19, 20,

15Error Detection & Error Correction  Ex. 16-bit word  In general, bit b is checked by those bits b1, b2,... bj such that b1 + b bj = b.  Ex. Bit 5 is checked by bits 1 and 4  = 5.  Ex. Bit 7 is checked by bits 1, 2 and 4  =

16Error Detection & Error Correction  Ex. 16-bit word =  If bit 5 was inverted (0 instead of 1):  The 5 parity bits will be checked, with the following results:  Parity bit 1 incorrect (1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21 contain five 1’s).  Parity bit 2 correct (2, 3, 6, 7, 10, 11, 14, 15, 18, 19 contain six 1’s).  Parity bit 4 incorrect (4, 5, 6, 7, 12, 13, 14, 15, 20, 21 contain five 1’s).  Parity bit 8 correct (8, 9, 10, 11, 12, 13, 14, 15 contain two 1’s).  Parity bit 16 correct (16, 17, 18, 19, 20, 21 contain four 1’s).  Add up all incorrect parity bits = 5 5 was inverted