In Excess-3 Code, why is the code considered self-complementing?
2025
In Excess-3 Code, why is the code considered self-complementing?
Answer: B. Because the 9’s complement of each digit can be obtained by inverting its bits — ConceptA decimal code is self-complementing when the 1’s complement of the code word for a digit d is the code word for its 9’s-complement digit, 9 − d.…
- A.
Because it can be converted to ASCII directly
- B.
Because the 9’s complement of each digit can be obtained by inverting its bits
- C.
Because it is used for financial calculations
- D.
Because it is a form of Gray code
Attempted by 279 students.
Show answer & explanation
Correct answer: B
Concept
A decimal code is self-complementing when the 1’s complement of the code word for a digit d is the code word for its 9’s-complement digit, 9 − d.
Excess-3 represents d as the four-bit binary value of d + 3. Complementing four bits changes a value x to 15 − x.
Application
Apply the definition to Excess-3:
For d = 2, add the bias: 2 + 3 = 5, so XS-3(2) = 0101.
Invert every bit: 0101 becomes 1010.
The binary value 1010 is 10; removing the bias gives 10 − 3 = 7.
Since 9 − 2 = 7, the inverted word is XS-3(7), exactly the code for the 9’s complement of 2.
Cross-check and contrast
Starting with 7 gives XS-3(7) = 1010; inversion gives 0101, whose Excess-3 digit is 5 − 3 = 2. Thus the operation works in both directions.
ASCII maps characters to code points; that purpose does not define decimal complementation.
Financial calculation is an application area, not a bitwise transformation rule.
Gray code is defined by one-bit changes between adjacent values, a different property from decimal self-complementation.
Result
Therefore, Excess-3 is considered self-complementing because the 9’s complement of each decimal digit is obtained by inverting all bits of its Excess-3 code word.
Explore the full course: Bihar Stet Paper Ii Computer Science