The memory of a computer is classified in the two categories primary and secondary memory. Primary memory is the main memory of the computer where the currently processing data resides. The secondary memory of the computer is auxiliary memory where the data that has to be stored for a long time or permanently, is kept.
The basic difference between primary and secondary memory is that the primary memory is directly accessible by CPU whereas, the secondary memory is not directly accessible to CPU. Let us discuss some more differences between Primary and secondary memory with the help of the comparison chart shown below.
Content: Primary Vs Secondary Memory
|Basis for Comparison
|Primary memory is directly accessible by Processor/CPU.
|Secondary memory is not directly accessible by CPU.
|Instructions or data to be currently executed are copied to main memory.
|Data to be permanently stored is kept in secondary memory.
|Primary memory is usually volatile.
|Secondary memory is non-volatile.
|Primary memories are made of semiconductors.
|Secondary memories are made of magnetic and optical material.
|Accessing data from primary memory is faster.
|Accessing data from secondary memory is slower.
|Primary memory is accessed by the data bus.
|Secondary memory is accessed by input-output channels.
|The computer has a small primary memory.
|The computer has a larger secondary memory.
|Primary memory is costlier than secondary memory.
|Secondary memory is cheaper than primary memory
|Primary memory is an internal memory.
|Secondary memory is an external memory.
Definition of Primary Memory
Primary memory is the main memory of computer system. The instructions that have to be currently executed is copied to the primary memory because CPU can directly access the data from primary memory. Accessing data from primary memory is faster as it is an internal memory and processor accesses data from primary memory using data bus.
The primary memory is usually volatile in nature which means data in primary memory does not exist if not saved, in case the power failure occurs. The primary memory is semiconductor memory and is more expensive than secondary memory. The primary memory capacity is limited in computer and is always smaller than secondary memory.
Primary memory can be divided into two types of memory that are RAM (Random Access Memory) and ROM (Read Only Memory).
- RAM is both read and write memory. The data which has to be currently processed is kept in RAM which can be quickly accessed by the CPU. RAM is volatile and loses data if the power is switched off. RAM can be static or dynamic.
- ROM is a read only memory; its content can not be altered. It has the instructions that are used when the system is booted up. ROM is a non-volatile memory i.e. it retains its content even if the power is switched off. The types of ROM are PROM, EPROM and EEPROM.
Definition of Secondary Memory
Secondary memory is an auxiliary memory of the computer. The data that has to be permanently stored is kept in secondary memory. The CPU can not directly access the data in secondary memory. The data has to be initially copied to primary memory then only it can be processed by CPU. Hence, accessing data from secondary memory is slower. The secondary memory can be accessed using the input-output channel.The secondary memory is nonvolatile in nature, which means that the content of the secondary memory exist even if the power is switched off. The secondary memory is magnetic memory or optical memory and it available at cheaper rates as compared to the primary memory.
Secondary memory is available in bulk and always larger than primary memory. A computer can even work without secondary memory as it an external memory. The examples of secondary memory are the hard disk, floppy disk, CD, DVD, etc.
Key Differences Between Primary and Secondary Memory
- The key difference between primary and secondary memory is that primary memory can be directly accessed by the CPU whereas, the CPU can not directly access the secondary memory.
- The primary memory of the computer is also known as the main memory of the computer. However, secondary memory is known as auxiliary memory.
- The data that is to be currently processed is in primary memory whereas, the data that has to be permanently stored is kept in secondary memory.
- Primary memory is a volatile memory whereas, the secondary memory is a non-volatile memory.
- Primary memories are semiconductor memories whereas; the secondary memories are the magnetic and optical memories.
- Data accessing speed of the primary memory is faster than secondary memory.
- Primary memory is accessed by the data bus. On the other hand, secondary memory is accessed using input-output channels.
- Primary memory’s capacity is always smaller than secondary memory’s capacity.
- Primary memory is costlier than secondary memory.
- Primary memory is an internal memory whereas, secondary memory is an external memory.
Primary memory is expensive and is available in limited in size in a computer. Secondary memory is cheaper and is present in bulk in the computer. Computer can even work without secondary memory but not without primary memory.