   in computing, a linear-feedback shift register (lfsr) is a shift register whose input bit is a linear function of its previous state. the most commonly used linear function of single bits is exclusive-or (xor). 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 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. likewise, because the register has a finite number of possible states, it must eventually enter a repeating cycle. however, an lfsr with a well-chosen feedback function can produce a sequence of bits which appears random and which has a very long cycle. applications of lfsrs include generating pseudo-random numbers, pseudo-noise sequences, fast digital counters, and whitening sequences. both hardware and software implementations of lfsrs are common. the mathematics of a cyclic redundancy check, used to provide a quick check against transmission errors, are closely related to those of an lfsr. == fibonacci lfsrs ==  the bit positions that affect the next state are called the taps. in the diagram the taps are [16,14,13,11]. the rightmost bit of the lfsr is called the output bit. the taps are xor'd sequentially with the output bit and then fed back into the leftmost bit. the sequence of bits in the rightmost position is called the output stream. * the bits in the lfsr state which influence the input are called taps (white in the diagram). * a maximum-length lfsr produces an m-sequence (i.e. it cycles through all possible 2n&nbsp;â&nbsp;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. * as an alternative to the xor based feedback in an lfsr, one can also use xnor.[http://www.xilinx.com/support/documentation/application_notes/xapp210.pdf linear feedback shift
Binary_arithmetic Cryptographic_algorithms Digital_registers Pseudorandom_number_generators