Contents

Digital Electronics
Number Systems
Logic Gates
Boolean Algebra
Combinational Circuits
Sequential Circuits
Memory & PLDs
Digital System Design
Other Topics
Other Subjects
Section Progress80%

12 of 15 articles

Excess-3 Code

Self complementing code, BCD to Excess-3 conversion.

Darshan N
Updated: 7 April 2026
4 min read

Excess-3 code powers old decimal arithmetic chips because it makes 9's complement trivially easy. Inside early BCD adders and the classic 74185 code converter, this self-complementing property cuts hardware cost significantly.

Excess-3 (XS-3) Code Table74185 BCD-to-XS3 converter — self-complementing propertyDecBCDXS-39s compXS-3 comp00000001191100100010100810114010001115100091001110000011Key PropertiesBCD + 3 = XS-3NOT(XS-3) gives9s complement6 unused states:0000-0010,1101-1111Self-complementingFigure 1: XS-3 code table with self-complementing property verification
Figure 1: XS-3 table — complementing XS-3 bits gives the XS-3 code for the 9s complement digit

Core Concept

Excess-3 (XS-3) is formed by adding 3 (binary 0011) to each BCD digit. So decimal 0 becomes 0011, decimal 9 becomes 1100. The result is a self-complementing code — the bitwise NOT of an XS-3 codeword gives the XS-3 encoding of the 9s complement of that digit.

This property made XS-3 popular in older decimal adder designs. Adding two XS-3 digits automatically produces a partial result that is also excess-3, with a simple correction step. The 74185 IC implements BCD-to-XS3 and XS3-to-BCD conversion with 25 ns propagation delay at 5 V TTL supply.

XS-3 has six unused bit patterns: 0000, 0001, 0010, 1101, 1110, and 1111. These are invalid codewords. Any appearance of these patterns indicates an error in the circuitry. This built-in property gives XS-3 a degree of error detection that straight BCD lacks.

Boolean Expression

Converting from BCD (B3 B2 B1 B0) to XS-3 (X3 X2 X1 X0): perform binary addition BCD + 0011. The Boolean equations for each XS-3 output bit can be derived from a 4-variable K-map. For example: X0 = B0', X1 = B1 XOR B0, X2 = B2 XOR (B1 AND B0), X3 = B3 XOR (B2 AND B1 AND B0). The reverse XS-3-to-BCD subtracts 3 from each digit.

Example
Given:
  Decimal digit = 6
  BCD = 0110

Formula / Rule:
  XS-3 = BCD + 0011 (binary addition)

Step by step:
    0110   (BCD for 6)
  + 0011   (add 3)
  ------
    1001   (XS-3 code for 6)

Self-complement check:
  9s complement of 6 = 3
  XS-3 of 3 = 0011 + 0011 = 0110
  NOT(1001) = 0110  -- matches XS-3 of 3

Final Answer:
  XS-3 code for 6 = 1001
  Self-complementing property confirmed.
Exam Tip: GATE questions often ask which codes are self-complementing. Only XS-3 among the common 4-bit decimal codes has this property — BCD (8421) is not self-complementing. A second trap: the six unused codewords (0000–0010 and 1101–1111) make XS-3 non-contiguous; do not confuse this with an error in the table. Also note that XS-3 is not a weighted code — you cannot multiply each bit by a fixed weight to recover the decimal value.

Key Properties

  • Self-complementing: NOT of XS-3 codeword = XS-3 code for 9s complement digit.
  • Formed by BCD + 3; reverse by XS-3 - 3 = BCD.
  • 74185 BCD/XS-3 converter: 25 ns propagation delay, 5 V TTL supply.
  • Six unused states out of 16 possible 4-bit patterns — provides limited error detection.
  • Not a weighted code — no fixed positional weights.
  • Not a unit-distance code — multiple bits can change between consecutive values.
  • Used historically in decimal arithmetic units and BCD adder carry correction logic.

Quick Revision

  • XS-3 = BCD + 3 for every decimal digit.
  • Self-complementing: inverting all bits gives the 9s complement digit's XS-3 code.
  • 6 invalid codewords: 0000, 0001, 0010, 1101, 1110, 1111.
  • Not weighted, not unit-distance — only self-complementing.
  • IC: 74185 for BCD/XS-3 conversion; 25 ns at 5 V.
  • Decimal 0 → 0011, Decimal 9 → 1100 (memorize these anchors).
  • Exam trap: students confuse 'self-complementing' with 'error-correcting' — XS-3 only detects certain errors via invalid codewords; it does not correct them.

Excess-3 Code Quiz

Test your understanding of Excess-3 encoding, self-complementing property, and BCD conversion.

Question 1 of 3

Q1.What is the Excess-3 code for the decimal digit 6?