[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Random Number Question



Michael Black wrote:
On Tue, 6 May 2008, nem wrote:

Michael Black <et472@ncf.ca> wrote in news:

But since a white noise source isn't something you normally have on
hand


I know on the C64 you could use the SID chip to get true random numbers,
however Commodore BASIC generates pseudo-random numbers exactly like
Applesoft BASIC.

If I'm remembering properly, the white noise source in the SID was actually generated by a long shift register configured to generate
a pseudo-random sequence.

It was generally easier to generate "random" that way than put some
current through a diode and amplify the results, despite the pseudo
random shift register being "larger".  But in IC design, sometimes the
most direct method is not the easiest way.

I'm not certain about the SID, but I do know other sound generator
ICs like the General Instrument one did use a shift register.

Of course, even given a white noise source, you'd have to still
have hardware to convert to some digital form.  Hence it is usually
easier to do a pseudo random number in software.

And sampling a real noise source, like an amplified diode junction,
is a *real* random number.

Any algorithmically produced number is, at best, pseudo-random, meaning
that the sequence is completely deterministic but can pass most tests
for randomness.

John von Neumann famously joked, "Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin."
;-)

-michael

NadaPong: Network game demo for Apple II computers!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it's seriously underused."