Difference Between RAM and ROM

By BYJU'S Exam Prep

Updated on: September 25th, 2023

Difference between RAM and ROM: Memory is the most important element of a computing system because without the memory computer cannot perform simple tasks. Computer memory comprises primary memory(RAM and ROM) and Secondary memory (hard drive, CD, etc.).The difference between RAM and ROM is Random Access Memory (RAM) is primary-volatile memory, and Read-Only Memory (ROM) is primary-non-volatile memory.

The data on the RAM is lost as the CPU power is off, but the data on the ROM is permanent that is, the data is not lost when power is off. RAM and ROM are essential parts of the topics covered in the GATE CSE syllabus. Here, we will first see the difference between RAM and ROM and then we will explore what is RAM and ROM in detail.  

Difference Between RAM and ROM

The following table shows the difference between RAM and ROM on the basis of accessing data, physical size, speed etc.

Key Differences Between RAM and ROM


RAM is the acronym for Random-Access Memory.

ROM is the acronym for Read-Only Memory.

RAM data is volatile, which means if the system crashes or some interrupt occurs, the RAM data is lost.

ROM data is not volatile, which means the data stored in ram is permanent, and it does not change if the system crashes or some interrupt occurs.

RAM is a read-write memory which means the data stored on RAM can be modified.

ROM is a read-only memory which means the data stored on ROM cannot be modified. 

The CPU access the data directly from the RAM. 

The CPU cannot access the data directly from the ROM. It copies data from the ROM To RAM, then the CPU can access the data.

RAM is faster as compared to ROM because the CPU access data directly from it.

ROM is the slower device as compared to RAM because The CPU access data indirectly. 

The physical size of the RAM is bigger compared to ROM. 

The physical size of ROM is smaller than the RAM.

What is RAM?

On the motherboard, the RAM is stored in modules called DIMMs(Dual Inline Memory Modules). In order to run the program or data on a computer, it needs to be loaded into the RAM first. So the program or the data is first stored in the hard drive, then from the hardware, it is loaded into the RAM. And once it is loaded into the RAM, the CPU can now access the data or run the program.

The RAM is classified into two types that are as follows:

  • DRAM: DRAM is the acronym for Dynamic Random Access Memory. It contains the capacitor. A capacitor is like a small bucket used to store the electricity, which means these capacitors hold the bit information such as ‘0’ or ‘1’. As DRAM has capacitors, it refreshes with electricity constantly because the capacitor does not hold the charge very long, and this refreshing is where we get the name ‘Dynamic’. Candidates can learn more about DRAM full-form here.
  • SRAM: SRAM is the acronym for Static Random Access Memory. It stores the data as long as the power is supplied. In SRAM, four to six transistors are used to store a single byte of data. It is very complex as compared to the DRAM. The difference between DRAM and SRAM is elaborated here.

What is ROM?

ROM is the programmable chip as it stores all the instructions needed when the system starts. The ROM is very useful in automation systems because it can store the data as per the system’s needs. ROM is constructed using the decoder and the programmable OR gate. Check out more on ROM full form.

The ROM is classified into different types that are as follows:

  • PROM: PROM is referred to as programmable ROM. The PROM is initially empty, but we can program it once; after that, the data cannot be deleted. Hence it is non-volatile memory.
  • EPROM: In EPROM, we use UV(ultraviolet) rays to erase the data present in the memory. After that, we reprogram the memory. Therefore, it is referred to as erasable programmable ROM.
  • EEPROM: EEPROM is more advanced than EPROM. It did not use UV rays, but it erased the data electrically. It erases the data bit by bit. In EEPROM, we can erase the data many times; if the data erase many times, the efficiency of the memory decay with respect to erasing.
  • Flash Memory: Flash memory is more advanced than EEPROM. We erase the data block by block in flash memory, whereas in EEPROM, we erase data bit by bit. Therefore, the flash memory erasing capability is faster than the EEPROM.
  • Mask ROM: Mask ROM is only the programmable ROM(PROM). The manufacturer programs this memory, and it is masked off during the photolithography, whereas the PROM programmers program the PROM.

Check out some important related topics:

Difference Between Calloc () and Malloc () Difference Between Hard Copy and Soft Copy
Difference Between Flip-Flops and Latch Difference Between High-Level and Low-Level Languages
Difference Between Encoder and Decoder  Difference Between MAC Address and IP Address

BYJU’s Exam Prep Online Classroom Program 

Our Apps Playstore
SSC and Bank
Other Exams
GradeStack Learning Pvt. Ltd.Windsor IT Park, Tower - A, 2nd Floor, Sector 125, Noida, Uttar Pradesh 201303
Home Practice Test Series Premium