Primary memory may be divided into two categories: random access memory (RAM) and random access memory (ROM).
RAM (Volatile Memory)
It is referred to as a volatile memory. It indicates that the data or instructions are not stored indefinitely on the device. When you turn on the computer, the data and instructions from the hard drive are loaded into the random access memory (RAM).
The CPU makes use of this information in order to complete the tasks at hand. As soon as you turn off your computer, all of the information in the RAM is lost.
ROM (Non-volatile Memory)
It is a type of non-volatile storage. Meaning that it does not lose any of the information or programmes that were stored on it at the time of production. As a result, it is a permanent memory that holds all of the critical data and instructions required to carry out critical operations such as the boot process.