Talk About Network

Google





Electronic Equipment > Digital Signal Processing (DSP) > Re: generate wh...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 11 of 11 Topic 14019 of 14426
Post > Topic >>

Re: generate white noise in assembly

by Raymond Toy <raymond.toy@[EMAIL PROTECTED] > Oct 24, 2008 at 09:08 AM

>>>>> "glen" == glen herrmannsfeldt <gah@[EMAIL PROTECTED]
> writes:

    glen> Raymond Toy wrote:
    glen> (snip, I wrote)

    glen> This is true if m is a power of two.  I believe it isn't
necessarily
    glen> true if m is not a power of two.  It is very common, though, for
m
    glen> to be a power of two.  Otherwise, if I need random low bits I
divide
    glen> by a prime number sort of near sqrt(m) before using it.

    >> Do you take the remainder as the random number?  If so, this has a
    >> bias, so the result isn't quite uniform.  May or may not matter.

    glen> Divide by some fairly large prime, then mod the (small) number

Divide meaning an integer divide, and using the quotient, ignoring the
remainder?   Yeah, that probably works well.  But this being a DSP
group, maybe the bias would go away if you take, say the top 8 or 16
bits, pretend it's a fraction (Q8 or Q16) and multiply by 6, and take
the integer part.  

I think that has no bias, except whatever is introduced by the
original random number generator.

Ray
 




 11 Posts in Topic:
generate white noise in assembly
"hbarcellos" &l  2008-10-09 04:36:14 
Re: generate white noise in assembly
"mikefromparis"  2008-10-09 12:51:41 
Re: generate white noise in assembly
Jerry Avins <jya@[EMAI  2008-10-09 14:28:41 
Re: generate white noise in assembly
Andor <andor.bariska@[  2008-10-09 11:42:24 
Re: generate white noise in assembly
Jerry Avins <jya@[EMAI  2008-10-09 15:22:51 
Re: generate white noise in assembly
Andor <andor.bariska@[  2008-10-09 12:56:45 
Re: generate white noise in assembly
Jerry Avins <jya@[EMAI  2008-10-09 16:18:46 
Re: generate white noise in assembly
glen herrmannsfeldt <g  2008-10-11 19:35:28 
Re: generate white noise in assembly
Raymond Toy <raymond.t  2008-10-23 17:29:55 
Re: generate white noise in assembly
glen herrmannsfeldt <g  2008-10-23 20:37:56 
Re: generate white noise in assembly
Raymond Toy <raymond.t  2008-10-24 09:08:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Thu Jan 8 18:23:42 PST 2009.