RAM is typically erased when a computer is shut down, though some RAM chips maintain data indefinitely without electrical power. Technically, RAM devices are not limited to memory chips, and random-access memory as a storage format is not limited to use as working memory. In a broad sense, modern storage devices for long-term or
secondary storage, including magnetic media and laser-readable
CDs and
DVDs, are forms of random-access memory.
Most RAM can be both written to and read from, so "RAM" is often used interchangeably with "
read-write memory." In this sense, RAM is the opposite of
read-only memory (ROM). Strictly speaking, however, "RAM" and "ROM" are not mutually exclusive designations because "RAM" refers only to the method of accessing stored data, not whether data can be written.