All Tools490+

Excess-3 Code Converter – Decimal to XS-3 & Back in 3 Easy Steps

Excess-3 Code Converter

Use this Excess-3 code converter to convert decimal values to XS-3 code or decode XS-3 to Decimal with step-by-step visualizations.

Decimal Number (Base 10) DEC
Excess-3 Code (XS-3) XS-3
⚠️ Invalid XS-3! Standard Excess-3 nibbles must be between 0011 (3) and 1100 (12).
Step-by-Step Visualization (Digit + 3)
XS-3 Quick Reference Table
00011
10100
20101
30110
40111
51000
61001
71010
81011
91100
Excess-3 is obtained by adding 3 (binary 0011) to each decimal digit before converting it to a 4-bit binary sequence. It is a self-complementing code.
Copied to clipboard! ✓

Use this free Excess-3 code converter to turn decimal numbers into XS-3 code, or decode XS-3 back into decimal. Each digit is shown in a step-by-step card (digit + 3 and its 4-bit result), and an XS-3 reference table sits below for quick checks.

Quick answer

Excess-3 (XS-3) code represents each decimal digit by adding 3 and writing the result as a 4-bit binary number. So 0 becomes 0011, 5 becomes 1000 and 9 becomes 1100. A multi-digit number is coded digit by digit: 2026 becomes 0101 0011 0101 1001. To decode, subtract 3 from each 4-bit group: 1001 0110 1100 becomes 639.

Excess-3 is a classic topic in digital logic and computer architecture courses, and it still appears in exam questions about binary-coded decimal (BCD) arithmetic. Working it out by hand is simple for one digit but tedious for long numbers.

This excess-3 code converter shows every digit’s working, checks that each nibble is valid, and runs in your browser.

What Is Excess-3 Code?

Excess-3, also written XS-3, is a non-weighted binary-coded decimal code. Instead of storing each decimal digit directly in binary, as plain BCD (8421) does, it stores the digit plus 3. The extra 3 is called the excess or bias. Only the ten patterns from 0011 to 1100 are valid; the six patterns 0000, 0001, 0010, 1101, 1110 and 1111 are unused.

Why Add 3? The Self-Complementing Property

Excess-3 is self-complementing: flipping every bit of a digit’s code gives the code of its 9’s complement. For example, 2 is 0101 in XS-3; inverting the bits gives 1010, which is the XS-3 code for 7, and 2 + 7 = 9. This made subtraction easy in early calculators and computers, because the 9’s complement needed for subtraction could be produced with simple inverters.

Decimal to Excess-3 Table

DecimalPlain BCD (8421)Excess-3 (XS-3)
000000011
100010100
200100101
300110110
401000111
501011000
601101001
701111010
810001011
910011100

How to Convert Decimal to Excess-3

  1. Split the decimal number into separate digits.
  2. Add 3 to each digit.
  3. Write each result as a 4-bit binary number.
  4. Join the 4-bit groups in the same order.

Example: 45 → 4 + 3 = 7 → 0111, and 5 + 3 = 8 → 1000, so 45 = 0111 1000 in XS-3.

How to Convert Excess-3 to Decimal

  1. Split the code into 4-bit groups from the left.
  2. Convert each group to decimal.
  3. Subtract 3 from each value.
  4. Write the digits together.

Example: 1001 0110 1100 → 9, 6, 12 → 6, 3, 9 → 639.

How to Use the Excess-3 Code Converter

Step 1: Enter a Decimal Number

Type a decimal number in the Decimal Number box. The XS-3 code appears instantly with each digit grouped. Here 2026 becomes 0101 0011 0101 1001.

Step 1 enter 2026 in the excess-3 code converter

Step 2: Read the Digit + 3 Steps

The Step-by-Step Visualization shows a card for every digit: the digit, the addition (for example 6 + 3 = 9) and the 4-bit code (1001).

Step 2 Excess-3 digit plus 3 visualization

Step 3: Decode XS-3 Back to Decimal

Type or paste 4-bit groups into the Excess-3 Code box to decode them. 1001 0110 1100 returns 639. If a group is outside 0011 to 1100, the tool warns that it is not valid XS-3.

Step 3 decode Excess-3 1001 0110 1100 to 639

Excess-3 vs BCD vs Binary

  • Pure binary stores the whole number in base 2: 45 is 101101.
  • BCD (8421) stores each decimal digit in 4 bits: 45 is 0100 0101.
  • Excess-3 stores each digit plus 3 in 4 bits: 45 is 0111 1000.

BCD and XS-3 use more bits than pure binary but make decimal display and rounding straightforward, which is why they appeared in calculators, digital clocks and financial hardware.

Practise more number codes with the Gray Code to Binary Converter or try encoding schemes like the Base58 Encoder Decoder.

Frequently Asked Questions

What is the Excess-3 code of 5?

5 + 3 = 8, and 8 in 4-bit binary is 1000, so the XS-3 code of 5 is 1000.

How do you convert Excess-3 to decimal?

Split the code into 4-bit groups, convert each to decimal and subtract 3.

Why is Excess-3 called self-complementing?

Because inverting all the bits of a digit’s code gives the code of its 9’s complement, which simplifies subtraction.

Is Excess-3 a weighted code?

No. Unlike 8421 BCD, its bit positions do not have fixed weights.

Which 4-bit patterns are invalid in Excess-3?

0000, 0001, 0010, 1101, 1110 and 1111 are not used.

Is my input stored?

No. The excess-3 code converter runs entirely in your browser.

MH

Written and tested by Muhammad Hasnain

Founder of VectraTools. Every example on this page was checked against the tool’s own output. Last reviewed: October 2026.