
The arrangement of taps for feedback in an LFSR can be expressed in finite field arithmetic as a polynomial mod 2. The sequence of numbers generated by an LFSR or its XNOR counterpart can be considered a binary numeral system just as valid as Gray code or the natural binary code. This state is considered illegal because the counter would remain "locked-up" in this state. A state with all ones is illegal when using an XNOR feedback, in the same way as a state with all zeroes is illegal when using XOR. This function is not linear, but it results in an equivalent polynomial counter whose state of this counter is the complement of the state of an LFSR. As an alternative to the XOR based feedback in an LFSR, one can also use XNOR.it cycles through all possible 2 n − 1 states within the shift register except the state where all bits are zero), unless it contains all zeros, in which case it will never change. A maximum-length LFSR produces an m-sequence (i.e.The bits in the LFSR state which influence the input are called taps (white in the diagram).The sequence of bits in the rightmost position is called the output stream. The taps are XOR'd sequentially with the output bit and then fed back into the leftmost bit. The rightmost bit of the LFSR is called the output bit.


The bit positions that affect the next state are called the taps. The state ACE1 hex shown will be followed by 5670 hex. The feedback tap numbers in white correspond to a primitive polynomial in the table so the register cycles through the maximum number of 65535 states excluding the all-zeroes state.
