# Generate a sequence of sequences

Imagine I have a sequence of M integers each of which is either zero or one. How do I generate a sequence of all such 2^M sequences?

You can also use Tuples:
m = 5;

Look up IntegerDigits.
m = 5;