Errors, Error Detection, and Error Control

Chapter 6

Learning Objectives
After reading this chapter you should be able to:

 Identify the different types of noise commonly found in computer networks
 Specify the different error prevention techniques and be able to apply an error prevention
technique to a type of noise
 Compare the different error detection techniques in terms of efficiency and efficacy
 Perform simple parity and longitudinal parity calculations and enumerate their strengths and
weaknesses
 Cite the advantages of cyclic redundancy checksum and specify what types of errors cyclic
redundancy checksum will detect
 Cite the advantages of arithmetic checksum, and specify what types of applications use
arithmetic checksum.
 Differentiate the basic forms of error control and describe under what circumstances each
may be used
 Follow an example of a Hamming self-correcting code

Chapter Outline
1. Introduction

2. Noise and Errors
a. White noise
b. Impulse noise
c. Crosstalk
d. Echo
e. Jitter
f. Delay distortion
g. Attenuation

3. Error Prevention

4. Error Detection Techniques
a. Parity checks

or correct the error without help from the transmitter. microwave. Return a message  Stop and wait error control  Sliding window error control c. Error Prevention Since there are so many forms of noise and errors. Satellite. what action should a receiver take? There are three options: toss the frame/packet. Copper-based media have traditionally been plagued with many types of interference and noise. and radio networks are also prone to interference and crosstalk. something needs to be done to detect error conditions. Arithmetic checksum c. return an error message to the transmitter. Even near- perfect fiber optic cables can introduce errors into a transmission system. and since one form of noise or another is virtually a given. Once an error has been detected. Error Detection In Action 7. Summary Lecture Notes Introduction Given that noise is inevitable and errors happen. This chapter examines some of the more common error detection methods and compares them in terms of efficiency and efficacy. Toss the frame/packet b. If you can reduce the possibility of noise before it happens. every data transmission system must include precautions to reduce noise and the possibility of errors. . the transmitting station may not have to slow down its transmission stream. Cyclic redundancy checksum 5. Correct the error 6. Noise and Errors Transmitted data—both analog and digital—are susceptible to many types of noise and errors. With proper error prevention techniques. Error Control a. though the probability of this happening is less than with the other types of media.  Simple parity  Longitudinal parity b. many types of errors can be reduced.

detection detects an error. it is the most effective error detection technique ever devised. What are the advantages of CRC over other error detection methods? CRC catches almost all errors. In between is arithmetic checksum. simple techniques do not provide the same degree of error checking as the more elaborate schemes. what is the receiver going to do about it? The receiver can do one of three things: toss the frame/packet (which is essentially doing nothing). At the other end of the spectrum is the most elaborate and most effective technique available today: cyclic redundancy checksum. and is relatively fast to calculate. error detection. Generally. only adds on the average 16 bits to the end of a message. It adds the transmitted characters. or correct the error. What are the three basic forms of error control? . The error detection techniques themselves can be relatively simple or relatively elaborate. To transmit data with error checking capabilities. but catches the fewest number of errors. Quick Quiz 1. you will examine two different error detection schemes and their probabilities of detecting errors. 3. producing a sum. For example. it is typical to perform some type of request for retransmission. Error Detection and Error Control In Action This In Action example examines a company that has to send data between two locations. and error control? Prevention uses methods to try to keep errors from happening. errors still occur. 2.Error Detection Techniques Despite the best attempts at prevention. the simplest error detection technique is simple parity. and control is the response when a receiver detects an error. Although it is more complex and typically adds 16 bits of error detection code to a block of data. If an error is detected. return a message to the transmitter asking it to resend the data packet that was in error. It adds a single bit to a character of data. Error Control Once an error is detected in the received data transmission stream. and appends this sum in some fashion to the end of the transmitted message. What is the difference between error prevention. This technique is used in TCP and IP.

2. The hiss you hear when you put your ear next to a speaker that is on but not playing music: white noise. Too much white noise may lead to signal loss. Try to enumerate a number of common transmission impairments and the type of noise that creates that impairment. Frame relay is a technology that does no error control. Solutions to Review Questions 1. 3. and forward error correction. If a frame arrives garbled. hearing another conversation while talking on the telephone: crosstalk. What is white noise and how does it affect a signal? The constant hiss in the background. return an error message to transmitter. Is this a reasonable approach? 2. Are there any other examples of famous projects that have failed because of relatively simple errors? (Hubble. The more white noise. 3. What is crosstalk and how does it affect a signal? . the harder it is to interpret the signal. Emphasize that CRC only adds r bits to the end of a message and yet catches almost all errors. For example.Toss the frame/packet. What is impulse noise and why is it the most disruptive? Spurious spikes of power that come out of nowhere. error control or correction. Can you create a more advanced error control method than either stop and wait or sliding window? Teaching Tips 1. Mars probes) Were these transmission errors or simply data and calculation errors? 3. or correct the error with no further information from transmitter. Can completely knock out multiple bits. it is dropped and frame relay does not inform the transmitter. Be sure to clarify the differences between error detection. 2. Discussion Topics 1.

11. What is the ratio of check bits to data bits for simple parity? One parity bit to every character (7 or 8 data bits typically). What is jitter and why is it a digital signal problem? When a digital signal is repeated over and over and the beginning and ending of the signal becomes less defined. Will proper shielding of a media increase or decrease the chance of errors? Decrease. 6. What types of error will longitudinal parity not detect? An even-numbered bits of error in exactly the same columns. 7. 4. What is the difference between even parity and odd parity? Even parity: maintain an even number of 1s. 5. Which of the noises introduced in this chapter are continuous and which are non- continuous? All are continuous except impulse. 10.When the signal from one transmission bleeds into the signal of a second transmission. what is being added? The ASCII (usually) values of the message to be transmitted. 12. Problem occurs with discretely increasing and decreasing signals. What is the ratio of check bits to data bits for longitudinal parity? One parity bit to every character plus one parity character to a block of data characters. What is echo and how does it affect data transmission? The bouncing back of a signal at the end of a wire can interfere with normal transmissions. those corrupting the original signal. 13. What types of errors will simple parity not detect? An even-numbered bits of error. 9. One signal may pick up another signal. With arithmetic checksum. . May cause loss of signal. 8.

How many packets can be sent at one time using stop-and-wait error control? One. What condition must be met for error correction to be performed? Long transfer delays. 15. 16. What are two different ways to number sequences of data? Count the packets and count the bytes 23. What is a generating polynomial? The polynomial that is used to divide the transmitted message and the received message and generates a remainder. Why were the window sizes in early sliding window systems so small? Because buffer size was limited.14. or high security needs Suggested Solutions to Exercises 1. 17. In communication systems what does timeout mean? The receiver or transmitter has waited a fixed period of time and has not heard a response. 19. Frame relay practices which form of error control? Do nothing. What is the function of an ACK in the stop-and-wait error control? To acknowledge no errors found. 21. Which type of noise is the most difficult to remove from an analog signal? Why? . What types of errors will cyclic checksum not detect? Very small percentage of errors >= r bits in length. What is the function of a NAK in the stop-and-wait error control? To respond that an error was found. systems didn’t transmit high volumes of data at high speeds 22. 20. 18.

3. can increase the amount of jitter. 4. e=81. o=91. Parity 0101010 1 0011010 1 0011110 0 0000110 0 Long. H=72. Generate the parity bits and longitudinal parity bits for even parity for the characters 0101010. Given the character 0110101. because it is non-continuous and appears as an analog waveform.Impulse. etc and then just add up the ASCII values. List the types of errors that can escape a cyclic redundancy checksum system. 9. 0011110. which might make it difficult to separate from the analog waveform of the data. Which type of noise is the most difficult to remove from a digital signal? Why? Jitter. what bit will be added to support even parity? 0 6. Parity 0101000 0 8. which often reduces other forms of noise. 0011010. 2. l=88. Explain the relationship between twisted pair wires and crosstalk. If a second wire runs parallel to the first. A signal traveling through one wire creates a magnetic field around that wire. and 0000110. Given the character 1010010. 1111110. Which type of cable is most susceptible to echo? Coaxial cable 5. show the decimal arithmetic checksum that will be generated. a magnetic field passing through the second wire will induce a current in the second wire. goodbye”. Error bursts > size r . l=88. Regeneration of the signal. Given the message “Hello. what bit will be added to support odd parity? 0 7.

Station A sends packet 0. What happens next? Station B responds with a NAK. In a sliding window system with each byte numbered. . Station A sends packet 0. followed immediately by a packet with bytes 701-900. and an ACK is returned. 13. Create a diagram of this error control scenario and show the response(s) that Station B will send if both packets arrive but there is a checksum error in the second packet. 17. Station A sends a packet with bytes 501-700. In a stop-and-wait error control system. If the packet arrives with no errors. Station A will retransmit packet 0.10. and it is lost. Station A sends a packet with bytes numbered 801 to 900. In a stop-and-wait error control system. the receiver returns an ACK with value 701. In a sliding window error control system. and 7. Since it doesn’t. double bit errors. most errors < size r 11. followed immediately by a packet with bytes 701-900. What happens next? After a timeout. Why do all the CRC generating polynomials end with a 1? So that all odd numbers of bit errors can be detected. List the types of error that cannot escape a cyclic redundancy checksum system. What does Station B send back to Station A? An ACK with the number of the next packet expected 15. how does Station B respond? An ACK with the value 901 16. Receiver immediately returns an ACK with value 701. Create a diagram of this error control scenario and show the response(s) that Station B will send if the second packet is lost in the network. Receiver waits 500 ms for second packet to arrive. but the ACK is lost. Station A sends packets 4. Single bit errors. Station A sends a packet with bytes 501-700. 12. 14. 5. it arrives without error. In a sliding window error control system in which each packet is numbered. Station B receives them and wants to acknowledge all of them. 6. In a sliding window error control system.

it is tossed. c4. the second packet shows up. In a sliding window error control system. it is inserted into stream. c4. The 12-bit string 010111110010 with embedded Hamming code bits (c8. Same answer as in problem 16. Devise a code set for the digits 0 to 9 that has a Hamming distance of 2. Station A sends three packets with bytes 0- 100. Create a diagram of this error control scenario and show the response(s) that Station B will send. 20.18. c2 and c1) has just arrived. Create a diagram of this error control scenario and show the response(s) that Station B will send if both packets arrive but there is a checksum error in the second packet. you might say that you are waiting for frame 0. followed immediately by a packet with bytes 701-900. If you sent all 8 frames 0 . In a sliding window error control system. If a 7-bit sliding window size is used. or the next frame 0 after frame 7? 21. If packet with bytes 201-300 shows up. Check bits c8. Assume a sliding window protocol has a 3-bit field to hold the window size. and 201-300. What does Station B do now? Receiver sends an ACK with value 101 and buffers packet 201-300. how many packets can be sent before the transmitter has to stop and wait for an acknowledgment? 127 (not 128) 22. which bit is in error? . Show the four check bits c8. Is Stop-and-wait error control a half duplex protocol or a full duplex protocol? Half duplex 23. Many possible answers. c2. c4. The second packet with bytes 101-200 is held up somewhere in the network long enough that the third packet arrives before the second one. But is that the frame 0 that was lost. A three-bit value gives 8 combinations. 101-200. respectively. c1: 0 0 1 1 Transmitted 12-bit code: 1 0 0 1 0 0 1 0 0 0 1 1 25. 24.7. Simplest would be to count from 0 to 9 using a 4-bit binary number and add a simple parity bit to the end of each. Is there an error? If so. Station A sends a packet with bytes 501-700. 19. A system is going to transmit the byte 10010100. from 0 to 7. When packet with bytes 101-200 arrives. Why then can a transmitter send out only a maximum of 7 frames at one time and not 8? Show an example. and none arrived. c2 and c1 that will be added to this byte. Now assume that five seconds after Station B responds.

in ASCII. To properly answer this problem. A = 01000001.c8 = error. if another higher layer protocol can do the error control instead. This problem was solved in the Error Detection in Action section of this chapter. TCP/IP uses a window size of 16 bits. you only need to send an acknowledgment after every 7 records. so bit number 12 is in error. so 65. This should reduce the acknowledgment waiting time to 1/7 that of stop-and-wait. Yes. we really need to know the propagation time of the records through the medium. c1 = no error. 3. 4. 26. error bits = 1100.536 bytes can be sent. c4 = error. because a lot of time is going to be spent waiting for the stop-and-wait acknowledgment to be returned after every record. c2 = no error. 2. Construct a 12-bit Hamming code for the characters A and 3. 3 = 00110011 12-bit Hamming code for A = 0 1 0 0 1 0 0 0 0 1 0 0 12-bit Hamming code for 3 = 0 0 1 1 0 0 0 1 1 1 0 1 Thinking Outside the Box 1. . In ASCII. With a sliding window protocol and a window size of 7.