(Source: www.wonderlandmagazine.com)

Contents

The parity bit ensures that the total number of 1-bits in the string is even or odd. If that count is odd, the parity bit value is set to 1, making the total count of occurrences of 1s in the whole set (including the parity bit) an even number.

The function of such bits varies with the system design, but examples of functions for such bits include timing management or identification of a packet as being of data or address significance. In mathematics, parity refers to the evenness or oddness of an integer, which for a binary number is determined only by the least significant bit.

This mechanism enables the detection of single bit errors, because if one bit gets flipped due to line noise, there will be an incorrect number of ones in the received data. In the two examples above, Bob's calculated parity value matches the parity bit in its received value, indicating there are no single bit errors.

Bob reports incorrect transmission after observing unexpected odd result. If an even number of bits have errors, the parity bit records the correct number of ones, even though the data is corrupt.

Consider the same example as before with an even number of corrupted bits: Bob reports correct transmission though actually incorrect.

(Source: bunboyeatsla.com)

Bob observes even parity, as expected, thereby failing to catch the two bit errors. Because of its simplicity, parity is used in many hardware applications where an operation can be repeated in case of difficulty, or where simply detecting the error is helpful.

For example, the SCSI and PCI buses use parity to detect transmission errors, and many microprocessor instruction caches include parity protection. Because the I-cache data is just a copy of main memory, it can be disregarded and re-fetched if it is found to be corrupted.

In serial communication contexts, parity is usually generated and checked by interface hardware (e.g., a PART) and, on reception, the result made available to a processor such as the CPU (and so too, for instance, the operating system) via a status bit in a hardware register in the interface hardware. Recovery from the error is usually done by retransmitting the data, the details of which are usually handled by software (e.g., the operating system I/O routines).

When the total number of transmitted bits, including the parity bit, is even, odd parity has the advantage that the all-zeros and all-ones patterns are both detected as errors. If the total number of bits is odd, only one of the patterns is detected as an error, and the choice can be made based on which is expected to be the more common error.

For example, suppose two drives in a three-drive RAID 5 array contained the following data: The result of that XOR calculation yields Drive 2's contents.

(Source: www.freewarefiles.com)

This same XOR concept applies similarly to larger arrays, using any number of disks. On the systems sold by British company ICL (formerly ICT) the 1-inch-wide (25 mm) paper tape had 8 hole positions running across it, with the 8th being for parity.

One of the most widely used error detection techniques for transmission of data for sharing information between devices is Parity checking. In this article, we will understand the concept of using ‘ parity bits ‘ to detect errors in digital data.

This parity inclusive binary message then transmits from transmitter to receiver end. The Parity Checker matches the number of 1’s at the receiver’s end with that of the transmitter’s end to check for errors.

If there is a change in the number of 1s at the receiving end, then that detects the presence of an error. You are slightly concerned with errors entering your message.

Even parity mechanism : The target is to make the total number of 1s even. In this error detection method, the final message is the message you intended to send, plus one parity bit.

(Source: adogslove.com)

Next, we will design some good looking’ circuits to carry out this whole process. Both these circuits are located at different sites based on their working.

Assume that your final message is an n- bit stream of digital data. To transmit this bit stream containing n-1 data (message signal) plus one additional parity bit, we require a special circuit known as parity bit generator.

Even parity generates as a result of the calculation of the number of ones in the message bit. Following is the truth table for 3- bit even parity generator.

Solving the truth table for all the cases where P is 1 using Sum-of-Products method: 3- bit even parity generator circuit Remember that this circuit is just generating the parity bit.

4- bit odd parity generator truth table Solving the truth table for all the cases where P is 1 using the Sum-of-Products method. A parity checker is a logical circuit that checks data transmission errors.

(Source: www.bit-tech.net)

If a parity error occurs, the “even” output goes low, and odd output goes high in case of even parity checker. Suppose at the transmitting end, even parity bit is generated, and we have three input message signals and one parity bit.

The parity checker circuit is fed all these four bits to check for possible errors. Since the transmitting end is working with even parity, the number of 1’s at received by the checker circuit must be even.

For every case, where the input to the parity checker has an odd number of 1s, the error output will be 1. And for every input where the number of 1s is the expected even count, the error output will be 0.

3 Bites Even Parity checker truth table 4 Bit Received Message Parity error check CP ABCPCp00000000110010100110010010101001100011111000110010101001011111000110111110111110 If the four- bit received message consists of an even number of 1 means, no error has occurred.

If it contains an odd number of 1 means, an error has occurred. Suppose at the transmitting end odd parity bit is generated, and we have three input message signal.

(Source: www.diynot.com)

The parity checker circuit is fed all these four bits to check for possible errors. An error occurs on the even number of 1’s at the receiver’s end; that is, the message signal has become distorted.

3 Todd Parity Checker truth table 4 Bit Received MessageParity error check CpABCPCp00001000100010000111010000101101101011101000010011101011011011001110101110011111 If the four- bit received message consists of an odd number of 1 means, no error has occurred.

Odd parity checker for three input message signal and odd parity bit can be implemented with three. Parity checking circuits have two additional outputs.

The confusion arises from the fact that they have their meanings switched for odd and even parity checkers. The desired output (even) goes low in case of error.

The IC consists of 8 message signal bits from A to H and two cascading inputs for even and odd. For the proper implementation of generator/checker, unused parity bit must be tied to logic zero, and the inputs must not be equal.

(Source: oddstuffmagazine.com)