More playing with the 41-bit linear feedback shift register because I can't leave the thing alone 🙂
Good morning all…
Youtuber, shed dweller, solar charge controller aficionado
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Does it need robust ECC ideally? Can cosmic rays suddenly change a bit making it predictable?
can you show us the general circuit diagram
The phenomenon of patterns with few ones not looking very random happens in a big way with the Mersenne Twister PRNG. If you start it in a state that's mostly zeroes, it takes thousands of cycles before it starts producing decently distributed outputs. Typically one uses another small PRNG to seed it.
At 2MHz the cycle would repeat every 305.42 hours, or 12.72 days
is that kinda how random seeding worked in basic?
populate with a random seed and let randomize go from there in its psudo random order
I figured out last video at 1Hz it would take almost 70000 years before it would start to repeat, and at about 1MHz it would take a little over 25 days before it would start the pattern again, so at 2MHz, I am guessing about 12.5 days? A shockingly long time considering how fast its running. Even at 1GHz, its going to be longer then a half hour. Although it helps put into perspective the amount of 1's and 0's a computer can wrangle.
Very cool =)
About 12.75 days.
I don't suppose you'd care to post a circuit diagram?
I'm looking this a lot. I'll make a board of that. With jumpers from the XORs. Yes, I like that a lot.
Just repeating what I said on the earlier video, you can get a near-enough-to-random number from a scientific calculator by entering a decimal point followed by some random digits, then taking the natural antilogarithm followed by the reciprocal.
You will get a decimal number which, unless you're a mathematical savant or you've cheated, will be effectively random.
I notice some people have compared the output to The Game Of Life.
In case anyone doesn't know The Game Of Life, it's a game where you use a grid of dots, where each dot can be lit (alive) or unlit (dead).
Each generation, you check how many "living" (lit) neighbours the pixel has. If it has less than 2 living neighbours, it dies of loneliness for the next generation. If it has 2 living neighbours, it remains unchanged in the next generation. If it has 3 living neighbours, it is alive in the next generation. Any more than 3 living neighbours and it dies of overcrowding for the next generation.
I think if you print out the initial pattern in rows with the right alignment you'll get a Sierpinski triangle. Try it!
Let's just put this to rest. A LFSR does not generate random numbers. Arguably, it does not even produce pseudo-random numbers, because the pattern repeats, identically, after 2n − 1 states. Knowing the current state, you also know the next state.
There are interesting similarities here to Conways game of life, the patterns even appear similar. Not surprising I suppose as they both use XOR to generate the next state based on the current state.
Counting sheep is for amateurs!