RAM system's short-term memory. Whenever computer performs calculations, it temporarily stores the data in the RAM until it is needed. This short-term memory disappears when the computer is turned off. If you're working on a document, spreadsheet, or other types of file, you'll need to save it to avoid losing it. When you save a file, the data is written to the hard drive, which acts as long-term storage.
RAM is measured in megabytes (MB) or gigabytes (GB). The more RAM you have, the more things your computer can do at the same time. If you don't have enough RAM, you may notice that your computer is sluggish when you have several programs open. Because of this, many people add extra RAM to their computers to improve performance. RAM is much faster than ROM is, due to the nature of how it stores information. For this reason, RAM is often used to shadow the BIOS ROM to improve performance when executing BIOS code. PROM (Programmable ROM) is also a version of ROM and is slower compared to RAM. EEPROM, Electrically Erasable Programmable ROM is used to program dynamically.
There are basically two important types of RAM (Short for Random Access Memory):
1. SRAM: Static RAM being expensive, primarily used for Cache memory. DRAM, being cheaper, is used for main memory. SRAM is widely used for Level 1, Level 2 or Level 3 cache memory. Level 1 cache is internal to the processor, and level 2 and level 3 caches are external to the processor, it resides on the motherboard.
2. DRAM: Dynamic RAM holds its data if it is continuously accessed by special logic called a refresh circuit. If the memory is not refreshed regularly, then the DRAM will lose its contents. This refreshing action is why the memory is called dynamic. All PCs use DRAM for their main system memory, instead of SRAM, even though DRAMs are slower than SRAMs and require the overhead of the refresh circuitry. The reason that DRAMs are used is that they are much cheaper and take up much less space.