主权项 |
1. A memory system comprising:
a semiconductor memory configured to include a memory cell array which includes memory cells which hold charges, and a peripheral circuit comparing an amount of charges with a first charge threshold to determine a code according to the amount of charges; and a memory controller configured to write a first data group in the semiconductor memory and then read the first data group from the semiconductor memory, to count a number of first data and a number of second data based on a comparison of a second data group with a third data group, and to change the first charge threshold based on the number of first data and the number of second data, the second data group being the first data group at the time of writing to the semiconductor memory, the third data group being the first data group read from the semiconductor memory, the first data being data changed from a first code to a second code, and the second data being data changed from the second code to the first code. |