- 2081 Baisakh (CS II) · 7 marks
(4,3) even parity code is linear, odd parity is not
Short answer
(4,3) even parity code is linear: all-zero word is codeword and sum of any two codewords is a codeword. (4,3) odd parity code is not linear because all-zero word is missing and sum of two codewords has even weight, not in code.
Prove that (4,3) even parity code is a linear block code and (4,3) odd parity code is not a linear block code.
A block code is linear if (1) the all-zero word is a codeword and (2) the modulo-2 sum of any two codewords is also a codeword (closure). For binary codes, (2) implies (1) since .
A (4,3) parity code takes 3 message bits and adds one parity bit .
Even parity code is linear
, so every codeword has an even number of 1s:
| Message | Codeword | Message | Codeword |
|---|---|---|---|
| 000 | 0000 | 100 | 1001 |
| 001 | 0011 | 101 | 1010 |
| 010 | 0101 | 110 | 1100 |
| 011 | 0110 | 111 | 1111 |
General proof: let be codewords, with weights both even. Then
where counts positions where both are 1. Even + even − even = even, so the sum is again an even-weight 4-bit word, i.e. a codeword. Also is a codeword.
Equivalently, the code can be generated by a matrix:
and , which is a codeword.
Example: (codeword), (codeword). Hence the (4,3) even parity code is a linear block code.
Odd parity code is not linear
, so every codeword has an odd number of 1s:
| Message | Codeword | Message | Codeword |
|---|---|---|---|
| 000 | 0001 | 100 | 1000 |
| 001 | 0010 | 101 | 1011 |
| 010 | 0100 | 110 | 1101 |
| 011 | 0111 | 111 | 1110 |
- The all-zero word has even weight, so it is not a codeword.
- Closure fails: for odd , is even, so the sum of two codewords always has even weight and is never a codeword. Example: , weight 2, not in the code.
Hence the (4,3) odd parity code is not a linear block code.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Short note: Syndrome calculation in linear systematic block code · Communication Systems, chapter 8
- (6, 3) code from parity check matrix · Communication Systems, chapter 8
- Convolutional vs block codes; (7,4) cyclic code for 1011 · Communication Systems, chapter 8 · asked 2×
- Convolutional vs block coder; (7,4) cyclic code for 1010 · Communication Systems, chapter 8 · asked 2×
- Analog and digital system block diagrams; linear and non-linear distortion · Communication Systems, chapter 1
- Hamming distance and weight; (6,3) code check for 100101 · Communication Systems, chapter 8
- Design a C(8,4) linear block code · Data Communication, chapter 8
- Parity bits and 3-bit odd parity generator · Digital Logic, chapter 4 · asked 2×
- 8085 ALP: odd parity transfer with bit change · Microprocessor, chapter 2
- Handshaking theorem; even number of odd vertices · Discrete Structure, chapter 4 · asked 3×