Parity Bit Check
What is parity Checking?
Parity checking is the process where an extra bit is being sent along with the group of bits to be transmitted.
General notes
- When when using 8-bit ASCII, an extra ninth bit is added to hold either a 0 or 1.
- Handshaking is the process when the sender and receiver decide which type of parity to use, either even or odd.
- Even Parity: the number of 1's in the nine bits must be even.
- Odd Parity: the number of 1's in the nine bits must be odd.
How does it work?
For example
![Picture](/uploads/6/5/7/7/65776519/583511121.gif)
Two devices are communicating with even parity, as decided during the handshaking process.
As the transmitting device sends data, it counts the number of set bits in each group of, say seven bits.
On the the receiving end, the device checks each byte to make sure that it has an even number of set bits.
If it detects an odd number of set bits, the receiver knows there was an error during the transmission.
As the transmitting device sends data, it counts the number of set bits in each group of, say seven bits.
- If the number of set bits is even, it sets the parity bit to 0.
- If the number of set bits is odd, it sets the parity bit to 1.
On the the receiving end, the device checks each byte to make sure that it has an even number of set bits.
If it detects an odd number of set bits, the receiver knows there was an error during the transmission.
- An error would be detected whenever an odd number of bits are corrupted (reversed), however when an even number of bits, no error is detected at all.
- The total number of 1's remains as an even number when using even parity or as an odd number when using odd parity.
an Example of a Parity Bit Check
Many types of RAM chip include parity bits for each byte of storage, the PCI bus uses modification of the parity system to detect errors within addresses and commands communicated between the PCI controller and attached devices on the motherboard.
aDVANTAGES AND DISADVANTAGES of parity check
aDVANTAGEs |
dISADVANTAGEs |
|
|