A binary linear-feedback shift register of degree updates a -bit state by shifting and inserting a fixed linear combination over . With recurrence
its feedback polynomial is .
Under the convention that a register emits each shifted-out symbol, its first output symbols are exactly its initial fill. Thus a binary register of length has distinct outputs from nonzero fills. For lengths , at least one longer-register output is absent from the shorter register, guaranteeing a pair of unequal nonzero outputs. The two sets need not be disjoint: recurrences and both generate constant ones. Nor must they intersect: the length-one recurrence and have no common nonzero output, since constant ones fail the second recurrence.
The feedback polynomial records the coefficients of an LFSR recurrence. With the convention
it is .
A feedback shift register updates a finite state by shifting its stored symbols and inserting the value of a feedback function of the previous state. The feedback function need not be linear.
The Berlekamp-Massey algorithm finds the shortest linear recurrence satisfied by a finite sequence over a field. It processes symbols incrementally, updating the connection polynomial whenever the current recurrence has a nonzero discrepancy.
Suppose a connection polynomial of degree at most , with recurrence span gives zero recurrence discrepancies through index but a nonzero discrepancy at . If a polynomial of span successfully explains the prefix through and , evaluate the coefficient at in the convolution . Applying first makes it zero. Applying first leaves its nonzero discrepancy at , because the earlier discrepancies vanish and has constant coefficient one. This contradiction gives the displayed lower bound. It is the minimality step used by the Berlekamp-Massey algorithm; the algorithm cancels the new discrepancy with a shifted earlier failed polynomial.
The shortest binary linear recurrence producing the prefix has length three:
Its connection polynomial is .
A degree- binary register has states. The zero state is fixed, so a nonzero periodic orbit has length at most .
A maximal-period feedback polynomial cannot have as a root. Over , this says
so an even number of the coefficients equal one and the full monic polynomial has an odd number of nonzero coefficients.
If an output prefix contains consecutive zeros followed by a one, no register of degree at most can generate it: the all-zero state would have been reached and would remain zero forever.
The seven consecutive zeros followed by one force degree at least eight. Degree eight is attained by , with initial state and feedback polynomial .
Let , let generate , and let be nonzero linear with nondegenerate bilinear form . If the minimal polynomial of is , then satisfies
so it is produced by an LFSR of length at most . Its period is exactly : any period would imply for every , hence by nondegeneracy.

Articles by others on the same topic (1)

A Linear Feedback Shift Register (LFSR) is a type of sequential circuit that consists of a shift register and a linear feedback mechanism. It is widely used in digital systems for a variety of applications, including pseudorandom number generation, cryptography, error detection and correction, and digital signal processing.