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:
Word 1: 1011101 has 1s at positions 1,3,4,5,7 → 5 ones (odd) → P = 0.Word 2: 11110111 has ones count 7 (odd) → P = 0.Word 3: 1001101 has ones count 4 (even) → P = 1.Therefore results: P = 0, P = 0, P = 1.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