DE Notes
Complete guide to Excess-3 code, ASCII, Unicode, parity codes, and alphanumeric codes used in digital systems — with conversion examples and comparison tables.
Excess-3 Code (XS-3)
Excess-3 is obtained by adding 3 (0011) to each BCD digit. It is a non-weighted, self-complementing code.
Self-complementing property: 9's complement of a digit = 1's complement of its XS-3 code.
- Digit 3 = 0110 in XS-3; 1's complement = 1001 = XS-3 of 6 (which is 9-3=6 ✓)
- This makes subtraction easier in BCD arithmetic.
Conversion Example: Convert 47 to XS-3:
Parity Code
A parity bit is appended to make the total number of 1s either even (even parity) or odd (odd parity).
Even parity example: Data = 1011010 Count of 1s = 4 (already even) → parity bit = 0 Transmitted: 10110100
Odd parity example: Data = 1011010 Count of 1s = 4 (even, need odd) → parity bit = 1 Transmitted: 10110101
Limitation: Parity detects single-bit errors only. Double-bit errors go undetected.
Comparison of Common Codes
| Code | Bits | Weighted | Self-Complementing | Use |
|---|---|---|---|---|
| BCD (8421) | 4 | Yes | No | Calculators, displays |
| Excess-3 | 4 | No | Yes | Older BCD arithmetic |
| Gray | 4 | No | No | Shaft encoders, K-maps |
| ASCII | 7/8 | No | No | Text, keyboards, files |
| Hamming | m+r | No | No | Error correction |
Interview Questions
Q1: Why is Excess-3 called self-complementing? The 9's complement of any digit d is (9-d). In XS-3, the 1's complement of the XS-3 code of d gives the XS-3 code of (9-d). This allows 9's complement subtraction using simple bit inversion, useful in BCD arithmetic without a separate complementing circuit.
Q2: What is the difference between ASCII and Unicode? ASCII uses 7 bits (128 characters) for English. Extended ASCII uses 8 bits (256 characters). Unicode uses 8–32 bits (UTF-8, UTF-16, UTF-32) to represent all languages — over 1 million code points. Modern systems use UTF-8 which is backward compatible with ASCII.
Q3: Convert ASCII code 0x41 to character. 0x41 = 65 decimal = 'A'.
Q4: What is an alphanumeric code? A code that represents both letters (alpha) and numbers (numeric), plus special characters. ASCII is the most common alphanumeric code. It's used in keyboards, file systems, and communication protocols.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Excess-3, ASCII, and Other Digital Codes.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Digital Electronics topic.
Search Terms
digital-electronics, digital electronics, digital, electronics, codes, excess, and, other
Related Digital Electronics Topics