If all that is wanted is a small run length of pseudorandom numbers, this can be accomplished by the following 8-bit multiplicative-additive congruential generator: X(n+1) = [27 X(n) + 3] mod 256 = [16 X(n) + 8 X(n) + 2 X(n) + X(n) + 3] mod 256 = [32 X(n) - 4 X(n) - X(n) + 3] mod 256 with X(0) = 27. The output of this sequence should appear as reasonably 'white' noise. Note that 16 X(n) is X(n) shifted left 4 bits with zero fill, etc., and mod 256 is simply accomplished by disregarding overflow bits and keeping only the low order 8 bits of the addend. I would presume that a linear shift register algorithm would give superior run length and spectral properties for the same computation time. I'll try to dredge up a validated one and post it to the list. ================================================================ Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: ral@lcfltd.com Least Cost Formulations, Ltd. URL: http://lcfltd.com/ 824 Timberlake Drive Tel: 757-467-0954 Virginia Beach, VA 23464-3239 Fax: 757-467-2947 "Vere scire est per causas scire" ================================================================