Memory is used to store data and instructions and is divided into small parts called cells. There are two types of memory: internal memory (cache and main memory) and external memory (magnetic disks, optical disks). Memory characteristics like capacity, cost, and access time change as we move from top to bottom of the memory hierarchy. RAM is the main internal memory and can be accessed randomly, but is volatile. There are two types of RAM: SRAM and DRAM. ROM is non-volatile and can only be read from. Examples are ROM, PROM, EPROM, and EEPROM. Cache memory is very fast memory between the CPU and main memory. Virtual memory allows programs larger than physical memory.