unsigned long r64;//random
for(int i = 0 ; i < 64 ; i++)
{
array[i] = (r64>>i)&0x01;
}