Home · Everyday · Bases, Binary & Logic · LFSR Calculator

LFSR Calculator

Run a Fibonacci LFSR: tap positions, seed and steps in, the state sequence and output bits out.

Your figures

Example result — edit the figures to make it yours

1001 → 0100 → 0010 → 0001 → 1000 → 1100

Register states

A Fibonacci-form LFSR of width 4: each step shifts right and feeds the XOR of the tapped bits (4, 1) into the top. With primitive tap sets the sequence cycles through all 15 non-zero states. The headline figure is the final state in decimal.

Final state (decimal)12
Output bits (LSB per step)00100
Maximum period15

What this calculator does

Run a Fibonacci LFSR: tap positions, seed and steps in, the state sequence and output bits out. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.

The formula and method

Each step shifts right; the XOR of the tapped bits enters at the top

A linear-feedback shift register shifts its state each step and feeds back the XOR of the tapped bits.

The tap list names bit positions counting from the highest bit of the register.

A zero state is absorbing — the register never leaves it — so seeds must be non-zero.

Worked example

With the example inputs this page opens with (seed state (integer) 9, steps to run 5), the result is 1001 → 0100 → 0010 → 0001 → 1000 → 1100 — register states. A Fibonacci-form LFSR of width 4: each step shifts right and feeds the XOR of the tapped bits (4, 1) into the top. With primitive tap sets the sequence cycles through all 15 non-zero states. The headline figure is the final state in decimal.

Quick reference

Quick reference — varying seed state (integer)
Seed state (integer)Register states
4.50101 → 1010 → 1101 → 0110 → 0011 → 1001
7.20111 → 1011 → 0101 → 1010 → 1101 → 0110
91001 → 0100 → 0010 → 0001 → 1000 → 1100
11.251011 → 0101 → 1010 → 1101 → 0110 → 0011
13.51110 → 1111 → 0111 → 1011 → 0101 → 1010
101010 → 1101 → 0110 → 0011 → 1001 → 0100

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

How does the LFSR Calculator work?

Run a Fibonacci LFSR: tap positions, seed and steps in, the state sequence and output bits out. Taps · Seed · Steps → State sequence. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the LFSR Calculator need?

Taps · Seed · Steps → State sequence. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.

Is the LFSR Calculator free to use?

Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.