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

Melanie and John Mark Mobley johnmarkmelanie at gmail.com
Fri Apr 3 18:12:28 EDT 2020


I tuned the AM radio to static.
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: 129,073
65535) 0
65534) 0
65533) 0
65532) 0
3) 29
2) 173
1) 198
0) 1423

So 1423 times out of 129,073 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.

So it looks like talk radio gives better results than static.

So sampling the cassette port is not a very good way to get random numbers.

I think playing the audio into the joystick port (or an analog-to-digital port) would work better.

-John Mark Mobley




More information about the Coco mailing list