BCD & Excess-3 Converter
Convert between Decimal, BCD (Binary Coded Decimal), and Excess-3 codes with step-by-step conversion process. Essential for digital systems and data encoding.
✓ Decimal ↔ BCD ✓ BCD ↔ Excess-3 ✓ Step-by-step process
BCD & Excess-3 Conversion
BCD and Excess-3 Codes
BCD (Binary Coded Decimal) and Excess-3 are important binary codes used in digital systems for representing decimal numbers. Each has unique properties that make them suitable for different applications.
BCD (Binary Coded Decimal)
What is BCD?
BCD represents each decimal digit (0-9) using 4 binary bits. It's a weighted code where each bit position has a specific weight (8-4-2-1).
BCD Encoding Table
| Decimal | BCD | Decimal | BCD |
|---|---|---|---|
| 0 | 0000 | 5 | 0101 |
| 1 | 0001 | 6 | 0110 |
| 2 | 0010 | 7 | 0111 |
| 3 | 0011 | 8 | 1000 |
| 4 | 0100 | 9 | 1001 |
Excess-3 Code
What is Excess-3?
Excess-3 is an unweighted code obtained by adding 3 to each decimal digit before converting to binary. It's self-complementing, making arithmetic operations easier.
Excess-3 Encoding Table
| Decimal | Excess-3 | Decimal | Excess-3 |
|---|---|---|---|
| 0 | 0011 | 5 | 1000 |
| 1 | 0100 | 6 | 1001 |
| 2 | 0101 | 7 | 1010 |
| 3 | 0110 | 8 | 1011 |
| 4 | 0111 | 9 | 1100 |
Conversion Methods
Decimal to BCD
- Take each decimal digit separately
- Convert each digit to 4-bit binary
- Concatenate the 4-bit groups
BCD to Excess-3
- Take each 4-bit BCD group
- Add 3 to the decimal value
- Convert result to 4-bit binary
Properties and Advantages
BCD Properties
- Weighted code: 8-4-2-1 weights
- Easy conversion: Direct decimal-to-binary mapping
- Human readable: Each digit encoded separately
- No invalid codes: Uses only 10 of 16 possible combinations
Excess-3 Properties
- Self-complementing: 9's complement obtained by bit inversion
- Unweighted: No positional weights
- Arithmetic friendly: Easier addition/subtraction
- No zero code: Minimum code is 0011
Applications
BCD Applications
- Digital displays (7-segment)
- Calculators and meters
- Financial systems
- Real-time clocks
Excess-3 Applications
- Arithmetic circuits
- Early computers
- Error detection systems
- Complementary arithmetic
Examples
Example 1: Convert 247₁₀
- BCD: 2→0010, 4→0100, 7→0111 = 0010 0100 0111
- Excess-3: 2+3=5→0101, 4+3=7→0111, 7+3=10→1010 = 0101 0111 1010