Sample Application Diagram:
For this design the output of RNG is decoded by a 4-bit 7-Segments Decoder and the output is displayed in numerical visual form via a twin 7-segments LED display. Many other uses of the RNG output are possible.
RNG is useful for:
A 4-bit RNG generates a random output inclusively between 0 and 15. Likewise, a 5-bit RNG generates a random output between 0 and 31. By simply replacing the counter and the register within the RNG circuit, we can control the range of the random outputs.
But what if we want to have a random range that is not a power of 2? In this case additional logics are required.
For example, if we want to have a random range of 0 to 200, we will need to have an 8-bit counter and register (at least 8-bit, that is). However, since an 8-bit number is ranged from 0 to 255, we will need to have additional logics to reset the counter (not the register!) when the count reaches 201 (that is, the counter will need to have a clear input). In this case, the counter will count from 0 to 200, and back to 0 again. 201 in decimal is equivalent to 11001001 in binary.
Using logic gates:
Another design, if you have an 8-bit comparator handy (don't forget to set the parameter!):