Table of Contents

## What is Parity

In this article we will try to understand parity. When binary information is transmitted from one place to another or from one circuit to another, there is a possibility of error. This means that a signal representing a 0 can be converted to a 1 and a signal representing a 1 can be converted to a 0. Millions of data bits are transferred every second in digital circuits and it is necessary to transfer the data in the correct form. That is, data is transferred and it is necessary to process the data in the right way. It is also necessary in data transfer that if the data is affected due to some unknown reason, then its information is received immediately. **Click here**** to read this article in** **Hindi**.

To improve the integrity (reality) of the data in the digital system, an additional bit is used in the data, which is called the parity bit. Any error in transmission can be detected immediately by this additional bit. Parity means the number of 1’s in the digital data. This parity can be even and it can also be odd. Thus the number of 1’s in even parity will be even and the number of 1’s in odd parity will be odd.

## Parity Checker

C is represented by 100011 in the ASCII code. The number of 1’s in it is 3 so its parity is odd. If we add an extra bit b7 to this then the number of 1’s in the corresponding 8 bit code of C will be odd if b7 =0; And if b7 =1 then even. This additional bit is transmitted along with the code from the transmitter and the parity of the 8-bit code is checked at the receiving station. If there is an error in any bit or in an odd number of bits, then it can be detected. But if an even number of bits is transmitted erroneously, the error cannot be detected. To check the parity of a word, parity bits can be generated using gates. A parity generator/checker is available on the MSI chip to perform parity checking. Example IC74180 is an 8-bit parity generator.

Exclusive -OR gate is suitable for checking the parity of binary numbers because it outputs 1 if the number of 1’s in the input is odd. An Exclusive -OR gate gives a LOW output when given an even-parity input while a HIGH output when given an odd-parity input.

## Parity Generation

Instructions related to various actions can be displayed in binary numbers to work on the computer. Often, an additional binary bit is added to the original binary number representing the instruction, so that a new binary number is generated. The parity of this number can be odd or even. For example, the following 8-bit number is displayed in the photo.

The parity of this number is even, that is, the output of the Exclusive -OR gate is 0. But due to the use of a NOT gate, the output X8=1 is obtained from the NOT gate and finally the following 9-bit output is obtained.

Suppose if the original number is changed to 8-bit input 0110 0001 then its parity becomes odd. In this case the output of Exclusive -OR gate is 1 and the output of NOT is X8 = 0. Hence the final 9-bit output becomes 0 0110 0001. Note again that the parity of this new number is also odd. Hence the circuit shown in the photo is called odd parity generator. If the parity of the 8-bit input is even, then the output of the inverter (NOT gate) becomes 1, so that the parity of the final output becomes odd. Conversely, if the parity of the 8-bit input is odd then the output of the inverter (NOT gate) is 0 and the parity of the last 9-bit output is odd. For even parity generation, the inverter is removed from the circuit.

## Application of Parity Checker/Generator

Disturbances in transmission, telephone lines, or other communications lines often introduce 1-bit errors into the signal. To check this error, odd parity generator is used at the transmitter end and even parity checker is used at the receiving end. If there is no 1-bit error in the transmitted data then the parity of the received data will be odd. But if for some reason any one bit is changed in the transmitted bits, then the parity of the received data will be even.

For example, suppose we have to transmit the binary number 0101 1011. For this, the number to be transmitted using an odd parity generator will be 0.0101 1011. If there is no error in the transmission of this number, then the parity of the received number will also be odd. But in case of 1-bit error, the output of odd parity checker will go LOW. Which means that the received data is invalid.

Although there are generally no errors in data transmission, yet almost all the errors arising in the transmitted data can be detected by the above method.

Hope you have liked this article “What is Parity, Parity Checker and Generator”. You are invited for any kind of suggestion in the comment box.

**Read also**

**Control Wiring | Control Panel Wiring | Star Delta Power Wiring | Power wiring****What is NMR Spectroscopy?****MCQ on spectroscopic techniques****Digital Integrated Circuit | What is an ICs?****Number System | Types, Conversion rules & Examples**