Hi,

I am currently working on a program that uses Hamming Codes to encode various incoming arrays of 1's and 0's . However, in order to do this i need to create a Generator matrix which requires that I know all possible combinations for an array of length N (by all combinations i just mean binary 1 and 0)... this is so i can find a basis for set and thus create a Matrix.

Was just wondering... can someone explain to me what the logic is/ how to go about using loops to fill in a 2-D array with all possible combinations of 1's and 0's for any n?

Just for clarification heres what I mean:

say array length is 3:

[1 1 0

1 0 1

0 1 1

1 1 1

1 0 0

0 1 0

0 0 1]

Thanks!