Difficulty: Easy
Correct Answer: Exclusive-OR (XOR) and Exclusive-NOR (XNOR) gates
Explanation:
Introduction / Context: Parity is one of the simplest and most widely used error-detection techniques in digital systems, serial links, memory subsystems, and communication protocols. A parity generator produces a single parity bit that makes the total number of 1s either even (even parity) or odd (odd parity). A parity checker then verifies that property on reception. Understanding which logic primitives naturally realize these functions is essential in combinational logic design and exam preparation.Given Data / Assumptions:
Concept / Approach: The XOR operation outputs 1 if and only if the number of 1s at its inputs is odd. Cascading XORs across multiple bits therefore produces an output that represents the odd-parity function. Conversely, XNOR outputs 1 if and only if the number of 1s is even. Thus, XOR naturally generates odd parity and can be inverted for even parity; XNOR naturally generates even parity and can be inverted for odd parity. Parity checkers compare the received data bits and parity bit using XOR or XNOR to verify integrity.Step-by-Step Solution:
For N data bits d0, d1, …, dN-1, compute P = d0 XOR d1 XOR … XOR dN-1.If odd parity is required, transmit parity_bit = P; for even parity, use parity_bit = P’ or use XNOR across all bits.At the receiver, XOR all bits including the parity bit; a 0 result indicates even parity satisfied (or choose XNOR with the corresponding rule).Verification / Alternative check:
Truth-table inspection for two inputs shows XOR counts odd ones; XNOR counts even ones. Cascading preserves this count property for more bits.Why Other Options Are Wrong:
Exclusive-OR (XOR) gates only: Parity checking often uses XNOR directly for even-parity validation.Exclusive-NAND gates only / Exclusive-AND gates: These are not standard parity primitives and do not map directly to odd/even count logic.Common Pitfalls:
Confusing XOR with OR; XOR is parity-sensitive whereas OR is not.Forgetting that XNOR is the complement parity function (even count detector).Final Answer:
Exclusive-OR (XOR) and Exclusive-NOR (XNOR) gates
Discussion & Comments