To provide a program verifying circuit which is assembled in a memory cell, that stores multivalued data and is electrically reloadable, has a simple circuit constitution and causes no increase in the layout area.
The program verifying circuit is constituted of a variable threshold voltage field effect transistor TRn having plural input gate electrodes 47A and 47B and a latch circuit 20. The circuit 20 is connected to one of the source/ drain regions of the transistor TRn and also connected to a memory cell through a bit line BT. One of the electrodes of the transistor TRn, i.e., the electrode 47A is connected to the memory cell through the line BT. A potential is applied to the other electrode 47B, to control the connection/disconnection of the transistor TRn.