Difficulty: Easy
Correct Answer: odd, even, bit
Explanation:
Introduction / Context:Parity is a simple and widely used error-detection technique. Depending on whether the system uses odd or even parity, one extra bit is appended to ensure the total number of 1s in a word is odd or even, respectively.
Given Data / Assumptions:
Concept / Approach:In even parity, the parity bit is chosen so that data+parity contains an even count of 1s. In odd parity, it is chosen so the count is odd. This single-bit redundancy allows detection of all single-bit errors within a word (and some multi-bit patterns depending on the error model).
Step-by-Step Solution:
Compute the number of 1s (popcount) in the data word.If even parity: set P = 0 for even counts; P = 1 for odd counts.If odd parity: set P = 1 for even counts; P = 0 for odd counts.Append this parity bit to the data and transmit/stored the composite word.Verification / Alternative check:After adding parity, recount the ones. For even parity, the total must be even; for odd parity, total must be odd. Any single-bit flip will toggle the total's parity and thus be detected.
Why Other Options Are Wrong:
Common Pitfalls:Confusing parity with checksums or CRCs, or believing parity can correct (it only detects) single-bit errors.
Final Answer:odd, even, bit
Discussion & Comments