Richard Ottosen wrote: > > the original question asked for an 8-bit pseudo-random number > > generator. "RANDOM" is only 8 bits wide, so the routine produces > > a 255-step sequence. > Would it be better to take a few bits out of a longer sequence? As an > example, you could use 8 bits from a 24 bit random number generator. Richard: It would be DIFFERENT... But "better" would depend on the intended application. If, for example, the application required that the generator never return the same value twice in a row, taking 8 bits out of a longer shift-register WOULDN'T be better. Also, the original question asked for code that used as few registers as possible. An "8 out of 24" solution would require at least 3 or 4 times as many registers as the one-register 8-bit solution. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - San Diego, California === http://www.geocities.com/SiliconValley/2499