Excess-3 Code
The excess-3 code is a non-weighted and self-complementary BCD code. The XS-3 code has a biased representation and plays an important role in arithmetic operations as it helps to resolve the deficiencies encountered while using the 8421 BCD code for adding two decimal digits whose sum is more than 9. It uses a special type of algorithm which is different from BCD or the binary positional number system.
The Excess-3 Code for the decimals are as follows:
Decimal Digit | Excess-3 Code |
0 | 0011 |
1 | 0100 |
2 | 0101 |
3 | 0110 |
4 | 0111 |
5 | 1000 |
6 | 1001 |
7 | 1010 |
8 | 1011 |
9 | 1100 |
For example,
Let us take the decimal number 31.
Decimal | BCD | Excess-3 |
3 | 0011+0011 | 0110 |
1 | 0001+0011 | 0100 |
Reference