01-27-2021 12:36 PM
In this task you will create
a new VI - "Shift Register" for the generation of random numbers.In contrast to the VI "Random Number": it outputs, among other things, an array of random numbers and allows insight into the
internal states of the random number generator.
The random number generator is controlled by a
of a feedback shift register, as shown in
as shown in
Figure 2. The digits
S = {s0 ... s_N-1} correspond to
the binary digits of the corresponding
random number and are
the state S.
To calculate the new state S^x+1 from the current state S^x (i.e. the next
(i.e. the next random number), the bit from s0 is fed back,
XORed via the so-called taps ti with certain other
states and the result is assigned to the state s^x+1_N-1.
The remaining digits result from shifting "to the
to the right". A random generator can thus be characterized
by the number of digits N and the chosen
Taps T. The taps can be compactly described as a binary number,
where a 'one' at digit i means that the tap is set,
zero' means that the tap
is not set. The generation
of Z = 31 random numbers
for a random number generator
N = 5 and T = 1011(2) = 11(10)
and the initial state
S = {10101(2) = 21(10)} is.
01-27-2021 12:49 PM - edited 01-27-2021 12:49 PM
Hi there, please see the guidelines for productive forum posts
Unofficial Forum Rules and Guidelines // Ask Smart Questions
01-27-2021 12:55 PM - edited 01-27-2021 12:56 PM
Also, if it's homework - which I'm 99.99% sure this one is - then just say so, so we can know how to help you. It's not that we won't, but if you don't put any effort into it, then we won't, either. Show us what you've tried, then we can build on that.
01-28-2021 04:09 AM
i apologize for the ill-considered post, i would like to know the best way to start with this task. I have just started with Labview and do not know how to work with a "shift register". I was thinking of starting with a for loop and adding several shift registers to it.
thanks for your quick answer!
01-28-2021 10:54 AM
@Meriii wrote:
i apologize for the ill-considered post, i would like to know the best way to start with this task. I have just started with Labview and do not know how to work with a "shift register". I was thinking of starting with a for loop and adding several shift registers to it.
thanks for your quick answer!
It's not ill-considered. You just didn't know how to ask the question. On the main LabVIEW forum page, under "LabVIEW Training Resources", there are several links to some good training resources. This link will help as well: Passing Data Between Loop Iterations in LabVIEW.
From the LabVIEW Help --> Find Examples... menu, search for shift registers. There are a couple of examples that show how to use them.
This should give you something to go on. You can then post your resulting VI and we can help you!