[Coco] AM Radio to CoCo Cassette Port to Random Number Generator Software

Melanie and John Mark Mobley johnmarkmelanie at gmail.com
Wed Apr 1 22:47:10 EDT 2020


I tuned the AM radio to a talk radio station.
I had the program generate 16-bit numbers.
I counted how many time it registered 65535, 65534, 65533, 65532, 3, 2, 1, and 0.
This is the results.
Total numbers generated: 100,000
65535) 0
65534) 1
65533) 0
65532) 0
3) 6
2) 8
1) 5
0) 10

So 10 times out of 100,000 the random number was 0.

You can make a histogram with these results.

I take these results to mean that the program is more likely to produce a string of consecutive 0s then consecutive 1s.

I think the best use of the program is to seed and reseed the pseudo random number generator.  If you reseed the pseudo random number generator every 100,000 readings that should work pretty good.

I wonder if you can seed the pseudo random number generator with 32-bit values.

I think you would get better results if you played the AM radio into a joystick port and read the port and took the least significant bit of each reading.  And built a larger number out of a number of least significant bits.

I recommend AM radio because it is more noisy.  And the least significant bit is more subject to noise.

I was working outside today (I think it was about 50 degrees Fahrenheit) and listening to the birds sing.  I thought how random the singing was.

-John Mark Mobley




More information about the Coco mailing list