Parity is a simple error detection mechanism used in digital communication and storage systems. It involves adding an extra bit, called the parity bit, to a group of data bits to make the total number of 1's either even or odd. This technique helps in detecting errors during the transmission of data.
Parity is commonly used in systems like computer memory, data transmission, and error-checking protocols.
There are two main types of parity:
Let's explore both types in detail.
Suppose we want to transmit the data bits 101010 and use even parity:
101010 is 3 (which is odd).1010101.In this case:
101010 (3 ones)1 (to make the total number of 1's even)1010101 (4 ones)| Data Bits | Parity Bit (Even) | Total 1's |
|---|---|---|
000 |
0 |
0 |
001 |
1 |
2 |
010 |
1 |
2 |
011 |
0 |
2 |
100 |
1 |
2 |
101 |
0 |
2 |
110 |
0 |
2 |
111 |
1 |
4 |
Suppose we want to transmit the data bits 101010 and use odd parity:
101010 is 3 (which is odd).1010100.In this case:
101010 (3 ones)0 (to maintain the total number of 1's as odd)1010100 (3 ones)| Data Bits | Parity Bit (Odd) | Total 1's |
|---|---|---|
000 |
1 |
1 |
001 |
0 |
2 |
010 |
0 |
1 |
011 |
1 |
3 |
100 |
0 |
1 |
101 |
1 |
3 |
110 |
1 |
3 |
111 |
0 |
4 |
The primary purpose of using parity is to detect errors in data transmission or storage. Here's how parity works in error detection:
Transmission Process:
Error Detection:
Limitations:
Suppose you are transmitting the following 7-bit data using even parity:
11001011100101 is 4, which is even, so the parity bit will be 0.11001010Now, let's simulate transmission with an error:
11001010 is received as 11001110 (where the second-to-last bit is flipped).1100101 (4 ones, even parity).1100111 (5 ones, odd parity).1100101.1100101 (with parity bit 1).1100100.1100100 (with parity bit 0).Parity is a simple but useful technique for detecting errors in digital systems. It adds a parity bit (either for even or odd parity) to the data to ensure that the total number of 1's in the data is either even or odd. While it is effective for detecting single-bit errors, it has limitations and cannot detect multiple-bit errors. More advanced error-correction techniques, such as Hamming codes or CRC (Cyclic Redundancy Check), are used when more robust error detection and correction are needed.
Open this section to load past papers