Difficulty: Easy
Correct Answer: Gray code
Explanation:
Introduction / Context:
When digital systems encode ordered states (such as shaft angles or counter positions), changing multiple bits at once can create transient errors if not all lines switch simultaneously. A “unit-distance” code mitigates this by ensuring that adjacent values differ by only one bit.
Given Data / Assumptions:
Concept / Approach:
Gray code (reflected binary code) is constructed so that each successive word differs from the previous one by exactly one bit. This property reduces ambiguity during transitions because even if lines switch at slightly different times, at most one bit is in flux, which minimizes decoding errors. Weighted codes like 8421 BCD can change multiple bits between successive numbers (e.g., 7→8 toggles four bits), increasing the risk of transient misreads.
Step-by-Step Solution:
Verification / Alternative check:
Create a small 3-bit table and compare transitions: Gray code shows single-bit steps while straight binary shows multi-bit steps such as 3 (011) to 4 (100), which toggles three bits.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing “nonweighted” with “unit distance”; some codes are nonweighted yet not strictly single-bit transition for all sequences.
Final Answer:
Gray code
Discussion & Comments