Main memory is made up of RAM and ROM chips. RAM is read-write memory that can be accessed randomly; data is lost when power is off. There are static and dynamic RAM types. Static RAM retains data indefinitely if powered, dynamic RAM must be periodically refreshed. ROM is read-only and permanently stores data. There are mask, PROM, EPROM and EEPROM ROM types that can be programmed at different stages. Cache memory uses fast static RAM. Main memory often uses dynamic RAM for its ability to store large amounts of data at lower cost despite slower access.