The shift-xor "random" number generator described actually has an interesting property. The algorithm looks like this:
1. If the value is 0, output the magic number.
2. If the value has only its high bit set, output 0.
3. Otherwise, shift the value to the left
4. if there was an overflow (the high bit was 1 before the shift), xor the value by a magic constant.
For certain values of the magic constant, this has the property of generating every integer in the range exactly once.