# 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?

• Tuples[{0, 1}, m]? – kglr Sep 29 at 9:37

You can also use Tuples:
m = 5;

Look up IntegerDigits.
m = 5;