1. A method of generating a matrix P to provide an error correction code (ECC) word for a given group of n bits and to provide parity bits for subgroups of said given group of n bits, the matrix P including a multitude of rows and columns, the method comprising the steps of: generating permutations of m bit wide vectors, each of the vectors having an odd number of three or more elements with a value of one and the other elements with a value zero; assigning the permutations to rows of the matrix P while adhering to a defined group of conditions; and if not all the rows of P are assigned, increasing m, and repeating the generating and assigning steps; and wherein multiplying said given group of n bits with P produces m error correction code protection bits, and two of the columns of P provide parity bits for parity protection for subgroups of said given group of n bits.