Research has shown that polyaniline nanofibers can also be used to create nonvolatile plastic digital memory devices when decorated with various metal, such as gold, nanoparticles. Gold nanoparticles are grown inside dedoped polyaniline nanofibers using a redox reaction. A plastic composite film is placed between two electrodes, and an external bias is used to program ON-OFF states. The switching mechanism is thought to be caused through an interaction between the polyaniline nanofibers and the gold nanoparticles, where charge is transferred to the gold nanoparticles from the polyaniline nanofibers due to an induced electric field. Switching between the ON–OFF states has shown to be rapid, with times of less than 25ns. The retention time of these simple devices are on the order of days after programming, and write–read–erase cycles have been demonstrated.