Generating random binary bits in C

Status
Not open for further replies.

seamusmcd

New Member
hi, i was wondering is there anyway i can write c code to generate random binary bits........ thanks[/quote]
 
ill elaborate,

No, computers cannot generate random numbers, they can generate psudo-random numbers but these are just long sequences and can be predicted.

IF you are using linux (or *Nix) as a devel platform, you can use the random-number generator service to get a continuous stream of random data.

IF you are using a fisher-price operating system then your only bet is to to do a simplified version of what the linux Random-generator does.


How it works is to take "seeds" from teh truely random thing in the universe.... Humans.
Thus I would recomend monitoring you soundcard MIC input, thus you will have white noise in your input register, XOR with say the continous read from say the mouse buffers and it get a bit more random, add a few more human interations and you can get better.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…