Linear Feedback Shift Registers for the Uninitiated, Part XI: Pseudorandom Number Generation
Last time we looked at the use of LFSRs in counters and position encoders. This time we’re going to look at pseudorandom number generation, and why you may — or may not — want to use LFSRs for this purpose. But first —...
Summary
This blog post explains how linear feedback shift registers (LFSRs) are used for pseudorandom number generation, covering their strengths, limitations, and practical implementation choices. Readers will learn when LFSRs are appropriate for embedded firmware tasks and how to evaluate their statistical quality and security implications.
Key Takeaways
- Explain the differences between Fibonacci and Galois LFSR implementations and their firmware trade-offs.
- Implement a basic LFSR PRNG in firmware and choose maximal-length tap polynomials for full-period sequences.
- Assess PRNG quality using statistical test suites and understand when LFSRs are insufficient for cryptographic use.
- Integrate proper seeding and entropy sources to avoid predictable sequences in embedded systems.
Who Should Read This
Intermediate embedded firmware engineers and designers working on microcontrollers or SoCs who need to implement, evaluate, or select PRNGs for counters, simulation, testing, or low-security randomness.
TimelessIntermediate
Related Documents
- Consistent Overhead Byte Stuffing TimelessIntermediate
- PID Without a PhD TimelessIntermediate
- Introduction to Embedded Systems - A Cyber-Physical Systems Approach Still RelevantIntermediate
- Can an RTOS be really real-time? TimelessAdvanced
- Memory Mapped I/O in C TimelessIntermediate








