Block Coding in Data Communications
1. Principles of Block Coding
In Block Coding, a continuous message stream is divided into blocks of bits, called Datawords. To each -bit dataword, redundant bits are added, producing an -bit block called a Codeword where:
Such an error-control code is designated as an Block Code.
Valid vs. Invalid Codewords:
- Total possible -bit datawords: .
- Total possible -bit patterns: .
- Number of Valid Codewords: Exactly (one unique codeword for each dataword).
- Number of Invalid Patterns: .
- Error Detection Principle:
- The sender transmits a valid codeword .
- If transmission noise alters into an invalid pattern (one of the unused states), the receiver immediately flags an Error Detected.
- Undetected Error: If corruption alters into another valid codeword, the receiver accepts it as valid data, failing to detect the corruption.
2. Linear Block Codes
A block code is called a Linear Block Code if and only if the bitwise exclusive-OR (modulo-2 addition ) of any two valid codewords yields another valid codeword in the codebook:
Generator Matrix () and Parity Check Matrix ():
For an systematic linear block code:
- Generator Matrix of dimension :
(where is a identity matrix and is a parity submatrix).
Codeword generation:
- Parity Check Matrix of dimension :
A received vector is valid if and only if:
Syndrome Decoding ():
The receiver multiplies the received -bit vector by the transpose of :
- If : No detectable error occurred; strip redundant bits to extract data.
- If **$S
eq 0SH$, pinpointing the exact bit index that flipped!
3. Physical Layer Block Line Codes: 4B/5B and 8B/10B
In physical-layer digital transmission, long sequences of consecutive 0s or 1s cause baseline wander and loss of clock synchronization. Physical block coding maps -bit groups to -bit symbols () to ensure frequent voltage transitions.
1. 4B/5B Encoding (Fast Ethernet — 100Base-TX):
- Maps each 4-bit data nibble ( data values) to a 5-bit code pattern ( possible symbols).
- Guarantees no more than three consecutive 0s in the output stream, preventing clock drift when modulated via NRZ-I.
- Unused 5-bit symbols are reserved for control (Start Delimiter
J/K, End DelimiterT/R, IdleI). - Efficiency: .
2. 8B/10B Encoding (Gigabit Ethernet — 1000Base-X):
- Maps 8-bit bytes ( values) to 10-bit symbols ( patterns).
- Maintains DC Balance (equal count of 0s and 1s using Running Disparity ).
- Efficiency: .
Frequently Asked Questions
QIn a (7, 4) linear block code, how many valid codewords and how many invalid patterns exist?
- , .
- Valid codewords = .
- Total patterns = .
- Invalid patterns = .
QWhat defines a Linear Block Code?
The modulo-2 XOR sum of any two valid codewords in the codebook must produce another valid codeword from the same codebook.
QWhy is 4B/5B encoding combined with NRZ-I in Fast Ethernet?
NRZ-I transitions on bit 1 but produces no transition on bit 0. A long run of zeros would cause the receiver's clock to lose synchronization. 4B/5B ensures that no pattern produces more than three consecutive zeros, guaranteeing frequent clock recovery transitions.
QWhat is a syndrome in a linear block code?
The syndrome is , computed from the received vector . If no error is detected. If $S
eq 0H$ and so locates the flipped bit.