ELi5 , how do random number generators work?

719 views

How is it different than the program just choosing the number it wants within range?

In: 6

11 Answers

Anonymous 0 Comments

Computers have a very hard time generating actual random information. To generate the entropy (chaos) needed to get actual random information, it is often necessary to use an external source of random data.

Short of that, computers can use something called a pseudorandom number, which is not truly random- but is random enough for many purposes, or within a certain context. For example, using the number of microseconds elapsed since a specific time together with information about how a user moves a mouse is one way.

Truly random data is frequently created by using things like weather patterns, radioactive decay, or- my favorite- pointing a camera at a wall covered with lava lamps and putting the resulting picture through an algorithm to create random numbers.

You are viewing 1 out of 11 answers, click here to view all answers.