LFSRs generate pseudo-random bit sequences with just a few logic gates. They are used in Wi-Fi scrambling, GPS codes, CRC checksums, built-in self-test of chips and old video game sound and random generators.
How to use the Linear Feedback Shift Register Calculator
- LFSR type
- Feedback
- Seed (initial state)
- Taps
- Number of output bits (0 = one full period)
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
Enter the seed and taps as bit strings of the same length (a 1 marks a tapped position). Choose Fibonacci or Galois form and XOR or XNOR feedback.
Tips
- Read the short explanation under each result – these tools illustrate classic ideas rather than everyday sums.
- Change one input at a time to see how the result reacts.
- Everything runs in your browser, so you can experiment freely.
- Check the worked example below the calculator if a result surprises you.
Common mistakes to avoid
- Using the wrong units for rates in queueing models.
- Expecting paradoxes to follow everyday intuition.
- Entering text where a number is expected.
Formula
Fibonacci: new bit = XOR of tapped bits, shifted in on the left
Maximal period = 2ⁿ − 1 for n bits
Worked example
Inputs — LFSR type: Fibonacci; Feedback: XOR; Seed (initial state): 1001; Taps: 0011; Number of output bits (0 = one full period): 0.
Results — Output sequence = 100110101111000; Period = 15 (maximal length 2⁴ − 1); States = 1: 1100 → output 1
2: 0110 → output 0
3: 1011 → output 0
4: 0101 → output 1
5: 1010 → output 1
6: 1101 → output 0
7: 1110 → output 1
8: 1111 → output 0
9: 0111 → output 1
10: 0011 → output 1
11: 0001 → output 1
12: 1000 → output 1
13: 0100 → output 0
14: 0010 → output 0
15: 1001 → output 0.
Key terms
- Tap
- A register position fed back into the XOR.
Frequently asked questions
What is a maximal-length LFSR?
One that cycles through all 2ⁿ − 1 non-zero states.
Why can't the seed be all zeros?
With XOR feedback the register would stay at zero forever.
Is an LFSR cryptographically secure?
No – the sequence can be recovered from 2n bits (Berlekamp–Massey).
What is the difference between Fibonacci and Galois forms?
Same sequences, different wiring: Galois XORs inside the register in parallel.
What formula does the Linear Feedback Shift Register Calculator use?
Fibonacci: new bit = XOR of tapped bits, shifted in on the left.