Difference Between RAM and ROM

By Mona Kumari|Updated : June 8th, 2022

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.  

Table of Content

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

RAMROM

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 LatchDifference 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 

Comments

write a comment

FAQs on Difference Between RAM and ROM

  • The key difference between the RAM and ROM is RAM is random access memory, whereas the ROM is read-only memory. Ram can perform both read-write operations, but ROM can perform read operations only.

  • The difference between RAM and ROM as per accessing data is that the CPU access data directly from the RAM, but the CPU cannot access data directly from ROM. First, the data is transferred from ROM to RAM then the CPU access it.

  • The EPROM is used in the microcontroller, video cards, modern and other electronic gadgets. It is also used in BOIS chips in the computer.

    The EEPROM is used as storage for inbuilt self-learning functionality in remotely operated transmitters and as BOIS chips in the computer.

  • The difference between DRAM and SRAM is as follows:

    DRAM

    • DRAM is slower as compared to SRAM because it has high access time.
    • THE DRAM consumes less power because the information is stored in the capacitors.
    • DRAMs are cheaper than SRAMs.

    SRAM


    • SRAM is faster compared to DRAM because it has low access time.
    • SRAM requires a continuous power supply which means this memory consumes more power.
    • SRAMs are costlier.
  • ROM is primary memory because it stores all the instructions that are needed for the system to start, which is knowns as boot code and for accessing the secondary memory, it requires some code to run. 

Follow us for latest updates