random generator

Discussion in 'General Electronics Chat' started by random3, Dec 25, 2010.

  1. random3

    Thread Starter New Member

    Dec 25, 2010
    2
    0
    dear, i have to make random number generator in DLD and i dont know how to do it, plz help me to do so, i m nervous pleeeeeese
     
  2. bertus

    Administrator

    Apr 5, 2008
    15,641
    2,344
  3. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,003
    1,517
  4. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    What voltage is it going to run off of, what components do you have available to you and what does the output have to be as? If it only has to light up an LED display it's easy to do, if you need to do it on a microcontroller or CPU it's no real big deal either.

    10 X = RND(0)
    randomValue = CInt(Math.Floor((upperbound - lowerbound + 1) * Rnd())) + lowerbound
    x1 = ( x0 * a + c ) MOD (2^24)

    You are nervous but shouldn't be, still haven't figured out what DLD is supposed to stand for.
     
  5. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Digital Logic Design

    I am guessing something along the lines of a LFSR (Linear Feedback Shift Register), it is a Pseudo-Random number generator.

    Is the RNG to be designed for simulation, discrete logic ICs, FPGA, or in a microcontroller?

    Take a look at the LFSR Wiki Entry
     
Loading...