English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Taking a computer to its basics code a computer reads either a yes or no or "0" or "1" as i understand it. Therefore how can a program genuinely randomise something, ie pick a number between 1 and 100. I'm not a computer expert so it's probably obviously but it was something me and a friend somehow started talking about and we don't know.

2007-01-21 06:05:06 · 6 answers · asked by Anonymous in Computers & Internet Programming & Design

6 answers

As far as I know, random numbers are not exactly random, they are pseudo random. For exampe you can generate pseudorandom number, by using some special equation on exact time. But more variables you take in that equation more random it will be. So just imagine, taking actual teperature, time, and many other variables, then you can generate "almost" random number.

2007-01-21 06:13:06 · answer #1 · answered by Anonymous · 2 0

Its just in the programming. A PC will only randomize something if its asked to. Also picking a number between 1 and 100 isn't a yes no answer, there are 100 choices, not 2. Simple programming does the rest

2007-01-21 06:14:36 · answer #2 · answered by Jon F 2 · 0 1

True, computers cannot create perfectly random numbers using software. It can do a pretty good job by using specific algorythms using the milliseconds of the computers system clock as a starting point (seed).

However, true randomness can be generated from sound intereference coming from various hardware on the input ports. This is what poker sites and casino's use to generate true randomness.

Also, various websites offer large sets of numbers generated using the above method for sale to gaming companies and other services.

2007-01-21 06:15:40 · answer #3 · answered by Dudeberry 2 · 0 0

I agree with fuho.fuho. Some programs dealing with cryptography (i.e. generating large random numbers) ask the user to move the mouse and press mouse buttons randomly for some seconds. The intervals between these events is used in the generating function. So: it ain't random, but you'll never get the same number twice.

2007-01-21 09:39:09 · answer #4 · answered by miket 4 · 0 0

The computer has a clock inside that goes down to 0.0001 second. The random numers are generated from the clock and a mathamatical formula.

2007-01-21 06:12:03 · answer #5 · answered by monkeymanelvis 7 · 2 0

You can get hardware RNG's. I believe VIA motherboards have one. A hardware RNG does generate good randomness.

2007-01-21 10:13:19 · answer #6 · answered by gam3fr3aks 3 · 0 0

fedest.com, questions and answers