In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Coriolis wrote: [quote="Electronegativity"] With the comparator hooked up to nothing it actually generates pretty random bits, but it seems to favor 0 a little over 1. [/quote]Sounds like a job for a binomial stochastic transform. If you can plot the density function of the numbers produced to see what the probability of p and q are (the likelyhood of it being a 0 or 1 respectively), you can do several things to get it to be p=q=0.5, the easiest is the rejection method. Say p=0.75 and q=0.25, if you throw away every 3rd 0 you obtain (don't use and get a new value instead), p and q will become 0.5. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=90112#m90587 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)