Trailmakers

Trailmakers

Not enough ratings
7-bit RNG (Random number generator)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
97.655 KB
23 Dec, 2019 @ 11:38am
1 Change Note ( view )

Subscribe to download
7-bit RNG (Random number generator)

Description
Pseudorandom binary sequence (7bits pseudorandom number generator).
***Technical "boring" stuff: It implements a maximum length sequence (MLS) corresponding to the polynomial P(X) = X^7 + X + 1, so it has a chain of 127 numbers (from 1 to 127) "randomly" distributed until it starts repeating (or a binary chain output of 127 digits).
*** How to use it:
- The green logic blocks corresponds to the binary representation of numbers from 1 to 127.
- The red logic block outputs "ON/OFF" pseudorandomly -it will repeat the chain after 127 iterations-
- The yellow block initializes the seed on the green blocks; different seeds can be chosen with the exception of 0000000.
It's not a valid seed and so the circuit wont work.
- The purple block is the "clock"/user input. Currently is programmed so when the user hits space bar, it'll start generating numbers. The ideal scenario would be using an auxiliar module to get a number from the RNG when needed.


Example of an auxiliar module implementation for a guess ball game (using a 4bit version of this circuit): https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1944691891

A 4bit version of this circuit:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1944467736