Binary to Excess-3 Converter
Convert a binary integer into Excess-3 code. The calculator first converts the binary input to its decimal value, then encodes each decimal digit by adding 3 and writing the result as a 4-bit binary group.
What Is Excess-3 Code?
Excess-3, also called XS-3, is a decimal digit code. Each decimal digit is encoded separately by adding 3 to the digit and then converting that result into a 4-bit binary value.
How Binary to Excess-3 Conversion Works
A binary number cannot be converted to Excess-3 simply by adding binary
0011 to the entire input. Excess-3 is a digit-by-digit decimal code.
The correct process is:
1. Read the binary input
Start with the unsigned binary integer.
2. Convert binary to decimal
Find the ordinary base-10 value of the input.
3. Separate decimal digits
Treat every decimal digit independently.
4. Add 3 to each digit
This creates the Excess-3 value for that decimal digit.
5. Convert each result to 4 bits
Values from 3 through 12 are represented using four binary bits.
6. Join the groups
Place each four-bit group in the same order as the decimal digits.
Excess-3 Code Table
| Decimal Digit | Add 3 | Excess-3 Code |
|---|---|---|
| 0 | 3 | 0011 |
| 1 | 4 | 0100 |
| 2 | 5 | 0101 |
| 3 | 6 | 0110 |
| 4 | 7 | 0111 |
| 5 | 8 | 1000 |
| 6 | 9 | 1001 |
| 7 | 10 | 1010 |
| 8 | 11 | 1011 |
| 9 | 12 | 1100 |
Example: Convert Binary 1011 to Excess-3
Binary 1011 equals decimal 11.
Example: Convert Binary 11001 to Excess-3
Binary 11001 equals decimal 25.
Why Excess-3 Uses Four Bits Per Digit
Each decimal digit from 0 through 9 becomes a value from 3 through 12 after adding 3. All values in that range fit inside four binary bits.
Therefore every decimal digit produces exactly one four-bit Excess-3 code group.
Binary vs BCD vs Excess-3
| Representation | How It Works | Example for Decimal 5 |
|---|---|---|
| Binary | Represents the whole numeric value in base 2 | 101 |
| BCD | Encodes each decimal digit directly in 4 bits | 0101 |
| Excess-3 | Adds 3 to each decimal digit, then encodes it in 4 bits | 1000 |
Is Excess-3 the Same as Binary Plus 3?
No. For a multi-digit decimal number, you do not add 3 to the whole number. You add 3 separately to each decimal digit.
Excess-3 and Self-Complementing Codes
Excess-3 is known as a self-complementing decimal code. Complementing all bits of an Excess-3 digit gives the Excess-3 representation related to the 9’s complement of that decimal digit.
This property has historically made Excess-3 interesting in decimal arithmetic and digital systems.
Binary to Excess-3 Examples
| Binary Input | Decimal | Excess-3 |
|---|---|---|
0 |
0 | 0011 |
1 |
1 | 0100 |
101 |
5 | 1000 |
1001 |
9 | 1100 |
1010 |
10 | 0100 0011 |
1011 |
11 | 0100 0100 |
11001 |
25 | 0101 1000 |
Common Binary to Excess-3 Mistakes
Adding 3 to the whole number
Excess-3 adds 3 to each decimal digit separately.
Skipping binary-to-decimal conversion
The binary input must first be interpreted as a decimal value.
Using fewer than four bits
Each Excess-3 digit should be displayed as exactly four bits.
Confusing Excess-3 with BCD
BCD encodes the decimal digit itself; Excess-3 encodes the digit plus 3.
Related BinaryCon Tools
Binary to Excess-3 Converter FAQs
What is Excess-3 code?
How do you convert binary to Excess-3?
What is the Excess-3 code for decimal 0?
0 + 3 = 3, so the Excess-3 code is 0011.
What is the Excess-3 code for decimal 5?
5 + 3 = 8, so the code is 1000.
What is binary 1011 in Excess-3?
1011 is decimal 11. Each decimal digit 1 becomes
0100, so the result is 0100 0100.
What is binary 11001 in Excess-3?
11001 is decimal 25. Decimal 2 becomes
0101 and decimal 5 becomes 1000, giving
0101 1000.