In this tutorial, we will study about Error Detection methods used in networking. We will look at error detection using Parity check in detail.
While sending data by sender to receiver, some noise in binary bits may get introduced. So, receivers’s information does not match with senders information. This condition is called error. So, 0 may turn into 1 or vice-versa while travelling from sender to receiver.
What do we mean by Error Detection Technique ?
Error detection technique is user to find if any error has occurred during transmission. In these techniques, it is not possible to find the location of the data bit which has changed or corrupted. In such methods, we can only detect the error but it is not possible to correct errors.
Types of Error Detection Techniques
The various error detection techniques are
- Parity Check
- Checksum
- Cyclic Redundancy Check
Error Detection using Parity Check
By parity we mean the state of being equal. Parity check is responsible for an accurate data transmission between the nodes during communication. A parity bit is appended to the original data on the sender side to create an even bit number or odd bit number. At the receiver side, the bits are checked and verified. Data is said to be accurate if the number of bits matches the number transmitted by the source (sender).
To put it in simple words, in parity check we try to find even no of 1’s or even number of 0s. There can be two ways of checking parity i.e. by either considering odd parity or by looking at even parity.
- For Odd Parity: Number of 1’s have to be odd. 1 is added if number of 1’s is even in data else 0 is added. Thus, this technique makes total number of 1’s an odd number. That’s why it is called odd parity checking.
- For Even Parity: Number of 1’s have to be even. 1 is added if number of 1’s is odd in data else 0 is added. Thus, this technique makes total number of 1’s an even number. That’s why it is called even parity checking.
The code word will be the message bits padded with the parity bits. The circuit used for parity checking is the XOR gate. Code words generated from this circuit are called as valid. All other code words are invalid.
If the message bit is 01, the code word will be 01 padded with parity bit 1 i.e. 011.
Examples of Parity Check
Till now, we have seen work flow of error detection using parity check. Now, we will see some examples on it.
Using 7 bits data, We will show you what will be the code word for even parity bit checking and odd parity bit checking. Note – P is the parity bit generated.
For Even Parity Checking
Please note that, in even parity checking, our target is to make even number of 1’s in code word generate.
Data | 1’s in Data | P | Total 1’s | Code word |
---|---|---|---|---|
1010110 | 4 | 0 | 4 | 10101100 |
0101111 | 5 | 1 | 6 | 01011111 |
0000000 | 0 | 0 | 0 | 00000000 |
1001100 | 3 | 1 | 4 | 10011001 |
1111111 | 7 | 1 | 8 | 11111111 |
For Odd Parity Checking
Please note that our target is to make odd number of 1’s in code word generated in odd parity checking.
Data | 1’s in Data | P | Total 1’s | Code word |
---|---|---|---|---|
0110101 | 4 | 1 | 5 | 01101011 |
0101111 | 5 | 0 | 5 | 01011110 |
0000000 | 0 | 1 | 1 | 00000001 |
1011000 | 3 | 0 | 3 | 10110000 |
1111111 | 7 | 0 | 7 | 11111110 |
Performance of Parity check
- A redundancy of “n” bits can easily detect a burst error of “n” bits. Thus, it increases the likelihood of detecting burst errors.
- There is however one pattern of errors that remain elusive. If 2 bits in one data unit are damaged, the checker will not be able to detect errors.
So, this was all about error detection using parity check, we will get acquainted with checksum error detection technique in the next tutorial.
You must be logged in to post a comment.