Really, i want to get random bit sequence pattern, please tell me logic how to get sequence pattern.
I tried with below (example) code for getting Random bit sequence pattern like this
2147483663, 1073741831, 536870915, 2415919105, 1207959552, 2751463424, 3523215360, 1761607680, 3028287488, 3661627392, 1830813696
But i am getting only constant value, without any change like this
1932117999, 1932117999, 1932117999, 1932117999, 1932117999, 1932117999, 1932117999, 1932117999, 1932117999, 1932117999
Please find the attachment and suggest me. I am grateful.
int main()
{
unsigned int x=12131222, y=898565;
unsigned int z=58964796, c=6543217;
unsigned long long t, result;
unsigned int r;
int i;
x = 14900243 * x+ 123456789;
y ^= y << 21;
y ^= y >> 17;
y ^= y << 30;
/* Do not set y=0! */
t = 42945843 * z + c;
c = t >> 32;
z = t;
result=(unsigned int)(x>>32) + (unsigned int)y +z;
for ( i = 0; i < 10; i++)
{
r = result; //use the LFSR
printf ("%u, ", r);
}
return 0;
}