Duplicating each data unit for the purpose of detecting errors is a form of error detection called redundancy. Adding bits for the purpose of detecting errors is called redundancy checking. There are four basic types of redundancy checks:
1. Vertical Redundancy Checking (VRC)
2. Checksum
3. Longitudinal Redundancy Checking (LRC)
4. Cyclic Redundancy Checking (CRC)
METHOD 1:
VERTICAL REDUNDANCY CHECKING (VRC):
● Vertical Redundancy Checking (VRC) is the simplest error detection scheme and is generally referred to as Character parity or simply Parity. With character parity, each character has its own error detection bit called the parity bit. Since the parity bit is not actually a part of the character, it is considered as a redundant bit.
● An “n” character message would have n redundant parity bits. Therefore, the number of Error detection bits are directly proportional to the length of the message.
● Parity can be of two types:
1. Odd parity
2. Even parity
In odd parity, the total number of 1’s in the entire message should be odd whereas in even parity, the total number of 1’s in the message should be even.
● With character parity (VRC), a single parity bit is added to each character to force the total
Number of logic 1’s in the character, including the parity bit, to be either an odd number (odd parity) or an even number (even parity).
● For example, the ASCII code for the letter C is 43H or P1000011, where the P bit is the parity bit. There are three logic 1’s in this code, not counting the parity bit.
● If odd parity is used, the P bit is made logic 0, keeping the total number of logic 1’s at three, which is an odd number.
● If even parity is used, the P bit is made logic 1, making the total number of logic 1’s four, which is an even number.
● The main advantage of parity is its simplicity.
OR
METHOD 2:
LONGITUDINAL REDUNDANCY CHECKING (LRC):
● Longitudinal Redundancy Checking (LRC) is a redundancy error detection scheme that uses parity to determine if a transmission error has occurred within a message and is therefore Sometimes called message parity.
● With LRC, each bit position has a parity bit. In other words, b0 from each character in the Message is XOR’ed with b0 of all the other characters in the message. Similarly, b1 , b2 and so on are XOR’ed with their respective bits from all the characters in the message.
Essentially, LRC is the result of XORing the “character codes” that make up the message, whereas VRC is the XORing of the bits within a single character.
● With LRC, even parity is generally used, whereas with VRC, odd parity is generally used. The LRC bits are computed in the transmitter while the data are being sent and then appended to the end of the message as a redundant character.
● In the receiver, the LRC is recomputed from the data and the recomputed LRC is compared to the LRC appended to the message. If the two LRC characters are the same, most likely no Transmission errors have occurred. If they are different, one or more transmission errors have occurred.
● Let us take an example to show how VRC and LRC ( two dimensional parity checking) are calculated and how they can be used together
Example: Determine the VRC and LRC for the following ASCII encoded message: THE CAT. Use odd parity for the VRC and even parity for the LRC.
The LRC is 00101111 (2FH)
VRC and LRC are together called two dimensional parity check.
OR
METHOD 3:
CHECKSUM:
Checksum is error detection method which is based on the concept of redundancy. The checksum detects all errors involving an odd number of bits and most errors involving an even number of bits.
● Checksum encoder follows the following steps
1. The data unit is divided in to “k” sections each of “n” bits
2. All sections are added to get the sum.
3. The sum is complemented and becomes the checksum.
4. The checksum is send as redundant bits along with the data.
● Checksum decoder/checker follows the following steps
1. The data unit is divided in to “k” sections each of “n” bits
2. All sections are added to get the sum.
3. The sum is complemented.
4. If the result is zero data are accepted otherwise; They are rejected.
● For example suppose the following block of 16 bits is to be sent using a checksum of 8 bits
● 10101001 00111001
● The number are added using one’s complement arithmetic