Primary memory is the main memory of computer which is used to store the information (programs and data) that the computer is currently using. Primary memory is categorized into two main types:
1. Random Access Memory (RAM), and
2. Read Only Memory (ROM)
Random Access Memory (RAM)
• RAM (Random Access Memory) is the internal memory of the CPU for storing data, program and program result. It is read/write memory which stores data until the machine is working. As soon as the machine is switched of, data is erased.
• Access time in RAM is independent of the address that is, each storage location inside the memory is as easy to reach as other locations and takes the same amount of time. Data in the RAM can be accessed randomly but it is very expensive.
• RAM is volatile, i.e. data stored in it is lost when we switch of the computer or if there is a power failure. Hence a backup uninterruptible power system (UPS) is often used with computers.
• RAM is small, both in terms of its physical size and in the amount of data it can hold.
RAM is of two types
• Static RAM (SRAM)
• Dynamic RAM (DRAM)
1) Static RAM (SRAM):
The word static indicates that the memory retains its contents as long as power is being supplied. However, data is lost when the power gets down due to volatile nature. SRAM need not have to be refreshed on a regular basis in order to maintain the data. SRAM is used as cache memory and has very fast access.
SRAM uses multiple transistors (four to six), for each memory cell. It does not have a capacitor in each cell.
Characteristic of the Static RAM:
• It has long life
• There is no need to refresh
• Faster
• Used as cache memory
• Large size
• Expensive
• High power consumption
2) Dynamic RAM (DRAM):
DRAM, unlike SRAM, must be continually refreshed (recharged) in order to maintain the data. This is done by placing the memory on a refresh circuit that rewrites the data several hundred times per second. DRAM is used for most system memory because it is cheap and small.
It uses transistors and capacitors. The transistors are arranged in a matrix of rows and columns. The capacitor holds the bit of information 0 and 1. The transistor and capacitor are paired to make a memory cell. The transistor acts as a switch that lets the control circuitry on the memory chip read the capacitor or change its state.
Characteristics of the Dynamic RAM:
• It has short data lifetime
• Need to be refreshed continuously
• Slower as compared to SRAM
• Used as RAM
• Lesser in size
• Less expensive
• Less power consumption
Read Only Memory (ROM)
ROM stands for Read Only Memory. The memory from which we can only read but cannot write on it. This type of memory is non-volatile. The information is stored permanently in such memories during manufacture. A ROM, stores such instructions that are required to start a computer. This operation is referred to as bootstrap. ROM chips are not only used in the computer but also in other electronic items like washing machine and microwave oven.
Following are the various types of ROM:
1) MROM (Masked ROM): The very first ROMs were hard-wired devices that contained a pre-programmed set of data or instructions. These kind of ROMs are known as masked ROMs which are inexpensive.
2) PROM (Programmable Read only Memory): PROM is read-only memory that can be modified only once by a user. It can be programmed only once and is not erasable.
3) EPROM (Erasable and Programmable Read Only Memory): The EPROM can be erased by exposing it to ultra-violet light for a duration of up to 40 minutes.
4) EEPROM (Electrically Erasable and Programmable Read Only Memory): The EEPROM is programmed and erased electrically. It can be erased and reprogrammed about ten thousand times.
5) Flash Memory: Flash Memory is a kind of semiconductor-based non-volatile, rewritable computer memory that can be electrically erased and reprogrammed. It is a specific type of EEPROM.
o It combines the features of RAM and ROM. It is a random access memory and its content can be stored in it at any time. However, like ROM, the data is not lost when the machine is turned off or the electric power is cut. Flash memory stores bits of data in memory cells.
o Flash memories are high-speed memories, durable, and have low-energy consumption. Since flash memory has no moving part, it is very shock-resistant. Due to these features, flash memory is used in devices such as digital camera, mobile phone, printer, laptop computer, and record and play back sound devices, such as MP3 players.