Microprocessors require memory resources in which to store programs and data. Memory can be
classified into two broad categories: volatile and nonvolatile. Volatile memory loses its contents
when power is turned off. Nonvolatile memory retains its contents indefinitely, even when there is no power present. Nonvolatile memory can be used to hold the boot code for a computer so that the microprocessor can have a place to get started. Once the computer begins initializing itself from nonvolatile memory, volatile memory is used to store dynamic variables, including the stack and other programs that may be loaded from a disk drive.