Parity bit checks are a simple form of error-checking used in digital systems to detect errors in binary data. They work by adding an extra bit, called a parity bit, to a group of binary bits.
The purpose of the parity bit is to ensure that the total number of ones (1s) in the binary data, including the parity bit, follows a specific rule, either even or odd parity.
There are two common types of parity checks: even parity and odd parity.
parity bits
Even Parity
In even parity, the rule is that the total number of ones in the binary data, including the parity bit, must be an even number.
To implement even parity, if the data already has an even number of ones, the parity bit is set to 0 (zero).
If the data contains an odd number of ones, the parity bit is set to 1 (one) to make the total number of ones even.
Example
If we have a group of 7 bits 1011011, the total number of 1 is 5. This is an odd number and therefore we need to add a one to the end in order to achieve even parity.
Result - 10110111
When the data is received, if the number of 1s in the byte is an odd number we know that a transmission error has occurred.
Parity Bit Demonstration
Block Parity Demonstration
Click on cells to change their values. The parity bit will be calculated dynamically.
Data 1
Data 2
Data 3
Parity Bit
0
0
0
0
Which of the following is a correct even parity bit for the binary number 1011?
Odd Parity
In odd parity, the rule is that the total number of ones in the binary data, including the parity bit, must be an odd number.
To implement odd parity, if the data already has an odd number of ones, the parity bit is set to 0 (zero).
If the data contains an even number of ones, the parity bit is set to 1 (one) to make the total number of ones odd.
Example
If we have the group of bits 1011011, the total number of 1s is 5. This is an odd number and so it is already in odd parity. Therefore we simply add a 0
Result - 10110110
If a transmitted code has an even number of 1s but the receiver expects an odd number, it means there is a .
Use cases for parity bits
Data Transmission and Communication
Parity bits are used to detect errors in data sent from one device to another in communication protocols.
Storage Systems (RAID)
Parity bits are employed in RAID systems to provide fault tolerance and data recovery in case of drive failure.
Memory Systems (RAM)
Parity bits are used in computer memory to identify and, in some cases, correct single-bit errors in data stored in memory.
Parity bits are used to single bit errors in data transmission.
Advantages of Parity Bits
Simplicity
Parity bits are straightforward to implement and require minimal hardware or software resources. They add a basic layer of error detection without significant overhead.
Low Overhead
Parity bits add only one extra bit to the data, making them a cost-effective method for basic error checking.
Real-Time Detection
Errors can be detected in real-time, which is important for applications like data communication.
Which of the following is an advantage of using parity bits?
Limitations of Parity Bits
Cannot Correct Errors
Parity bits can only detect errors; they cannot correct them. More advanced error-correction methods are needed for error correction.
Limited Error Detection
Parity bits are limited to detecting single-bit errors. They may not detect multiple errors occurring in the same data word.
No Error Location Information
Parity bits cannot pinpoint the exact location of an error within the data. They only indicate that an error has occurred.
The use of parity bits adds to the transmitted data.