View Single Post
  #89   Report Post  
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.basics
rickman rickman is offline
external usenet poster
 
Posts: 399
Default "Random" Circuit Needed.

On 4/19/2015 3:15 AM, John Fields wrote:
On 19 Apr 2015 03:14:30 GMT, Jasen Betts wrote:

On 2015-04-18, David Eather wrote:
On Thu, 02 Apr 2015 20:42:50 +1000, Jasen Betts wrote:


I was wondering about that myself... I'll see if there's a cure.

r=(75*r+74)%65537 visits 0-65535 with no gaps.

not that i'd want to build it using 74LS logic.


That is an absolute turd. It screws up if the cycle tries to repeat more
than once - it not longer visits 0 - 65535 without gaps (it outputs a
665536 which needs 17 bits) and will miss a 16 bit number every cycle
after the first, OR if the 17-th bit is ignored it will produce an excess
number of zeros.


No, that is absolute bull****.

it's this:
http://en.wikipedia.org/wiki/Lehmer_...mber_generator

except offset by -1 so that the Lehmer zero state (which is
disallowed) is excluded and the maximal state fits in 16 bits.


---
If the all-zeroes state is disallowed, then there'll always be a
bias on the output.

The circuit I posted includes the all-zeroes state and, in fact, all
of its dflops are/can be cleared in order to initialize it.


I'm not sure what you are going on about. Jasen's circuit does visit
every value from 0 to 65535 and does not visit 65536. In fact, if you
set it to 65536 it remains locked in that state. I think your analysis
is faulty... or mine is. I coded it up in a spread sheet and don't see
any problems with it.

--

Rick