Non-volatile memory remembers without power. Unplug it for a year and the bits are still there.
The members of the ROM family are all non-volatile:
- Mask ROM: contents built in at the factory
- PROM: programmed once by the user
- EPROM: erased with ultraviolet light, then reprogrammed
- EEPROM: erased and rewritten electrically, byte by byte
- Flash: rewritten electrically, erased in blocks
Outside the chips in this course, magnetic disks and optical discs are non-volatile too.
Why every computer needs some: volatile RAM is empty at power-on, so the very first instructions the processor runs must come from somewhere that kept them. That start-up program, the firmware, lives in non-volatile memory.
The trade-off: rewritable non-volatile memories are slower to write than RAM, often erase in blocks, and wear out after a limited number of erase cycles. So systems work in RAM and save to non-volatile memory.
Don't equate non-volatile with read-only. Flash and EEPROM are non-volatile and writable.