Formula:
An LFSR (Linear Feedback Shift Register) is a shift register whose input bit is a linear function of its previous state. The most common feedback function involves XORing specific 'tap' positions within the register to produce a new bit, which then shifts into the register while another bit shifts out.
- Initial State (Seed): The starting binary sequence (e.g.,
1011) loaded into the register. - Tap Positions: These are 1-indexed bit positions (from left to right, MSB to LSB) within the register whose values are XORed together to generate the feedback bit. For a 4-bit register
[b3 b2 b1 b0], taps4,3would meanb3 XOR b2. - Number of Cycles: This defines how many times the register will shift, resulting in an equal number of output bits generated.