A method for programming memory cells, the method comprising: generating an encoded stream (.., X k-1, X k,..) having three voltage levels using a data stream (.., U k-1, U k,..) having only two logical states, wherein each bit position of the encoded stream (.., X k-1, X k,..) corresponds to a respective and same bit position of the data stream (.., U k-1, U k,..); and programming the memory cells using the encoded stream (.., X k-1, X k,..) to represent the data stream (.., U k-1, U k,..); wherein generating the encoded stream (.., X k-1, X k,..) having the three voltage levels comprises generating the encoded stream (.., X k-1, X k,..) having a first voltage level, a second voltage level greater than the first voltage level, and a third voltage level less than the first voltage level; wherein a particular bit position (k) of the encoded stream (.., X k-1, X k,..) has the first voltage level when the particular bit position (k) of the data stream (.., U k-1, U k,..) has a first logical state of the two logical states; wherein the particular bit position (k) of the encoded stream (.., X k-1, X k,..) has the second voltage level when the particular bit position (k) of the data stream (.., U k-1, U k,..) has the second logical state and a number of bit positions (1 to k-1) of the data stream (.., U k-1, U k,..) prior to the particular bit position (k) having the first logical state is a first type of number selected from a group consisting of an odd number and an even number; wherein the particular bit position (k) of the encoded stream (.., X k-1, X k,..) has the third voltage level when the particular bit position (k) of the data stream (.., U k-1, U k,..) has the second logical state and the number of bit positions (1 to k-1) of the data stream (.., U k-1, U k,..) prior to the particular bit position (k) having the first logical state is a second type of number that is an even number when the first type of number is an odd number and that is an odd number when the first type of number is an even number; and wherein the third voltage level is the negative value of the second voltage level. generating an encoded stream (.., X k-1, X k,..) having three voltage levels using a data stream (.., U k-1, U k,..) having only two logical states, wherein each bit position of the encoded stream (.., X k-1, X k,..) corresponds to a respective and same bit position of the data stream (.., U k-1, U k,..); and programming the memory cells using the encoded stream (.., X k-1, X k,..) to represent the data stream (.., U k-1, U k,..); wherein generating the encoded stream (.., X k-1, X k,..) having the three voltage levels comprises generating the encoded stream (.., X k-1, X k,..) having a first voltage level, a second voltage level greater than the first voltage level, and a third voltage level less than the first voltage level; wherein a particular bit position (k) of the encoded stream (.., X k-1, X k,..) has the first voltage level when the particular bit position (k) of the data stream (.., U k-1, U k,..) has a first logical state of the two logical states; wherein the particular bit position (k) of the encoded stream (.., X k-1, X k,..) has the second voltage level when the particular bit position (k) of the data stream (.., U k-1, U k,..) has the second logical state and a number of bit positions (1 to k-1) of the data stream (.., U k-1, U k,..) prior to the particular bit position (k) having the first logical state is a first type of number selected from a group consisting of an odd number and an even number; wherein the particular bit position (k) of the encoded stream (.., X k-1, X k,..) has the third voltage level when the particular bit position (k) of the data stream (.., U k-1, U k,..) has the second logical state and the number of bit positions (1 to k-1) of the data stream (.., U k-1, U k,..) prior to the particular bit position (k) having the first logical state is a second type of number that is an even number when the first type of number is an odd number and that is an odd number when the first type of number is an even number; and wherein the third voltage level is the negative value of the second voltage level.