Original: They will generally have the ability to retain functionality while waiting for an event such as a button press or other interrupt ; power consumption while sleeping ( CPU clock and most peripherals off ) may be just nanowatts , making many of them well suited for long lasting battery applications .
Simplified: In addition to the usual arithmetic and logic elements of a general purpose microprocessor , the microcontroller integrates additional elements such as RAM for data storage , read-only memory for program storage , flash memory for permanent data storage , peripherals , and input\/output interfaces .