
This function is an affine map, not strictly a linear map, but it results in an equivalent polynomial counter whose state 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.A maximum-length LFSR produces an m-sequence (i.e., it cycles through all possible 2 m − 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.The bits in the LFSR state that influence the input are called taps.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 shown, 0xACE1 ( hexadecimal) will be followed by 0x5670. The feedback tap numbers shown correspond to a primitive polynomial in the table, so the register cycles through the maximum number of 65535 states excluding the all-zeroes state. However, other methods, that are less elegant but perform better, should be considered as well.Ī 16-bit Fibonacci LFSR. One can produce relatively complex logics with simple building blocks. In general, the arithmetics behind LFSRs makes them very elegant as an object to study and implement. The mathematics of a cyclic redundancy check, used to provide a quick check against transmission errors, are closely related to those of an LFSR. Both hardware and software implementations of LFSRs are common. However, an LFSR with a well-chosen feedback function can produce a sequence of bits that appears random and has a very long cycle.Īpplications of LFSRs include generating pseudo-random numbers, pseudo-noise sequences, fast digital counters, and whitening sequences. Likewise, because the register has a finite number of possible states, it must eventually enter a repeating cycle. The initial value of the LFSR is called the seed, and because the operation of the register is deterministic, the stream of values produced by the register is completely determined by its current (or previous) state. Thus, an LFSR is most often a shift register whose input bit is driven by the XOR of some bits of the overall shift register value. The most commonly used linear function of single bits is exclusive-or (XOR). In computing, a linear-feedback shift register ( LFSR) is a shift register whose input bit is a linear function of its previous state. Short description: Type of shift register in computing
