I need a RNG that produces every number once. I found a few LFSR (Linear feedback shift register) online but I get them producing 16 or 32 values. I need one that uses an unknown amount of bits (right now I want 22bits). I tried taking a 32bit LFSR and masking out the high bits but I get numbers that repeat as often as 9 times (I found 20 numbers repeated 8 times each).
How do I use a LFSR within a range or use it with a specified amount of bits?
Aucun commentaire:
Enregistrer un commentaire