# Random "bit" generator

#### k1ng 1337

Joined Sep 11, 2020
101
Hi I have a project that utilizes the 74hc138 3 to 8 line decoder IC who's outputs (all inverted) light a specific color and pattern on the wall via LEDs

I have included an image of the function table, inputs A,B,C are three independent 555 timers in astable mode, my frequencies are much slower but for simplicity let's say

A - 1hz
B - 3hz
C - 5hz

As the three timers run they will decode to a single lit LED, I have noticed that the pattern (which LED is lit and when) takes up a definite frequency but that frequency shifts over time and I have not observed any one pattern repeat indefinitely..

..so my question is.. is the phenomenon some definite frequency or rather is this in the realm of random number (or bit) generation?

Thanks

#### Attachments

• 153.2 KB Views: 7

#### Papabravo

Joined Feb 24, 2006
16,829
It is definitely deterministic, in the sense that if you take the periods of each timer and compute the least common multiple, then all three timers will be back where they started, and the sequence will repeat. If the three numbers are relatively prime (that is, they have no common factors), then the period may be fairly long. For example let us say the periods are:
133, 172, ans 225 (units don't matter). The LCM is 5,147,000 or the product of all three numbers. So after 5,147,000 time units the sequence will repeat. If out time units are milliseconds the complete period will be 5147 seconds or about an hour and 26 minutes. You might not hav the patience or the memory but that's what the numbers say. In truth you cannot achieve truly random behavior unless you start with a truly random process.