|
for(int i=0; i<64,i++)
{//The following is the pseudo code
d = A random number every time: odd number is 1, even number is 0;
SetBit(i, d);
}
The first part is fixed, it is not a problem:
//The first part is 00
SetBit(0,0);
SetBit(1,0);
//The first part is 01
SetBit(0,0);
SetBit(1,1);
//The first part is 10
SetBit(0,1);
SetBit(1,0);
//The first part is 11
SetBit(0,1);
SetBit(1,1);
Whichever you want, just add it after the loop ends.
Within the SetBit function, it is sufficient to use bit operations to set specific bits, which should not be difficult to achieve. |
|