How do I generate random binary values lets say 10 digits 0010101001 and I want to call this C1 I then want to create another one called C2 same again random 10 digit binary number.
C# is my language of choice.
Is there a bitset class for c#
something simple would be nice, like
int C1
for ( int C1 = 0; <=10; C1++)
output bitset<0>
return 0;
Need to store c1 and c2 tho.
If you want true random numbers, you need hardware your computer probably doesn't have. However, it can be added simply and cheaply - see here,for example.
However, I think that a good pseudo-random generator, such as those that come with Boost - see Boost random number generator for an example, will be sufficient for your needs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With