--Apple-Mail-6--483280587 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On Jun 23, 2005, at 4:24 AM, Wouter van Ooijen wrote: > If you want it to generate for instance a random byte you must call > it 8 times, otherwise there will be a very strong correlation > between successive bytes. It depends on what you're doing. Calling the LFSR 8 times does not result in an output value that is any less predictable than calling it once (and ALL the bits change, even if you've only generated one new random bit, so it looks pretty good if you're simulating a flickering fire, or generating noise, or something like that.) Here's some "shuffle" code I was hoping to publish in one of those electronics magazines as a "design note." It gives you the numbers 1 through N in a random order, for any N (need not be power of two.) All in C... Enjoy BillW --Apple-Mail-6--483280587 Content-Transfer-Encoding: base64 Content-Type: application/zip; x-mac-type=5A495020; x-unix-mode=0755; x-mac-creator=53495421; name="shuffle.zip" Content-Disposition: attachment; filename=shuffle.zip UEsDBBQAAAAIACu2uTCqWbIiagQAAMUIAAALAAAAc2h1ZmZsZS50eHRlVU1v3DYQvetXDHLJLqpd xDbsQ4Ie0sQIeqgRND6noKSRxFoiFQ7ptfrr+4aSvNl2gf0SyTdvZt4b/k4nI/Qj2cjUWDHT5K2L 3NCpZ0fjTI5P9MfXG/r0mabBzBzo5NPQuLeR3kif2nbgN7TTpUK864S8q5nY1D1ZR8G4xo/kQ8Nh T8LPHMwgABPAhNiTbzP6cnQnZi7p6t27X1asCeEQuPVBEfPu2DPdKsDxeNwTfaTKRn0eGEzqaL2j 2rtn62okMXIRexPzoSn4Lphx5CDINCfw5PyJeryjp9Egb7zJ0JIWjg9WFHvjvZLKe0ZbB49AMfhh 0KL0XhjxRh9mLamGq0w1zNSmYaCKkQMrj5lM03ADXtg+3VDDtUdxjkS/pUizT9R45fZwf//5gpck FMAsnP5O+MAigjSp5uLMGVx/JEbyx6J4RAj8HLzguUYB9W3jX4OtjjWdLMgFjikgqf+DaPLGzYVL Y8VB/0Eno1CaNPrd7e3NbUlJrOvQduR6R9UcWQj9Glgk1y76YDpGfh+LSTg1/rCKYgXt2KG4EUd2 X/98+LKn2j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3UW2hqm0PhbEeVA/6xX99Opq/VI/n rtLlsycAZdFXw53voVUySvqrJCmoLN+/xaPkWzwUMwOaYjE5iSJCCyy9ckCHCqBQJErC0bGf+UqB U2onFSgnRJ4CaXNyRVSGZkvC15/S33FcSxiqnAuT0oEC92GM4mjlcyHSdK6LpLhsanNUnCqGHonm AS0qN1l0DN1hv17FrbFWEQ7+Ry9tsmPD9KZX1uj/POjqKLLpQf8LUEsBAhQDFAAAAAgAK7a5MKpZ siJqBAAAxQgAAAsAAAAAAAAAAAAAAKSBAAAAAHNodWZmbGUudHh0UEsBAhQDFAAAAAgALLa5MFGq RAc/BQAADA0AAA0AAAAAAAAAAAAAAKSBkwQAAHNodWZmbGVfbGliLmNQSwECFAMUAAAACAAstrkw J22QUh8CAAD8BQAADwAAAAAAAAAAAAAApIHGDAAAc2h1ZmZsZV9sb2cudHh0UEsBAhQDFAAAAAgA LLa5MDKLVIKdAgAAbAUAAA4AAAAAAAAAAAAAAKSB/QkAAHNodWZmbGVfdGVzdC5jUEsFBgAAAAAE AAQA7QAAABIPAAAAAA== --Apple-Mail-6--483280587 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --Apple-Mail-6--483280587--