A computer system needs memory to store the data and instructions for processing.
Types of memory
- Primary Memory - This is the main memory of a computer system. Program and data are loaded into the primary memory before processing. The CPU interacts directly with the primary memory to perform read or write operation. It is of two types which are:
(i) Random Access Memory (RAM)
(ii) Read Only Memory (ROM)
RAM (Random Access Memory) |
ROM (Read Only Memory) |
Volatile Memory i.e., as long as the power is supplied to the computer, it retains the data in it. But as soon as the power supply is turned off, all the contents of RAM are wiped out. |
Non-volatile i.e., its contents are not lost even when the power is turned off. |
It is used to store data temporarily while the computer is working. |
It is used as a small but faster permanent storage for the contents which are rarely changed. |
- Cache Memory - To speed up the operations of the CPU, a very high speed memory is placed between the CPU and the primary memory known as cache . It stores the copies of the data from frequently accessed primary memory locations , thus, reducing the average time required to access data from primary memory.
- Secondary Memory - The secondary memory, also called a storage device, is used to store data, instructions and results permanently for future use . The secondary memory is non-volatile and has larger storage capacity than primary memory. It is slower and cheaper than the main memory. But, it cannot be accessed directly by the CPU. Contents of secondary storage need to be first brought into the main memory for the CPU to access.
Examples of Secondary Memory:
- Hard Disk
- CD / DVD
- Memory Card
Units of memory
A computer system uses binary numbers to store and process data .
The binary digits 0 and 1 , which are the basic units of memory, are called bits.
- A 4-bit word is called a nibble.
- A 8-bit word is called a byte.
Bytes are grouped together to make bigger chunks or units of memory.