Difficulty: Easy
Correct Answer: Only one digit changes between counts.
Explanation:
Introduction / Context:
Rotary encoders and absolute position sensors often use Gray code rather than straight binary to minimize reading errors during transitions. Mechanical contacts, optical sensors, and sampling circuits rarely change all bits at exactly the same instant. Gray code reduces ambiguity when the shaft moves between adjacent positions while being read.
Given Data / Assumptions:
Concept / Approach:
The key Gray code property is that consecutive counts change only one bit. If a sensor or reader samples during the change, at most a single bit may be ambiguous, limiting the interpreted error to at most one adjacent code rather than a large jump that could occur with multi-bit changes in binary code.
Step-by-Step Reasoning:
Verification / Alternative check:
Plot Hamming distance between successive Gray codewords: it is uniformly 1. In contrast, binary’s worst-case transition changes many bits, which is problematic for asynchronous sampling and mechanical bounce.
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
Only one digit changes between counts.
Discussion & Comments