View Single Post
  #35   Report Post  
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
Robert Baer[_3_] Robert Baer[_3_] is offline
external usenet poster
 
Posts: 488
Default Random Bit Generator

Vladimir Vassilevsky wrote:


Jim Thompson wrote:

I'd like to conjure up a random bit generator.


Question: Why it is impossible to have sex in the middle of the Red
Square in Moscow?

Answer: Because every idiot bystander will be eager to give his
invaluable advice.


So everybody is suggesting the LSFR. LSFRs are trivial; zero state
problem has to be dealt with. I try doing something different just for
the sake ot it.

Take a binary counter, compute some ugly logical function from its
output.

Vladimir, What's your definition of "ugly" ?:-)


Take two binary counters. One counts to 2^N, the other one counts to
some odd number. Compute parity function of both counters. Here you go.

Take a binary adder and a register. Add some odd number at every cycle.
Tale a bit somewhere from the middle of the register.

Take a binary adder and a register. Multiply by (2^N - 1), i.e.
leftshift and subtract. Set the LSB to 1 to avoid all zero state.

There is approximately a zillion of ways of making quazi random (or true
random) generator from whatever stuff you got in the drawers. BTW, some
25 years ago I made random generator from relays. However, that was LSFR
:-)



Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com

One CANNOT compute (or generate from logic) a truly random number.
Now, quasi-random number generators are a dime a dozen, like you imply.