I need that twodimensional bool array to write in all possible combinations of 0 and 1 without repeating.

So if I have a variable x = 3 (which means number of cells)

There are 3^2 (8) possible combinations.

Now the array should look like:

Any help on implementing this would be highly appreciated!Code:0: 0 0 0 1: 0 0 1 2: 0 1 0 3: 0 1 1 4: 1 0 0 5: 1 0 1 6: 1 1 0 7: 1 1 1