The program is in the form of binary (0 low level and 1 high level) to charge or discharge the corresponding MOSFET gate inside the chip to form data storage. For example, a 00000001 data is sent to the memory, the MOS gate is charged and discharged, the previous 0000000 seven pairs of the corresponding MOS tube discharge are stored in a low level form, and the last 1 is stored in the form of charging the MOS tube gate. So there are eight MOS tubes that store 00000001 data.
When reading, the gate discharge output of the MOS tube is O, the charging output is 1, and a series of data is read and output.
When the single chip computer works, it first reads the data of the program memory, and then works completely according to the program data. When different programs are burned to the memory of the microcontroller, the microcontroller works differently.