| ??? 03/13/05 12:55 Read: times |
#89570 - LC RNG Responding to: ???'s previous message |
Besides Linear Feedback Shift Register (LFSR) pseudoRandom Number Generators (RNG), which are very easy to implement in hardware; for simple applications, Linear Congruent generators (LCRNG) can be used easily. The basic scheme is simple: take the previous number, multiply by constant A, add constant B, and divide modulo C. A, B and C have to bechosen carefully so that the RNG has the maximum possible period (=C). Often, C is a power of 2, e.g. for 16-bit RNG, C may be 65536 - hence, the mod operation is simply ignoring the overflown part. A simple 8-bit RNG can be constructed for A=9 and B=7. True RNGs can be constructed using some sort of physically generated noise. In microcontrollers, if they have an ADC, often the LSB can be used as a sort of randomness, with careful considerations. Jan Waclawek |
| Topic | Author | Date |
| Randomization? | 01/01/70 00:00 | |
| No RND op code in 8051/52 | 01/01/70 00:00 | |
| Random Number | 01/01/70 00:00 | |
| random stuff | 01/01/70 00:00 | |
| We can also count.... | 01/01/70 00:00 | |
| But Good Enough!!! | 01/01/70 00:00 | |
| LC RNG | 01/01/70 00:00 | |
| Random what? | 01/01/70 00:00 | |
| maxim's lfsr | 01/01/70 00:00 | |
| the dangers of thinking random is random | 01/01/70 00:00 | |
| wibbly maths | 01/01/70 00:00 | |
| Good old Galois Fields | 01/01/70 00:00 | |
| Bet you didnt know | 01/01/70 00:00 | |
| Try this link | 01/01/70 00:00 | |
| While browsing | 01/01/70 00:00 | |
| rand() | 01/01/70 00:00 | |
| still pseudo | 01/01/70 00:00 | |
| better pseudo! | 01/01/70 00:00 | |
| rand() is part of stdlib.h | 01/01/70 00:00 | |
| true, but not the point | 01/01/70 00:00 | |
application dependent | 01/01/70 00:00 |



