Fast random booleans I am looking for a way of generating booleans rapidly. For booleans, one usually uses random(0,2); but in my case I need about 250 booleans and calling random every time is slow.
So I thought about using all bits of a random number on the whole range as such:
randomSeed(100); // A seed to always keep the same sequence
long rdm = random(MIN,MAX);  // Generate a number in range MIN,MAX of type long
long mask = 1;
for(int i=0; i&lt;32; i++){
    if((rdm&gt;&gt;i)&amp;mask){
        //do something
    } else {
        //do something else
    }
}

But with this I have three questions:

What are MIN and MAX so that the LONG random uses all bits, with value ranging from -2,147,483,648 to 2,147,483,647 (arduino long type). I tried several MIN and MAX, also simply random(); but without success.
Is it a valid approach? Do I expect each bit to be uniformly distributed? Should I use fewer bits, e.g. random(0, 2^16); for a &quot;better&quot; distribution?
Is there some seed known to be good or bad at this?

My project
I am working on a device made of Neopixel LED strips. It is for a visual neuroscience experiment where each &quot;pixel&quot; is either ON or OFF. I need the speed to be able to reach high refresh rate (60-100Hz), with normal statistical distribution to avoid bias in neuron response analysis. With this approach, I can reach the desired speed but I'm concerned about the statistics. So I need a better understanding of random()'s behaviour to do it right!
I didn't try myself, but in the documentation it shows the MAX value is  2,147,483,647, which is 2^31-1. The MIN value I expect is -2^31, thus -2,148.483.648. Wondering what you mean by 'without success'.
Yes this is a valid approach. A 'perfect' random generator should be able to generate all values with an equal distribution. Since the values are within [-2^31, 2^31-1] this means all values within a 32 bit value is used, which automatically means all bits are also evenly distributed. So you can pick individual bits (as long as you use the entire MIN/MAX range).
In principle all seeds are good, as long as they are random. In the documentation it is advised to take an unconnected analog pin value. If you don't have one unconnected, you can use e.g. the millis function.