Framing 2026-10-31
Framing identifies the boundaries of data-link frames in a transmitted stream, allowing a receiver to locate separately interpretable link-level units.
A block code for line coding divides the data into five-bit groups and assigns each of the possible groups a distinct eight-bit codeword. The receiver reverses that assignment after finding the eight-bit boundaries. There are candidate codewords, so the designer has substantial freedom to select 32 suitable ones and reserve other patterns for control or synchronization.
The choice can limit long runs of equal bits to help clock recovery, balance high and low levels to reduce a persistent offset, and distinguish control patterns from data. These properties must hold across adjacent codeword boundaries too: two individually acceptable words can concatenate into an unacceptable run. The unused patterns can also help error detection and correction: an invalid received pattern exposes some errors, and the Hamming distance between valid codewords determines stronger guarantees. Redundancy alone does not imply that all errors are detected or correctable. Circuit complexity and propagation of a synchronization error also matter.
A physical link can deliver a continuous stream of bits; the data link layer needs to identify where each separately meaningful unit begins and ends. Framing supplies those boundaries, so the receiver can separate the data-link frame header, data and checking information, associate an error detection and correction result with a particular data-link frame, and regain alignment after damaged input.
Let . With CRC generator polynomial , the appended check has one bit. The preceding polynomial remainder rule gives , so put in the field with two elements. The eight transmitted bits areThey have even Hamming weight, so this cyclic redundancy check is a single parity-check code. For a substitution error polynomial , detection occurs exactly when : an odd number of the eight bits, including the check bit, have flipped. ThereforeIn particular, every single-bit error is detected, while flipping any two distinct bits passes this check. This conclusion assumes that the eight-bit word's boundaries and length are retained; it supplies no general protection against insertions, deletions or lost framing.