Difficulty: Medium
Correct Answer: P = 0, P = 0, P = 1
Explanation:
Introduction / Context:
Parity bits provide simple error detection over a set of data bits. For odd parity, the total number of 1s—including the parity bit—must be odd. This question asks you to compute the parity bit P for three separate data words.
Given Data / Assumptions:
Concept / Approach:
Count the number of 1s in each data word. If the count is already odd, set P = 0. If the count is even, set P = 1 to make the total odd. This follows directly from parity definition and requires only a popcount of each word.
Step-by-Step Solution:
Verification / Alternative check:
Add P and recount: Word 1 total ones 5, Word 2 total ones 7, Word 3 total ones 5 → all odd, confirming correctness.
Why Other Options Are Wrong:
Common Pitfalls:
Miscounting ones, assuming the same parity bit for all words, or forgetting that each word’s parity is computed independently.
Final Answer:
P = 0, P = 0, P = 1
Discussion & Comments