> Just a thought about "randomness"... > > A pseudo RNG made up from a shift > register > with feedback will never produce two the same > value in > sequence, right ? Is it that > that is "pseudo" with it ? Not so sure about that...although that might be part of the "pseudo", I think the bigger part is the fact that if you load the register with the same starting value, the sequence it produces will always be the same, even though the output (without knowledge of the internal workings) appears to be unpredictable. And, for that matter, it is possible to produce a shift register based PRNG that will spit out short stints of identical sequences. All one needs to do is to not use every bit in the register (use, say, 8 non-sequential bits of a 32-bit register), and the possibilty occurs of a repeating sequence of bits without the register being hung in a predictable state. > >From a *true* > RNG you'd expect that > there will be sequences (of any lenght if the > generator is run "forever") of repeated values, not? For truly random, yes, you could expect interludes of repeated sequences. Mike H. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist