LFSR generator
Simulate a linear feedback shift register from a feedback polynomial and a seed.
LFSR generator
A linear feedback shift register shifts a fixed-width register one bit at a time, feeding the XOR of a chosen set of "tap" bits back into the top of the register while the bottom bit is shifted out as output. Chain enough steps together and you get a long, deterministic pseudorandom bit stream — the same technique behind CRC checks, spread-spectrum radio, BIST test patterns and old-school stream ciphers. This tool runs that simulation for any register width from 2 to 32 bits, so you can explore how a given polynomial and seed behave before wiring the same logic into hardware or firmware.
Set the register width, then enter the feedback polynomial (the tap positions) and the initial seed in binary, hex or decimal — whichever the input format option is set to. Output length picks how many steps to run, and output format controls whether each value is shown in binary, hex or decimal. Turn on batch mode to print the register's full state after every step, one per line, instead of a single concatenated bit stream — useful when you want to inspect the sequence of states rather than just the output bits.
The tool also reports the period: the number of steps before the register returns to its starting seed. A well-chosen polynomial on an n-bit register produces a maximal-length sequence with a period of 2ⁿ − 1, visiting every non-zero state exactly once before repeating — a handy way to check whether a polynomial you found in a textbook or datasheet is actually maximal. A seed of zero is rejected, since an all-zero register can never change state under XOR feedback; a seed or polynomial that doesn't fit the chosen width is rejected too, with a message telling you why.
Everything runs locally in your browser — the polynomial, seed and generated sequence never leave your device. Copy the result, download it as a .txt file, or send it straight into another tool's input to keep working with it.