Error Detecting Codes:
When we transmit a computer code over a medium, the possibility of a bit being lost due to transient or any other reason become the point of interest. During data sharing, the flow of information on the channel require high data integrity for the system to properly work on that data. So, a good mechanism of checking the loss of data integrity is needed so that the system is at least able to detect such violation of data integrity or loss of information in transmission.
Different Types of error in communication:
- One bit error
- Burst error
One Bit error:
During transmission there is a chance of getting a bit lost or complemented to indicate loss of data integrity. The receiver should be able to detect such loss or change in bit value. To enhance the data integrity and avoid loss to data bits we add an additional bit called PARITY BIT to the data.
The protocol among the data sharing system will then be to transmit code with “even” or “odd” number of ‘1’ and accordingly called as EVEN parity or ODD parity code.
When Odd parity is required, We make the no. of 1’s in the data stream odd by adding a ‘1’ or ‘0’ at the MSB position.
When EVEN parity is required, we make the number of 1’s in the data as EVEN, and when ODD parity is desired we make the number of BITS as odd. This encoding is done as follows:
At the receiver, the receiver system checks if the data received is with even parity or odd parity. If the parity of the encoded code is found to be different, then, it means the incorrect data received at the receiver. Thus we note that a one bit error in the data stream can be detected by checking the stream at the receiver for the same parity as that at the transmitter.