Generating odd vs even parity How is an odd-parity bit generated differently from an even-parity bit for the same data word?

Difficulty: Easy

Correct Answer: The parity bit is the logical NOT of the even-parity bit (invert the even-parity output).

Explanation:


Introduction / Context:
Odd and even parity differ only in the chosen value of the parity bit for a given data word. Understanding the simple relationship between them helps when designing parity-generation hardware using XOR networks.


Given Data / Assumptions:

  • Parity bit is a single bit appended to the data word.
  • Even parity requires an even total count of 1s; odd parity requires an odd total.
  • Even-parity bit can be formed as the XOR (mod-2 sum) of all data bits.


Concept / Approach:
Because the even-parity bit equals XOR of the data bits, the odd-parity bit is simply the inversion of that result. Hardware-wise, you can generate even parity with a tree of XOR gates and then pass it through a NOT gate to obtain odd parity.


Step-by-Step Solution:

Let Peven = XOR of all data bits.For odd parity, set Podd = NOT(Peven).Append the chosen parity bit to the data word as required by the protocol.Verify by counting ones: data + Peven → even total; data + Podd → odd total.


Verification / Alternative check:
Try a sample word with an odd number of 1s. Even parity produces 1 to make the total even; inverting yields 0 for odd parity, preserving the odd total. The complement relationship holds for all words.


Why Other Options Are Wrong:

  • The first output is inverted: There is no notion of a “first” output; parity is a single bit.
  • Use AND in place of XOR: AND does not produce a parity (mod-2) sum.
  • Double the parity field: Parity uses one bit, not two.


Common Pitfalls:
Confusing parity generation with majority or checksum logic, or forgetting that XOR implements addition modulo 2 across bits.


Final Answer:
The parity bit is the logical NOT of the even-parity bit (invert the even-parity output).

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion