Question: All zero-one sequences of length N

I want to write a procedure which recieves a natural N and print all the possible 2ˆN sequences of zeros and ones with size N.

 

 For instance, if I set N = 3; my procedure returns a set with 8 lists of zeros and ones: [[0,0,0],[1,0,0],[0,1,0],[0,0,1][1,0,1],[0,1,1],[1,1,1]] ;

 

Many thanks!

Please Wait...