# Parity Generator

Current world is undoubtedly an electronic world full of different types of systems performing various kinds of functions. These systems need to communicate amongst themselves so as to achieve their intended objectives. The actions undertaken by them heavily relay on the data received/transmitted by/from them. Say for example, suppose we are landing a plane and send 0010000 to the system to drag the wheels out.

Now, imagine that our bit pattern gets corrupted along the channel and is received by the system as 0010100. This might cause the system to either discard its input (if its invalid) or perform altogether a different action from the intended one. In either case, the result will be the disaster, just as our one bit got altered. This (rather exaggerated) example indicates the importance of error-free data communication. One way of achieving this is the use of

Now, let us try to design a digital circuit which can help us generate our parity-bit.

From this, we can find the expression for P in terms of B

Thus we have
This leads to the digital circuit as shown in Figure 2.
This kind of

Now, imagine that our bit pattern gets corrupted along the channel and is received by the system as 0010100. This might cause the system to either discard its input (if its invalid) or perform altogether a different action from the intended one. In either case, the result will be the disaster, just as our one bit got altered. This (rather exaggerated) example indicates the importance of error-free data communication. One way of achieving this is the use of

**parity generators**and checkers.Parity checking is a method in which an extra bit called parity bit is appended, usually at the MSB, of the data stream which needs to be transmitted. Now, how to decide whether to add 1 or 0? This depends on whether we desire to have **odd parity or even parity**.

### Odd Parity

This is the case wherein the number of ones in the bit stream sent (data bits in conjunction with parity-bit) has to be maintained as an odd number. That is, suppose we have our bit stream as 1001011, then the parity would be generated as 1 such that the number of ones in the resulting bit-stream (= 11001011) is 5, an odd number. Reasoning in similar fashion, we can say that for the data sequence of 1001010, the parity-bit should necessarily be 0.### Even Parity

In case if we opt for even parity, then we need to ensure that the total number of ones in the bit stream, including the parity bit, becomes an even number. For example, if the data string is 1001011, then the parity-bit would be 0; while if it is 1001010, then parity-bit should be 1.Now, let us try to design a digital circuit which can help us generate our parity-bit.

## Odd Parity Generator

Let us assume that we have a three-bit data sequence (B_{2}B_{1}B_{0}) which needs to be communicated. Table I shows the parity bits (O_{P}) which must be generated by our circuit for each combination of input bits.__Table I__B_{2} | B_{1} | B_{0} | O_{P} |

0 | 0 | 0 | 1 |

0 | 0 | 1 | 0 |

0 | 1 | 0 | 0 |

0 | 1 | 1 | 1 |

1 | 0 | 0 | 0 |

1 | 0 | 1 | 1 |

1 | 1 | 0 | 1 |

1 | 1 | 1 | 0 |

_{2}, B_{1}and B_{0}as This means that we can build an**odd parity generator**for three bits of data word using two XNOR gates. The design realized is as shown by Figure 1.## Even Parity Generator

Let us now design an even parity (E_{P}) generator for two-bit data word B_{1}B_{0}. The associated truth table is as shown by Table II.__Table II__B_{1} | B_{0} | E_{P} |

0 | 0 | 0 |

0 | 1 | 1 |

1 | 0 | 1 |

1 | 1 | 0 |

**parity generation**is employed in SPI buses and UART transmissions.**Comments/Feedbacks**

Closely Related Articles Electric Circuit and Electrical Circuit ElementsSeries Parallel Battery CellsRL Series CircuitWhat is Inductor and Inductance | Theory of InductorRLC CircuitThree Phase Circuit | Star and Delta SystemRL Parallel CircuitRL Circuit Transfer Function Time Constant RL Circuit as FilterConstruction of AC Circuits and Working of AC CircuitsSeries RLC CircuitParallel RLC CircuitResistances in Series and Resistances in ParallelResonance in Series RLC CircuitPlanar and Non Planar Graphs of CircuitClipping CircuitMore Related Articles Electric Current and Theory of Electricity | Heating and Magnetic EffectNature of ElectricityDrift Velocity Drift Current and Electron MobilityElectric Current and Voltage Division RuleRMS or Root Mean Square Value of AC SignalWorking Principle of a CapacitorQuality Factor of Inductor and CapacitorTransient Behavior of CapacitorCylindrical CapacitorSpherical CapacitorCapacitors in Series and ParallelHow to Test Capacitors?Electrical Conductance Conductivity of Metal Semiconductor and Insulator | Band TheoryWhat is Electrical Resistance?Resistivity and Laws of ResistanceProperties of Electric ConductorTemperature Coefficient of ResistanceResistance Variation with TemperatureSeries ResistanceActive and Passive Elements of Electrical CircuitElectrical DC Series and Parallel CircuitOhm's Law | Equation Formula and Limitation of Ohm's LawKirchhoff Current Law and Kirchhoff Voltage LawSingle and Multi Mesh AnalysisSuperposition TheoremThevenin Theorem and Thevenin Equivalent Voltage and ResistanceNorton Theorem | Norton Equivalent Current and ResistanceReciprocity TheoremNodal Analysis in Electric CircuitsMaximum Power Transfer TheoremDelta - Star transformation | Star - Delta TransformationMagnetic FieldMagnetic FluxMagnetic PermeabilityHysteresis LoopMagnetic Field and Magnetic Circuit | Magnetic MaterialsMagnetic SaturationEnergy Stored in a Magnetic FieldStatic Electric Field | Electrostatic Induction A Current Carrying Conductor Within A Magnetic FieldMagnetic SusceptibilityHard Magnetic MaterialsSoft Magnetic MaterialsMagnetic Circuit with Air GapElectric ChargeCoulombs Law | Explanation Statement Formulas Principle Limitation of Coulomb’s LawElectric Lines of ForceWhat is Electric Field?Electric Field Strength or Electric Field IntensityWhat is Flux? Types of Flux?Electric FluxElectric PotentialCapacitor and Capacitance | Types of CapacitorsEnergy Stored in CapacitorCharging a CapacitorDischarging a CapacitorFourier Series and Fourier TransformTrigonometric Fourier SeriesAnalysis of Exponential Fourier SeriesMutual InductanceSelf InductanceSI System of UnitsElectrical International SymbolElectric Power Single and Three Phase Power Active Reactive ApparentVector Algebra | Vector DiagramRelationship of Line and Phase Voltages and Currents in a Star Connected SystemVector Diagram | Three Phase Vector DiagramTypes of Resistor Carbon Composition and Wire Wound ResistorVaristor Metal Oxide Varistor is Nonlinear ResistorCarbon Composition ResistorWire Wound ResistorVariable Resistors | Defination, Uses and Types of Variable ResistorsLight Dependent Resistor | LDR and Working Principle of LDRSource of Electrical EnergyVoltage SourceIdeal Dependent Independent Voltage Current SourceVoltage or Electric Potential DifferenceVoltage in SeriesVoltage in ParallelVoltage Drop CalculationVoltage DividerVoltage MultiplierVoltage DoublerVoltage RegulatorVoltage FollowerVoltage Regulator 7805Voltage to Current ConverterNew Articles Collecting Oil Sample from Oil Immersed Electrical EquipmentCauses of Insulating Oil DeteriorationAcidity Test of Transformer Insulating OilMagnetic FluxRing Counter