A pseudo-random number generator based on a recursive binary sequence:
with constant coefficients as well as sequence terms restricted to binary values. In practical applications most are set to zero. In order to obtain an -bit pseudo-random integer, the binary sequence is iterated forward times and successive bits , , , form a binary representation of an -bit integer number. To obtain a pseudo-random floating-point number in the range [ ) , the -bit integer must be further divided by .
In practice the following simplified recursive sequence is used:
Since terms are binary this is equivalent to peforming the exclusive-OR (XOR) operation (in some implementations XOR has been replaced by XNOR):
▲Back to this TOP