Therefore, in the examples of the present invention, the chip is provided with an internal circuit which writes into the highly reliable memory cells using a first mode in which a first threshold distribution can be obtained, and writes into the less reliable memory cells using a second mode in which a second threshold distribution can be obtained; and a threshold distribution control circuit whic