Professional Documents
Culture Documents
Errors, Error Detection, and Error Control: Learning Objectives
Errors, Error Detection, and Error Control: Learning Objectives
Chapter 6
Learning Objectives
After reading this chapter, you should be able to:
Chapter Outline
1. Introduction
3. Error Prevention
4. Error Detection Techniques
a. Parity checks
• Simple parity
• Longitudinal parity
b. Arithmetic checksum
c. Cyclic redundancy checksum
5. Error Control
a. Do nothing
b. Return a message
• Stop and wait error control
• Sliding window error control
c. Correct the error
7. Summary
Lecture Notes
Introduction
Given that noise is inevitable and errors happen, something needs to be done to detect error
conditions. This chapter examines some of the more common error detection methods and
compares them in terms of efficiency and efficacy. Once an error has been detected, what action
should a receiver take? There are three options: ignore the error, return an error message to the
transmitter, or correct the error without help from the transmitter.
Error Prevention
Since there are so many forms of noise and errors, and since one form of noise or another is
virtually a given, every data transmission system must include precautions to reduce noise and
the possibility of errors. If you can reduce the possibility of noise before it happens, the
transmitting station may not have to slow down its transmission stream. With proper error
prevention techniques, many types of errors can be reduced.
Error Detection Techniques
Despite the best attempts at prevention, errors still occur. If an error is detected, it is typical to
perform some type of request for retransmission. The error detection techniques themselves can
be relatively simple or relatively elaborate. Generally, simple techniques do not provide the same
degree of error checking as the more elaborate schemes. For example, the simplest error
detection technique is simple parity. It adds a single bit to a character of data, but catches the
fewest number of errors. At the other end of the spectrum is the most elaborate and most
effective technique available today: cyclic redundancy checksum. Although it is more complex
and typically adds 16 bits of error detection code to a block of data, it is the most effective error
detection technique ever devised. In between is arithmetic checksum. It adds the transmitted
characters, producing a sum, and appends this sum in some fashion to the end of the transmitted
message. This technique is used in TCP and IP.
Error Control
Once an error is detected in the received data transmission stream, what is the receiver going to
do about it? The receiver can do one of three things: nothing, return a message to the transmitter
asking it to resend the data packet that was in error, or correct the error.
Quick Quiz
1. What is the difference between error prevention, error detection, and error control?
Prevention uses methods to try to keep errors from happening, detection detects an error, and
control is the response when a receiver detects an error.
CRC catches almost all errors, only adds on the average 16 bits to the end of a message, and is
relatively fast to calculate.
Do nothing, return an error message to transmitter, or correct the error with no further
information from transmitter
Discussion Topics
1. Frame relay is a technology that does no error control. If a frame arrives garbled, it is dropped
and frame relay does not inform the transmitter. Is this a reasonable approach?
2. Are there any other examples of famous projects that have failed because of relatively simple
errors (Hubble, Mars probes)? Were these transmission errors or simply data and calculation
errors?
3. Can you create a more advanced error control method than either stop and wait or sliding
window?
Teaching Tips
1. Emphasize that CRC only adds r bits to the end of a message and yet catches almost all errors.
2. Be sure to clarify the differences between error detection, error control or correction, and
forward error correction.
3. Try to enumerate a number of common transmission impairments and the type of noise that
creates that impairment. For example, hearing another conversation while talking on the
telephone: crosstalk. The hiss you hear when you put your ear next to a speaker that is on but not
playing music: white noise.
The constant hiss in the background; the more white noise, the harder it is to interpret the signal.
Too much white noise may lead to signal loss.
Spurious spikes of power that come out of nowhere; it can completely knock out multiple bits.
When the signal from one transmission bleeds into the signal of a second transmission; one
signal may pick up another signal, corrupting the original signal.
4. 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. It
may cause loss of signal.
When a digital signal is repeated over and over and the beginning and ending of the signal
becomes less defined; the problem occurs with discretely increasing and decreasing signals.
6. Which of the noises introduced in this chapter are continuous and which are
noncontinuous?
Decrease
9. What is the ratio of check bits to data bits for simple parity?
10. 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
The polynomial that is used to divide the transmitted message and the received message and
generates a remainder
Do nothing
17. How many packets can be sent at one time using stop-and-wait error control?
One
The receiver or transmitter has waited a fixed period of time and has not heard a response.
21. Why were the window sizes in early sliding window systems so small?
Because buffer size was limited; systems didn’t transmit high volumes of data at high speeds.
Impulse, because it is noncontinuous and appears as an analog waveform, which might make it
difficult to separate from the analog waveform of the data
2. Which is the most difficult type of noise to remove from a digital signal? Why?
Jitter. Regeneration of the signal, which often reduces other forms of noise, can increase the
amount of jitter.
A signal traveling through one wire creates a magnetic field around that wire. If a second wire
runs parallel to the first, a magnetic field passing through the second wire will induce a current in
the second wire.
Coaxial cable
5. Given the character 0110101, what bit will be added to support even parity?
6. Given the character 1010010, what bit will be added to support odd parity?
7. Generate the parity bits and longitudinal parity bits for even parity for the characters
0101010, 0011010, 0011110, 1111110, and 0000110.
Parity
0101010 1
0011010 1
0011110 0
0000110 0
Long. ParityÆ 0101000 0
8. Given the message “Hello, goodbye”, show the decimal arithmetic checksum that will be
generated.
H=72; e=81; l=88; l=88; o=91; etc., and then just add up the ASCII values.
9. List the types of errors that can escape a cyclic redundancy checksum system.
10. List the types of errors that cannot escape a cyclic redundancy checksum system.
Single bit errors, double bit errors, most errors < size r
12. In a stop-and-wait error control system, Station A sends packet 0, and it is lost. What
happens next?
13. In a stop-and-wait error control system, Station A sends packet 0, it arrives without
error, and an ACK is returned, but the ACK is lost. What happens next?
14. In a sliding window error control system in which each packet is numbered, Station A
sends packets 4, 5, 6, and 7. Station B receives them and wants to acknowledge all of them.
What does Station B send back to Station A?
15. In a sliding window system with each byte numbered, Station A sends a packet with
bytes numbered 801 to 900. If the packet arrives with no errors, how does Station B
respond?
16. In a sliding window error control system, Station A sends a packet with bytes 501-700,
followed immediately by a packet with bytes 701-900. 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. Since it doesn’t, the receiver returns an ACK
with value 701.
17. In a sliding window error control system, Station A sends a packet with bytes 501-700,
followed immediately by a packet with bytes 701-900. 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.
Receiver immediately returns an ACK with value 701.
18. In a sliding window error control system, Station A sends a packet with bytes 501-700,
followed immediately by a packet with bytes 701-900. 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.
19. In a sliding window error control system, Station A sends three packets with bytes 0-
100, 101-200, and 201-300, respectively. 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.
Create a diagram of this error control scenario and show the response(s) that Station B will
send. Now assume that five seconds after Station B responds, the second packet shows up.
What does Station B do now?
Receiver sends an ACK with value 101 and buffers packet 201-300. When packet with bytes
101-200 arrives, it is inserted into stream. If packet with bytes 201-300 shows up, it is tossed.
20. Assume a sliding window protocol has a 3-bit field to hold the window size. A three-bit
value gives eight combinations, from 0 to 7. Why then can a transmitter send out only a
maximum of seven frames at one time and not eight? Show an example.
If you sent all eight frames 0-7, and none arrived, you might say that you are waiting for frame 0.
But is that the frame 0 that was lost, or the next frame 0 after frame 7?
21. If a 7-bit sliding window size is used, how many packets can be sent before the
transmitter has to stop and wait for an acknowledgment?
Half-duplex
23. Devise a code set for the digits 0 to 9 that has a Hamming distance of 2.
There are many possible answers. The 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.
24. A system is going to transmit the byte 10010100. Show the four check bits c8, c4, c2, and
c1 that will be added to this byte.
c8 = error, c4 = error, c2 = no error, c1 = no error; error bits = 1100, so bit number 12 is in error
2. This problem was solved in the Error Detection In Action section of this chapter.
4. Yes, if another higher layer protocol can do the error control instead