1. A method of providing error correction, the method comprising: computing a first check code for first data, wherein the first check code corresponds to a first matrix multiplication of the first data and a matrix; selectively inverting bits of the first check code to generate a second check code according to an inversion pattern, wherein the inversion pattern corresponds to a second matrix multiplication of an initial data comprising erased states and the matrix; and programming the first data and the second check code to a plurality of data storage cells.
1. A method of providing error correction, the method comprising: computing a first check code for first data, wherein the first check code corresponds to a first matrix multiplication of the first data and a matrix; selectively inverting bits of the first check code to generate a second check code according to an inversion pattern, wherein the inversion pattern corresponds to a second matrix multiplication of an initial data comprising erased states and the matrix; and programming the first data and the second check code to a plurality of data storage cells. 2. The method of claim 1 , further comprising: receiving user data; and transforming the user data to the first data according to a transformation function, the first data being the same size as the user data.