Difficulty: Easy
Correct Answer: All of the above
Explanation:
Introduction / Context:
Parity bits provide simple error detection on serial links and memory. For odd parity, we set the parity bit so that the overall count of 1s is odd. The question asks you to determine, for several example data words, whether the parity bit should be 1 or 0.
Given Data / Assumptions:
Concept / Approach:
Let ones(data) be the number of 1s in the data. If ones(data) is even, choose parity=1 to make even+1 = odd. If ones(data) is odd, choose parity=0 to keep the total odd. Therefore, parity bit equals 1 exactly when ones(data) is even.
Step-by-Step Solution:
Count ones in 1010011: 1+0+1+0+0+1+1 = 4 (even) → parity = 1.Count ones in 1111000: 1+1+1+1+0+0+0 = 4 (even) → parity = 1.Count ones in 1100000: 1+1+0+0+0+0+0 = 2 (even) → parity = 1.Thus all three require parity bit = 1 in an odd-parity system.
Verification / Alternative check:
Append the parity bit and recount: totals become 5, 5, and 3 respectively — each odd, satisfying the rule.
Why Other Options Are Wrong:
Each individual option (a–c) is true, so selecting only one would exclude the other correct cases. Therefore “All of the above” is the only fully correct choice.
Common Pitfalls:
Confusing odd and even parity conventions; assuming parity depends on bit order (it does not); forgetting to recount after appending the parity bit.
Final Answer:
All of the above
Discussion & Comments