what is excess 3 code
Excess-3 code , also known as XS-3 or 10-excess-3, is a type of binary- coded decimal (BCD) system where each decimal digit from 0 to 9 gets represented by adding 3 (binary 0011) to its standard 4-bit BCD equivalent. This "biased" approach makes it self-complementing, meaning the 1's complement of any Excess-3 digit gives the Excess-3 code for its 9's complement—like turning 5 (1000 in XS-3) into 4 (0111) via simple bitwise inversion. Developed in the 1930s by George Stibitz for relay-based calculators, it popped up in 1970s cash registers, older computers, and handheld calculators before fading with modern tech.
Quick Conversion Table
Here's a handy ** Excess-3 code lookup** for digits 0-9, straight from standard digital electronics references. Notice how each code is exactly **BCD
- 0011**.
| Decimal | BCD (8421) | Excess-3 |
|---|---|---|
| 0 | 0000 | 0011 |
| 1 | 0001 | 0100 |
| 2 | 0010 | 0101 |
| 3 | 0011 | 0110 |
| 4 | 0100 | 0111 |
| 5 | 0101 | 1000 |
| 6 | 0110 | 1001 |
| 7 | 0111 | 1010 |
| 8 | 1000 | 1011 |
| 9 | 1001 | 1100 |
Why Use It? Key Perks
- Self-Complementing Magic : Simplifies subtraction in hardware—no need for a full 9's complement circuit. Flip bits (1's complement), and you're at the 9's complement equivalent.
- Non-Weighted BCD : Unlike 8421 BCD, bit positions aren't powers of 2, dodging some arithmetic glitches in old mechanical/relay systems.
- Historical Edge : Beat out plain BCD for addition/subtraction in early calculators by reducing end-carry issues.
Imagine you're George Stibitz in 1937, wiring up the first binary calculator: Excess-3 let relays "borrow" smarter during math, like a sneaky shortcut in a relay race.
Real-World Example: Encoding 123
- Convert each digit: 1 → 0100, 2 → 0101, 3 → 0110.
- Full code: 0100 0101 0110.
- To decode: Subtract 0011 (3) from each group—back to BCD, then decimal.
Modern Relevance & Trending Chatter
While rare today (superseded by pure binary or 7421 BCD variants), Excess-3 lingers in digital electronics courses and FPGA tinkering as of 2026. Forums buzz about it in exam preps—no major news spikes, but it's a staple for GATE/ISRO-style questions on self-complementing codes. Some hobbyists revive it for retro calculator builds, praising its elegance over clunky BCD.
TL;DR : Excess-3 = BCD + 3 per digit; self-complementing for easy math in vintage tech. Perfect for understanding old-school digital logic!
Information gathered from public forums or data available on the internet and portrayed here.