Javatpoint Logo
Javatpoint Logo

Difference between RAM and ROM


Although RAM and ROM both are the internal memories of the computer, they are different from each other in terms of their uses, storage capacity, physical size, and more. Let us see how they differ from each other.

What is RAM:

RAM stands for Random Access Memory. It is the internal memory of the CPU in the form of a hardware device located on the motherboard of a computer. It is designed to store data, programs, and results of a program when a computer is switched on. It is the read and write memory of a computer as we can write information to it as well as read from it.

Furthermore, RAM is a volatile memory as it can?t store data and instructions permanently. For example, when we switch on a computer, the instructions from the hard disk are stored in the RAM. These instructions include the operating system (OS) and other programs which are needed to run a computer. CPU uses these instructions to perform the tasks required to run the computer. This data is retained by the RAM as long as the computer is on, the moment you shut it down, the RAM loses the data. The reason for transferring the data to RAM is that it is easy and fast to read data from RAM as compared to reading it from the hard drive.

What is ROM:

ROM stands for read only memory. It is a non-volatile memory that stores information permanently, even when the power is turned off. Like RAM, it is also the primary memory of a computer. It is called read only memory as the programs and data stored in it can be read but cannot be written on it.

At the time of manufacturing, the manufacturer fills the ROM with programs that can?t be altered later. So, you cannot reprogram, rewrite, or erase its data after it is manufactured. However, in some types of ROM, you can modify the stored data. Some common examples of ROM include cartridge used in video game consoles, the data stored permanently on personal computers, and other electronic devices like smartphones, tablets, TV, AC, etc.

Some of the key differences between RAM and ROM are as follows:

It is a temporary memory of the computer. It is the permanent memory of the computer.
It is a read-write memory. The data can be written and read. It is a read only memory. The data can only be read.
It is a volatile memory as it temporarily stores the files as long as the computer is on and working. It is a non-volatile memory as it permanently stores the files even when the power is turned off, such as game cartridge and BIOS program stored in the memory of a computer, etc.
The storage capacity ranges from 1 to 256 GB. Its storage capacity ranges from 4 to 8 MB.
It is large in size than ROM. It comes in two different sizes for use in desktop computers and laptops. A desktop ram is around 5.5 inches in length and 1 inch in width. Whereas, the Laptop RAM is around half the length of desktop RAM. Its size ranges from less than an inch in length to multiple inches in length and width based on their use. It has less capacity than RAM.
Data stored in RAM can be retrieved and altered. We can only read the data stored in ROM. It cannot be altered.
It is faster than ROM as it is a high-speed memory. It is slower than the RAM.
The data stored in RAM is used by the CPU in real-time to run the computer. The data stored in ROM is used by CPU only when it is transferred to RAM.
It temporarily stores the files and data that the CPU needs to process the current instructions or work. It stores the BIOS program on the motherboard of a computer, which is needed to bootstrap the computer.
Examples: It is used as CPU Cache, Primary Memory in a computer. Examples: It is used as Firmware by micro-controllers.
The stored data is easy to access. The stored data is not as easy to access as it is in ROM.
It is costlier than ROM. It is cheaper than RAM.
Types: DRAM (Dynamic Random Access Memory), SRAM (Static Random Access Memory). Types: PROM (programmable read-only memory), EPROM (erasable programmable read-only memory), EEPROM( electrically erasable programmable ROM), Mask ROM.

Next TopicDifference between

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA