Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!agate!ucbvax!hplabs!hp-pcd!hplsla!jima From: jima@hplsla.HP.COM (Jim Adcock) Newsgroups: comp.lang.c Subject: Re: How do I get random #s? Message-ID: <5260007@hplsla.HP.COM> Date: 9 Feb 89 19:13:45 GMT References: <19415@dhw68k.cts.com> Organization: HP Lake Stevens, WA Lines: 15 > I finally got tired of non-random random numbers, so > I hooked an ADC converter and a hot resistor to my computer and xor'ed the > results from it with rand(). This gives me about 10000 really random numbers > a second. It is not trivial to get REALLLY random numbers out of such > a setup, but it can be done. My concern would be with using the [multi-bit?] ADC. We use a similar technique to generate noise sources for our FFT analysers, only using well known tapped shift registers, bitwise results xor'ed with a one-bit result from a one bit-ADC and a noise diode. We then collect say 16-bits from the shift register to make a 16-bit word. While neither the shift register nor the diode make all that great "random noise", the result of the xor is the convolution of their two spectrums, so the result is generally pretty good. You still need to keep the shift register and the noise diode isolated though.