Look what I foundIt generates a random number. I think its pretty cool.Code:unsigned long rand1( void )
{
static unsigned long R = 0x12345678;
R = ( R << 1 ) + // shift 1 bit to left, and
( ( // generate rightmost bit by
( ( R & 0x80000000L ) != 0 ) // XORing leftmost bit with
^ ~( ( R & 4L ) != 0 ) // bit 29 (bit 2 for Little Endian).
) & 1 );
return R;
}