Article
random number generator
7-20 — alektor july/august 1981 random number generator A random number generator is very often required when developing and running game programs on microprocessor controlled systems. Obviously, it is possible to generate a pseudo-random number with the aid of a short subroutine, but after playing the game several times it becomes apparent that the number is not truly random. For this reason it is far better to have an external random number generator which includes its own oscillator and which can be called by the microprocessor at any time. When, in addition, the generated sequence has a reasonably long cycle, it is quite clear that the randomisation closely approaches perfection. The circuit described here makes use of an 8 bit shift register (I C2). The outputs Q6 and Q7 are fed back to the input of the shift register via EXOR gates N4 and N3, so that the length of the generated cycle is 127 bits. The clock pulses for the shift register are provided by an astable multivibra...
Discussion (0 comments)