Primary memory and secondary memory are two different types of computer memory. Here are the main differences between them:


FeaturePrimary MemorySecondary Memory
DefinitionPrimary memory, also known as main memory, is the computer's internal memory that stores data and instructions that the CPU uses actively.Secondary memory, also known as auxiliary memory, is external memory that is used to store data and instructions that are not currently in use by the CPU.
Type of MemoryPrimary memory is volatile memory, which means that it loses its contents when power is turned off.Secondary memory is non-volatile memory, which means that it retains its contents even when power is turned off.
CapacityPrimary memory is typically smaller in capacity than secondary memory.Secondary memory is larger in capacity than primary memory.
Access SpeedPrimary memory is faster in terms of access speed as it is directly accessed by the CPU.Secondary memory is slower in terms of access speed as it is accessed via input/output operations.
CostPrimary memory is more expensive than secondary memory.Secondary memory is less expensive than primary memory.
ExamplesRAM (Random Access Memory) and Cache memory.Hard disk drives, solid state drives, USB drives, CDs, and DVDs.