The excess-3 code is also treated as XS-3 code. The excess-3 code is a non-weighted and self-complementary BCD code used to represent the decimal numbers. This code has a biased representation. This code plays an important role in arithmetic operations because it resolves deficiencies encountered when we use the 8421 BCD code for adding two decimal digits whose sum is greater than 9. The Excess-3 code uses a special type of algorithm, which differs from the binary positional number system or normal non-biased BCD.
We can easily get an excess-3 code of a decimal number by simply adding 3 to each decimal digit. And then we write the 4-bit binary number for each digit of the decimal number. We can find the excess-3 code of the given binary number by using the following steps:
We can also add 0011 in each 4-bit BCD code of the decimal number for getting excess-3 code.
The Excess-3 code for the decimal number is as follows:
In excess-3 code, the codes 1111 and 0000 are never used for any decimal digit. Let's take some examples of Excess-3 code.
Example 1: Decimal number 31
1. We find the BCD code of each digit of the decimal number.
2. Then, we add 0011 in both of the BCD code.
3. So, the excess-3 code of the decimal number 31 is 0110 0100
Example 2: Decimal number 81.61
1. We find the BCD code of each digit of the decimal number.
2. Then, we add 0011 in both of the BCD code.
3. So, the excess-3 code of the decimal number 81.61 is 1011 0100.1001 0100
A self-complementary binary code is a code which is always complimented in itself. By replacing the bit 0 to 1 and 1 to 0 of a number, we find the 1's complement of the number. The sum of the 1'st complement and the binary number of a decimal is equal to the binary number of decimal 9.
Note: if we perform the 1's complement of excess-3 of a decimal number, it will be equal to the excess-3 code of the 9's complement of that decimal number.
For example: If we perform 1's complement of the excess-3 code 1000(decimal 5), complement value will be 0111, which is the excess-3 code of 9's complement of 5, i.e., 4(0111).
Why use Excess-3 code?
There are the following advantages of excess-3 code which make it required to use:
6 videos|76 docs|52 tests
|
|
Explore Courses for Electronics and Communication Engineering (ECE) exam
|