- Asked 2/22
- 2076 Chaitra · 2+5 marks
Excess-3 code and binary-to-Excess-3 converter
Short answer
Excess-3 adds 3 to each decimal digit’s 4-bit binary (e.g., 5→1000). BCD-to-excess-3 converter logic: W=A+B(C+D), X=B'(C+D)+B(C+D)', Y=C⊕D, Z=D', built with NOT, AND, OR gates.
Define excess-3 code with example. Design a binary to excess-3 code converter circuit using basic gates.
Excess-3 code
Excess-3 (XS-3) is an unweighted BCD-type code in which each decimal digit is represented by the 4-bit binary of (digit + 3). For example, 5 → 5 + 3 = 8 → 1000, and . It is self-complementing: the 9's complement of a digit is obtained by inverting its bits (e.g. 2 = 0101, 7 = 1010), which makes decimal subtraction easy.
Binary (BCD) to excess-3 converter
Assumption: input is a 4-bit binary number ABCD (A = MSB) with values 0–9; inputs 10–15 never occur and are taken as don't cares. Outputs are WXYZ = input + 3.
Truth table
| Dec | A B C D | W X Y Z |
|---|---|---|
| 0 | 0 0 0 0 | 0 0 1 1 |
| 1 | 0 0 0 1 | 0 1 0 0 |
| 2 | 0 0 1 0 | 0 1 0 1 |
| 3 | 0 0 1 1 | 0 1 1 0 |
| 4 | 0 1 0 0 | 0 1 1 1 |
| 5 | 0 1 0 1 | 1 0 0 0 |
| 6 | 0 1 1 0 | 1 0 0 1 |
| 7 | 0 1 1 1 | 1 0 1 0 |
| 8 | 1 0 0 0 | 1 0 1 1 |
| 9 | 1 0 0 1 | 1 1 0 0 |
| 10–15 | – | x x x x |
Output functions
K-map for W (rows AB, columns CD in order 00, 01, 11, 10):
CD=00 01 11 10
AB=00 0 0 0 0
AB=01 0 1 1 1
AB=11 x x x x
AB=10 1 1 x x
Groups: A (bottom two rows, octet), BD and BC (quads) → .
Simplifying the other maps the same way:
Logic diagram (basic gates)
C --+--[OR]-- (C+D) --+---[AND]-- B(C+D) --+
D --+ | B --+ |--[OR]-- W
| |
| A ------------+
|
(C+D) --[AND]-- B'(C+D) --+
B' --+ |--[OR]-- X
(C+D)'--[AND]-- B(C+D)' --+
B --+
C --[AND]-- CD ---+
D --+ |--[OR]-- Y
C'--[AND]-- C'D'--+
D'--+
D --[NOT]---------------- Z
The circuit uses NOT gates for B', C', D' and (C+D)', plus AND and OR gates as shown. Check: for input 0110 (6), W = 0 + 1·1 = 1, X = 0, Y = 0, Z = 1 → 1001 = 9 = 6 + 3.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- ASCII code and binary-to-Excess-3 converter · Digital Logic, chapter 1 · asked 2×
- Gray code and 3-bit binary-to-Gray converter · Digital Logic, chapter 1
- BCD code and 3-bit binary-to-Gray converter · Digital Logic, chapter 1
- Excess-3 code with examples · Digital Logic, chapter 1 · asked 4×
- Excess gain compensation in Sallen-Key circuit · Filter Design, chapter 6 · asked 3×