
Go backward to Framing
Go up to Top
Error Detection and Correction
- A significant role of the Data Link layer is to
convert the potentially unreliable physical link
between two machines into an apparently very
reliable link.
- This is done by including redundant information in
each transmitted frame. Depending on the nature
of the link and the data one can either:
- include just enough redundancy to make it possible
to detect errors and then arrange for the retransmission
of damaged frames, or
- include enough redundancy to enable the receiver to
correct any errors produced during transmission.
Most current networks take the former approach.
- Codes for detecting (and even for correcting) errors are
largely based on generalizing the simple notion of a
parity bit.
- Given a set of bits, a parity bit is an extra binary
digit added to the group so that the total number
of one's in the group is even (or odd if you prefer).
- For example, a few "random" bytes of binary data
are shown below with appropriate digits added as
parity bits in a ninth column.
0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
0 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 1 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
|
- Used in this simple way, parity bits are a rather weak mechanism
for detecting errors.
- A single parity bit can not detect any error in which
an even number of bits are changed.
- Errors in real communication lines tend to effect many
consecutive bits rather than one isolated bit (these
are called burst errors.
- By associating several parity bits with a message so that
each parity bit is determined by a different subset of the
message bits and being clever about the placement of the
parity bits one can do much better.
- Simply adding two bits per byte with one bit for the
odd positions and one for the evens enables one to
recognize any error of up to three bits.
- If one organized data into a table, adds a column of
parity bits as above and then sends the data by
columns from left to right, one can detect
any error whose length is less than two columns.
Computer Science 336
Department of Computer Science
Williams College