I read somewhere that in generating random integer, every bit should have same probability of 0.5 |
I don't know where you read that, but that's not how randomness is generally determined.
You want 2 things from a random number generator:
1) a full period. IE, if you generate numbers between [0..0xFFFFFFFF] as you are, one would expect every one of those numbers to be produced (an equal amount of times). Failure to do this means your generator has bias towards certain numbers.
2) even distribution. IE, you won't see a lot of similar numbers in a row. Failure to do this makes your generator not appear random.
I don't think your generator does either of those.
Your algorithm for generating random number is predictable because you used constant numbers. |
As Zhuge pointed out, all pRNGs are predictable.
But really, unless you're doing crypto work, I wouldn't worry about it too much.