The authors demonstrate thin-film formation of capped-CdSe nanoparticles via layer-by-layer electrostatic assembly. The assembly of two types of nanoparticles in sequence-with anionic and cationic capping agents, respectively-results in thin films of CdSe nanoparticles. Devices based on such thin films demonstrate electrical bistability. The bistability, which is reversible in nature, is due to charge confinement in the nanoparticles and has an associated memory phenomenon. The devices based on the CdSe nanoparticles exhibit high on/off ratio and demonstrate read-only and random-access memory applications. © 2007 American Institute of Physics.