0% found this document useful (0 votes)
62 views

Error Control: of Detecting Errors Combined With A Relatively Low Number of Redundant Bits

Bit errors may occur during data transmission and need to be detected and corrected. There are two main approaches for dealing with errors - notify the sender to retransmit the message or use error correcting codes to reconstruct the corrupted message. Error detection works by adding redundant bits that are checked at the receiver to determine if errors occurred. Common error detection techniques discussed include two-dimensional parity, internet checksum, and cyclic redundancy check (CRC). CRC maximizes error detection using a small number of redundant bits by creating a polynomial for transmission that is divisible by an agreed-upon divisor polynomial.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Error Control: of Detecting Errors Combined With A Relatively Low Number of Redundant Bits

Bit errors may occur during data transmission and need to be detected and corrected. There are two main approaches for dealing with errors - notify the sender to retransmit the message or use error correcting codes to reconstruct the corrupted message. Error detection works by adding redundant bits that are checked at the receiver to determine if errors occurred. Common error detection techniques discussed include two-dimensional parity, internet checksum, and cyclic redundancy check (CRC). CRC maximizes error detection using a small number of redundant bits by creating a polynomial for transmission that is divisible by an agreed-upon divisor polynomial.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Error Control

Bit errors may be sometimes introduced into the frames due to electrical
interference and noise. These errors need to be detected and corrected.
Whenever a recipient receives a message and detects error in the received
message, it can handle the situation in two ways:
1. Notify the sender about the error so that the sender retransmit the
message once again
or
2. Reconstruct the message from the corrupted message using error
correcting codes
The basic idea behind any error detection scheme is to add redundant
information to a frame that can be used to determine if errors have been
introduced. In the extreme, we could imagine transmitting two complete
copies of the data. If the two copies are identical at the receiver, then it is
probably the case that both are correct. If they differ, then an error was
introduced into one (or both) of them, and they must be discarded.
This is a rather poor error detection scheme for two reasons.
First, it sends n redundant bits for an n-bit message.
Second, many errors will go undetectedany error that happens to
corrupt the same bit positions in the first and second copies of the
message.
In general, the goal of error detecting codes is to provide a high probability
of detecting errors combined with a relatively low number of redundant bits.
Hence the objective is to provide quite strong error detection capability while
sending only
k redundant bits for an n-bit message, where k n (k being very small
compared to n)
We say that the extra bits we send are redundant because they add no new
information to the message. Instead, they are derived directly from the
original message using some well-defined algorithm. Both the sender and
the receiver know exactly what that algorithm is. The sender applies the
algorithm to the message to generate the redundant bits. It then transmits
both the message and those few extra bits. When the receiver applies the
same algorithm to the received message, it should (in the absence of errors)
come up with the same result as the sender. It compares the result with the
one sent to it by the sender. If they match, it can conclude (with high
likelihood) that no errors were introduced in the message during
transmission. If they do not match, it can be sure that either the message or
the redundant bits were corrupted, and it must take appropriate actionthat
Reference: Computer Networks- A systems approach by Larry Peterson and Bruce Davie,
Fifth Edition, Morgan Kaufman Publishers

is, discarding the message or correcting it if that is possible. The extra


redundant bits thus added are called Error Detecting Codes.
In the following section, three of such error detecting techniques are
discussed

1. Two Dimensional Parity


It is based on simple (one-dimensional) parity, which usually involves
adding one
extra bit to a 7-bit code to balance the number of 1s in the byte to give total
of either odd number of 1s(odd parity) or even number of 1s(even parity)
In addition to usual parity bit calculation for each byte, Two-dimensional
parity does a similar calculation for each bit position across each of the bytes
contained in the frame. This results in an extra parity byte for the entire
frame, in addition to a parity bit for each byte.
Below figure illustrates how two-dimensional even parity works for an
example frame containing 6 bytes of data.

The frame shown in the example contains 6 bytes. Each byte contains 7 bits
of original information. Eighth bit is parity bit. This bit is set to 1 or 0
according to the number of 1s in the byte so that total number of 1s in any
byte is even.
Parity byte at the very bottom is calculated by counting 1s in the same bit
position across all 6 frames and adding a bit accordingly to make the number
of 1s in the given bit position even.
The shown example contains 6 bytes and each byte contains 7 bits of
original information. Hence 42 bits of original information is carried. In order
to facilitate error detection 14 redundant bits are added (Parity byte at the
bottom 8+ 1 parity bit per byte for each of the 6 bytes in the frame 6=> 8+6
=14)
Two-dimensional parity catches all 1-, 2-, and 3-bit errors, and most 4-bit
errors.
Reference: Computer Networks- A systems approach by Larry Peterson and Bruce Davie,
Fifth Edition, Morgan Kaufman Publishers

Though the error detection capability of this scheme is good, the length of
the error detecting code is inconsistent as the number of redundant bits
added depends on the length of the original message

2. Internet Checksum Algorithm


A second approach to error detection is Internet checksum. Although it is not
used at the link level, it almost provides the same sort of functionality as
CRCs and parity.
The idea behind the Internet checksum is very simpleyou add up all the
words that are transmitted and then transmit the result of that sum. The
result is the checksum. The receiver performs the same calculation on the
received data and compares the result with the received checksum. If any
transmitted data, including the checksum itself, is corrupted, then the results
will not match, so the receiver knows that an error occurred.
The exact checksum scheme used by the Internet protocols works as follows.
Consider the data being checksummed as a sequence of 16-bit integers. Add
them together using 16-bit ones complement arithmetic and then take the
ones complement of the result. That 16-bit number is the checksum.
This algorithm scores well for using a small number of redundant bitsonly
16 for a message of any length and easy implementation. But it does not
score extremely well for strength of error detection. For example, a pair of
single-bit errors, one of which increments a word and one of which
decrements another word by the same amount, will go undetected.
This scheme is mostly used as a end-to-end error detection mechanism on
top of more powerful techniques such as CRC at link level to check majority
of errors at link level.

3. Cyclic Redundancy Check


Cyclic redundancy checks maximize the probability of detecting errors using
only a small number of redundant bits
To start, think of an (n+1)-bit message as being represented by an n degree
polynomial, that is, a polynomial whose highest-order term is xn.
For example, an 8-bit message consisting of the bits 10011010 corresponds
to
the polynomial
M(x) =(1x7)+(0x6 )+(0x5 )+(1x4)+(1x3 )+(0x2) +(1x1)+(0x0)
=x7 +x4 +x3 +x1
Reference: Computer Networks- A systems approach by Larry Peterson and Bruce Davie,
Fifth Edition, Morgan Kaufman Publishers

For the purposes of calculating a CRC, a sender and receiver have to agree
on a divisor polynomial, C(x). C(x) is a polynomial of degree k. For example,
suppose C(x) = x3 +x2 +1. In this case, k = 3.
Choice of C(x) has a significant impact on what types of errors can be reliably
detected. Hence C(X) is chosen from a handful of divisor polynomials that are
very good choices for various environments, and the exact choice is normally
made as part of the protocol design. For example, the Ethernet standard
uses well-known polynomial of degree 32.
CRC is computed by creating a polynomial for transmission that is derived
from the original message M(x) and is k bits longer than M(x), and is exactly
divisible by C(x). This is achieved by performing following steps:
1. Multiply M(x) by xk; that is, add k zeros at the end of the message.
2. Call this zero-extended message T(x).
3. Divide T(x) by C(x) and find the remainder.
4. Subtract the remainder from T(x).
Use long division method for step 3 and use modulo 2 arithmetics(i.e use
XOR operation for subtraction)
Consider the example given below:
M(x) = x7 +x4 +x3 +x or 10011010
C(x) = x3+x2+1 or 1101
Since k=3 , add three zeros at the end of M(x)
T(x) = 10011010000
Now perform long division using XOR operation

Take reminder 101 and subtract from M(x) : i.e XOR 10011010000 with 101
to obtain P(x).
P(x) = 10011010101
Reference: Computer Networks- A systems approach by Larry Peterson and Bruce Davie,
Fifth Edition, Morgan Kaufman Publishers

This P(x) would be transmitted. The receiver would be aware of the CRC
mechanism and divisor polynomial used. Hence it divides the received
message with the C(X).
If c(x) divides the received message evenly i.e with no reminder, receiver
concludes that the message has been received without any error
Else, if the division of received message by c(x) produces a reminder, then
the receiver concludes that the received message contains error.
The only way that an error could slip by undetected is when the error
introduced, say E(x) can be divided evenly by C(x). The trick is to pick C(x) so
that this is very unlikely for common types of errors.
In general, it is possible to prove that the following types of errors can be
detected by a C(x) with the stated properties:
1. All single-bit errors, as long as the xk and x0 terms have nonzero
coefficients
2. All double-bit errors, as long as C(x) has a factor with at least three
terms
3. Any odd number of errors, as long as C(x) contains the factor (x+1)
4. Any burst error (i.e., sequence of consecutive errored bits) for which
the length of the burst is less than k bits (Most burst errors of length
greater than k bits can also be detected.)
Note:
The use of error-correcting codes in networking is sometimes referred to as forward error
correction (FEC) because the correction of errors is handled in advance by sending extra
information, rather than waiting for errors to happen and dealing with them later by
retransmission. FEC is commonly used in wireless networks such as 802.11.

Reference: Computer Networks- A systems approach by Larry Peterson and Bruce Davie,
Fifth Edition, Morgan Kaufman Publishers

You might also like