

Try feeding back different outputs of the 8 bit shift register to make a different length shift register to make a longer or shorter pseudo-random sequence. The same pattern should appear at all the outputs of the shift register but delayed by different numbers of clock cycles depending on where along the shift register you are looking. A sufficiently long LFSR with a well-chosen feedback function can produce a sequence of bits which appears random and which has a very long cycle before repeating.īoth hardware and software implementations of LFSRs are common.įigure 2, Low pass filtering one digital output In addition, because a register of finite length 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 output value it produces is completely determined by its current (or previous) state. An LFSR is most often a shift register where the input bit is driven by the exclusive-or (XOR) of certain bits of the contents of the overall shift register. The XOR function can also be viewed as part of the digital addition function in that XORs are used as the Sum portion of the simplest form of the half adder. In digital signal processing, a linear-feedback shift register, or LFSR, is a shift register where the input bit is a linear function of its previous state.Ī common linear function of single bits is the XOR.
