NUMERICAL SIMULATION OF EMBEDDED NON-VOLATILE MEMORY