# Will we ever have truly random numbers?

This is a discussion on Will we ever have truly random numbers? within the C Programming forums, part of the General Programming Boards category; Will it ever be posible to generate truly random numbers? I know that just about every language I've been in ...

1. ## Will we ever have truly random numbers?

Will it ever be posible to generate truly random numbers? I know that just about every language I've been in contact with (by no means does that mean I am skilled with every one of them) has a function to generate pseudorandom numbers. To me it seems a computer is inevitably doomed to produce only pseudorandom numbers, since it is a machine that always functions logically (even errors have a logical reason that might nonetheless have to be understood only in a deeper level of logic). Could chaotic signals from analog circuits be the answer? I would really like to know what the experts think.

2. > Will it ever be posible to generate truly random numbers?
Not at long as computers are using math to do it. This is why computers are so much better at taking an ordered series and putting it in random order.

But if they were measuring something ...
http://random.org/

3. ## excellent point

I hadn't thought about it like that. I guess you don't have to go as complicated as chaotic signals to produce a random number.

4. The idea though I think is for most applications, pseudo-randomness will suffice, so long as the generator is built properly.

5. the only way to get a real random number would to be record a physical events out come, so you would have to have a physical thing happen in your computer, then you would have to have a way to confine its spectrum and then read is from sensors. this would have to be a special part in a computer so it is not worth it if possible.

6. ## I agree the scope of the app determines the randomness

A pseudorandom number is indeed sufficient for most applications. Nevertheless it is interesting to play with the idea of using a source of enthropy to generate truly random numbers (I read about the concept just now at www.random.org, thanks a bunch for posting it). One goes through high school toiling through classes and topics with no apparent relation to computers (Physics > Enthropy, for example) and then, surprise! Just makes me love programming all the more and makes me feel like part of the tao that we seem to be a part of.

7. Originally Posted by loopshot
the only way to get a real random number would to be record a physical events out come, so you would have to have a physical thing happen in your computer, then you would have to have a way to confine its spectrum and then read is from sensors. this would have to be a special part in a computer so it is not worth it if possible.
There are systems whereby such sensors are attached to a computer (eg via a serial or parallel port, or sometimes by dedicated cards) and used to generate random values. The approach isn't cheap, and is therefore only used for highly specialised applications.

Pseudo-random values are often more than sufficient for most applications. Even a poor quality generator is often more than sufficient.

8. That's entropy man.
http://en.wikipedia.org/wiki//dev/random

Or you can do it with bits of hardware
http://en.wikipedia.org/wiki/Hardwar...mber_generator

ISTR some of the later Intel CPUs have this capability.