The ZX Spectrum does not generate truly random numbers. Instead, its RND function uses a mathematical algorithm to produce a sequence of pseudo-random numbers.
When you use:
the Spectrum sets its internal random number state to:
The RANDOMIZE value can be from 1 to 65535.
RANDOMIZE 0, or RANDOMIZE with no argument, is different. In that case the Spectrum uses the current value of the FRAMES system variable to initialise the random number generator.
Enter a RANDOMIZE value to initialise the generator. The calculator will then step through the same internal sequence used by the ZX Spectrum.
Every time RND is called, the Spectrum advances its internal state using:
The value returned by RND is then:
The new value of b is retained internally and is used by the next call to RND.
Because 75 is a primitive root modulo 65537, the generator passes through all 65,536 possible internal states before the sequence repeats.