Re: How to develop a random number generation device



On Fri, 07 Sep 2007 08:03:25 -0700, John Larkin
<jjlarkin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

On Fri, 07 Sep 2007 09:31:26 -0500, John Fields
<jfields@xxxxxxxxxxxxxxxxxxxxx> wrote:

On Thu, 06 Sep 2007 20:24:00 -0700, John Larkin
<jjlarkin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

On Thu, 06 Sep 2007 19:46:42 -0700, John Larkin
<jjlarkin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

On Thu, 06 Sep 2007 18:23:18 -0500, John Fields
<jfields@xxxxxxxxxxxxxxxxxxxxx> wrote:

On Thu, 06 Sep 2007 15:10:40 -0700, bill.sloman@xxxxxxxx wrote:

On Sep 6, 10:49 pm, thiagu1...@xxxxxxxxx wrote:
Hi,

I'm a researcher. As a part of my project work I want to desing a
random number generated and displayed on a LCD/ LED module. Can
anybody help me out in this.

Thiagu

Search on pseudo-random binary sequence generators. Wikipedia has a
good general entry on the subject.

One way of getting a pseudo-random binary sequence is with a linear
feedback shift register - if you exclusive-OR the output with a couple
of carefully selected taps along the shift register you can guarantee
that the content of the shift register goes through all but one of tis
possible combinations.

It's often more than just a couple of the taps and, with a little
ingenuity, the "lockup" state can be included in the sequence.

If the feedback is pure xor, and it's a maximal length sequence, then
exactly one state is the lockup, and that's either all 1's or all 0's
in the register.

John

Hmmm, seems like all 0's must be the lockup for an all XOR feedback.

Sorry.
---
OK, but you missed my point, which was that it's possible to
eliminate the lockup state by forcing it to be part of the sequence.

I don't follow that. One state, all 0's usually, is the lockup. How do
you force that to be part of the sequence?

You can add a lockup state detector, a big OR gate or something, and
jam in a "1" if the whole register ever gets to the all-0's state, but
then the all-0's state is not part of the sequence, because it never
happens again.

---
You detect the state just before lockup, EXOR that with the output
from the taps and feed that signal to the input of the shift
register. That'll force a zero into the input and, after the next
clock, will cause the outputs of the shift register to be all zeros.

Now, though, the input to the shift register will be a one so, after
the next clock, the sequence will begin anew.
---

A maximal-length pr sequence has one sequence of (2^n)-1 states, and
another sequence of a single hangup state.

---
Done as above, the number of states will be 2^n.

I'll post a .exe simulation (8bit, 256 states) to abse and the
QBASIC source code for it in a little while so you can see how it
works.


--
JF
.



Relevant Pages

  • Re: How to develop a random number generation device
    ... Search on pseudo-random binary sequence generators. ... feedback shift register - if you exclusive-OR the output with a couple ... the "lockup" state can be included in the sequence. ... state to be zero. ...
    (sci.electronics.design)
  • Re: How to develop a random number generation device
    ... feedback shift register - if you exclusive-OR the output with a couple ... the "lockup" state can be included in the sequence. ... eliminate the lockup state by forcing it to be part of the sequence. ... none of which are zero. ...
    (sci.electronics.design)
  • Re: How to develop a random number generation device
    ... Search on pseudo-random binary sequence generators. ... feedback shift register - if you exclusive-OR the output with a couple ... the "lockup" state can be included in the sequence. ... If the feedback is pure xor, and it's a maximal length sequence, then ...
    (sci.electronics.design)
  • Re: How to develop a random number generation device
    ... Search on pseudo-random binary sequence generators. ... feedback shift register - if you exclusive-OR the output with a couple ... the "lockup" state can be included in the sequence. ... SYMATTR InstName V1 ...
    (sci.electronics.design)
  • STUPIDENT::Re: Generating Maximum Length Sequence using Galois LFSR
    ... Assuming that the taps have been loaded into variable "taps," and that "lfsr" is the variable being used in the shift register computation, I am trying to generate the sequence using code similar to that found on Wikipedia at the page http://en.wikipedia.org/wiki/Linear_feedback_shift_register. ...
    (comp.dsp)