Author Options:

Where does a calculator get a random seed from? Answered

Most, if not all, scientific and graphing calculators have a #RAND button on them, this generally generates a random number between 0 and 1 (I think).

Now, as we all (might) know, a calculator is a computer, and thus thinks in logic and cannot generate a truly random number, and, as we also (might) know, any pseudo-random number generated has to come from a seed value.

Some things take it from the time and date, others from the time between a user's input, I have even heard stories of a program asking a used to 'bash wildly on the keyboard like a monkey'. So my question is this:
Where does my calculator get its seed value from?

By the way, I cut it into paragraphs to make it more readable



Best Answer 10 years ago

Each calculator/cpu/software has its own method I'm pretty sure a lot of them seed with # of milliseconds since cpu turned on. # of bytes of ram used, rom used, time since last button press, even random things if they have sensors like temperature of the cpu. The sum of all the variables in the system, etc.


10 years ago

Since your calculator already has the ability to store several numbers in memory, I suspect that it has a special storage location for the last random number generated and that it uses this as the seed.

To test this theory, try this:
  • Take the batteries out of your calculator (including any backup battery).
  • Replace them and turn it on
  • Generate one random number without pressing any other buttons
  • Repeat the previous three steps

If the seed is stored as I suggested, you should get the same number both times.