EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Random Number Generation -----> Hardware or Software?

Started by Motaz K. Saad March 4, 2005
Hi every one,
I would like 2 ask about the random number generation.
Is random number generation function/method in programming languages
implemented in software layer or in hardware layer, and if it is
implemented in software layer, how it is implemented in the regular
calculator i.e. pocket calculator (not calculator program).
thanx

On 2005-03-04, Motaz K. Saad <motsad@yahoo.com> wrote:

> I would like 2 ask about the random number generation.
to This is Usenet is not a cellphone.
> Is random number generation function/method in programming > languages implemented in software layer or in hardware layer,
Usually software. Sometimes hardware. Sometimes a combination.
> and implemented in software layer, how it is implemented in > the regular calculator i.e. pocket calculator (not calculator > program).
You'd have to ask the calculator's manufacturer. -- Grant Edwards grante Yow! Is a tattoo at real, like a curb or a visi.com battleship? Or are we suffering in Safeway?
In article <1109950956.744842.36530@z14g2000cwz.googlegroups.com>,
"Motaz K. Saad" <motsad@yahoo.com> writes:
|>
|> I would like 2 ask about the random number generation.
|> Is random number generation function/method in programming languages
|> implemented in software layer or in hardware layer, and if it is
|> implemented in software layer, how it is implemented in the regular
|> calculator i.e. pocket calculator (not calculator program).

Software.  It would have been in hardware back in the days of
the first calculators, but now most of them use a fairly general-
purpose chip that executes a program from ROM, PROM or whatever.
Call it firmware if you like.  I can't tell you how many use a
specialised hardware random number generator (which exist), if
any do.


Regards,
Nick Maclaren.
On 4 Mar 2005 07:42:36 -0800, Motaz K. Saad <motsad@yahoo.com> wrote:

> Is random number generation function/method in programming languages > implemented in software layer or in hardware layer [...]
Note also that these (software) library functions generate *pseudo-random* sequences. True random sequences are impossible to be achieved by solely software means. Vadim
Motaz K. Saad wrote:
> Hi every one, > I would like 2 ask about the random number generation. > Is random number generation function/method in programming languages > implemented in software layer or in hardware layer, and if it is > implemented in software layer, how it is implemented in the regular > calculator i.e. pocket calculator (not calculator program). > thanx >
Actually there are no software random number generators. Generating random numbers is very difficult. del cecchi
In article <38rjesF5p8o5fU1@individual.net>,
Del Cecchi <cecchinospam@us.ibm.com> writes:
|> 
|> Actually there are no software random number generators.  Generating 
|> random numbers is very difficult.

If it is impossible to determine that a generator is not truly
random without invoking godlike powers, is it random?

Therefore, if it is infeasible to determine that a black-box
pseudo-random generator is not truly random without breaking
open the black box, should it be regarded as random?

You can ask exactly the same about a quantum state.  If you
answer "yes" and "no" to the above, then physical randomness
would disappear if anyone ever found a way of measuring a
quantum state directly, however impractical.

The philosophy of randomness is a lot more complex than most
people realise.


Regards,
Nick Maclaren.


Nick Maclaren wrote:
> In article <38rjesF5p8o5fU1@individual.net>, > Del Cecchi <cecchinospam@us.ibm.com> writes: > |> > |> Actually there are no software random number generators. Generating > |> random numbers is very difficult. > > If it is impossible to determine that a generator is not truly > random without invoking godlike powers, is it random? > > Therefore, if it is infeasible to determine that a black-box > pseudo-random generator is not truly random without breaking > open the black box, should it be regarded as random? > > You can ask exactly the same about a quantum state. If you > answer "yes" and "no" to the above, then physical randomness > would disappear if anyone ever found a way of measuring a > quantum state directly, however impractical. > > The philosophy of randomness is a lot more complex than most > people realise. > > > Regards, > Nick Maclaren. > >
I used to agree with you, but I changed my mind. :-)
Del Cecchi <cecchinospam@us.ibm.com> writes:

> Actually there are no software random number generators. > Generating random numbers is very difficult.
Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin. John Von Neumann, 1951 -- David Magda <dmagda at ee.ryerson.ca>, http://www.magda.ca/ Because the innovator has for enemies all those who have done well under the old conditions, and lukewarm defenders in those who may do well under the new. -- Niccolo Machiavelli, _The Prince_, Chapter VI
"Motaz K. Saad" <motsad@yahoo.com> wrote:
> Hi every one, > I would like 2 ask about the random number generation. > Is random number generation function/method in programming languages > implemented in software layer or in hardware layer, and if it is > implemented in software layer, how it is implemented in the regular > calculator i.e. pocket calculator (not calculator program). > thanx
Any good random number generators that I know of rely on the system clock - and specifically, are based on the number of milliseconds that have elapsed as a "seed" value. The hardware platform will then use this seed value as an offset value into a hard-coded lookup table in memory. Two numbers generated in a row will have similar offsets into the table but their resulting values will depend on the corresponding table values at those offsets. Basically, any crude hardware device that is able to oscilate can be used as an offset for a random number generator table, such as a simple capacitor that is able to charge and discharge. Of course, the more "randomness" that is desired, the bigger the lookup table needs to be. A crappy random number generator could also be created to use only a lookup table and simply increase the offset into the table by 1 each time. This is not true randomness by any stretch of the imagination. -- MT
"Nick Maclaren" <nmm1@cus.cam.ac.uk> wrote in message 
news:d0a655$j4k$1@gemini.csx.cam.ac.uk...
> If it is impossible to determine that a generator is not truly > random without invoking godlike powers, is it random? > > Therefore, if it is infeasible to determine that a black-box > pseudo-random generator is not truly random without breaking > open the black box, should it be regarded as random? > > You can ask exactly the same about a quantum state. If you > answer "yes" and "no" to the above, then physical randomness > would disappear if anyone ever found a way of measuring a > quantum state directly, however impractical. > > The philosophy of randomness is a lot more complex than most > people realise.
If the only way to *show* that a generator is not random is by invoking godlike powers, then for all practical purposes, this proves that the generator IS truly random and can be regarded as such. On the other hand, if current technology is unable to prove that a generator *is not* truly random, then for all practical purposes the generator can be treated as being truly random, but this says nothing about whether it actually *is* or *is not* truly random. The philosopy of randomness involving "godlike powers" is a futile and pointless discussion at best, and doesn't serve to offer any insight into any practical matters. Philosophy itself as a subject is completely useless from a practical standpoint, and I don't even know why I'm wasting my time talking about it. -- MT To reply directly, please take all 5 occurrences of the letter 'y' out of my address.

The 2024 Embedded Online Conference