0% found this document useful (0 votes)
89 views

Seed Key

The document contains hexadecimal values, binary operations using XOR, and C code for generating pseudorandom numbers using a linear congruential generator. It shifts and XORs values to generate new random numbers from a seed value over multiple iterations.

Uploaded by

Cenci Simone
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views

Seed Key

The document contains hexadecimal values, binary operations using XOR, and C code for generating pseudorandom numbers using a linear congruential generator. It shifts and XORs values to generate new random numbers from a seed value over multiple iterations.

Uploaded by

Cenci Simone
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

27 05

67 05
1010

64 05 1a

0110 0100 0000 0101 0001


xor

11

11 1111 1111 1111 1111 1111


9B FA E5

1001 101

1 1111 1010 1110 0101


XOR
1111 0000 0101 1100 1111 1111
F05CFF
------------------------------------------------------------27 06
6b a6 1a
0110 1011 1010 0110 0001
1010

67 05
0011

11 22 33

0001 0001 0010 0010 0011


xor

11

11 1111 1111 1111 1111 1111


EE DD CC

1110 111

0 1101 1101 1100 1100


0011 1000 1010 0101 1111 1111
38A5FF
------------------------------------------------------------27 06
d6 78 33
1101 0110 0111 1000 0011
0011

for (byte i = 0; i < 5; i++)


{
if ((SEED & 0x80000000) == 0x80000000)
{ // can t check the bit overflow / carry bit directly, but if the MSB is
high then we can infer the next shift will set the carry bit
SEED = (0X5FBD5DBD ^ ((SEED << 1) | (SEED >> 31))); // since C d
oesn t have a rotate as such, OR the << and >> to make a rotate
}
else
{
SEED = ((SEED << 1) | (SEED >> 31)) ;
}
}

You might also like