Difference Between RAM and ROM

Learn via video courses
Topics Covered

Introduction

Can you imagine your life without a memory? Will you be able to perform any task efficiently without a memory? In the same way, without RAM and ROM, computers cannot even perform basic tasks, here RAM and ROM are the memory of a computer.

Memory plays a vital role in the computer system and it is of two types, Primary memory(RAM and ROM) and Secondary memory( Hard Drive, Pendrive, CD, etc). Primary memory is the memory that the processor accesses first and Secondary memory is the one whose data needs to be transferred first to primary memory so that the computer can access it. In this Blog, we will focus on RAM and ROM. Primary and Secondary memory

What is RAM?

RAM stands for Random Access Memory, it is the main memory of a computer system that helps the CPU( Central Processing Unit ) to execute the instruction as instructions first needed to be loaded into the RAM.

  • RAM is a volatile memory which means whenever the computer power is turned off its data will be lost.
  • It is called random access because we can access any memory cell in RAM if we know the row and column that intersect at that cell.
  • RAM stores the information that our computer is actively using so that it can be accessed fast and to run the multiple programs or applications in our system.
  • We require more memory. Increasing the RAM makes computers run faster

The Williams tube was the first RAM(Random Access Memory) which was the cathode ray tube used for storing the binary data using electrical charges and was highly volatile.

image alt

Types of RAM

image alt

There are mainly two types of ram:

  1. SRAM (Static Random Access Memory)
  2. DRAM (Dynamic Random Access Memory)

What is SRAM?

  • SRAM stands for Static Random Access Memory.
  • It is used as a cached memory in the computer as it provides high speed data access to the processor.
  • SRAM is made of 6 transistor cells.
  • SRAM is also called semiconductor memory, used to store each bit of data. We do not need to refresh the SRAM.
  • SRAM is volatile, which means it can retain the data as long as power is on, after the power is turned off the data inside SRAM is lost.
  • SRAM is also used for date and time settings in the computer system which is powered by a battery.

What is DRAM?

  • DRAM stands for Dynamic Random Access Memory which is highly used as a computer’s main memory.
  • DRAM needs to periodically refresh DRAM to maintain data in it.
  • DRAM memory cells are made up of transistors and capacitors within the integrated circuit and data is stored as bits in the capacitor in the presence of electric charge as time passes charges in the memory cell leak that leads to memory loss, therefore, DRAM needs to refresh periodically.
  • DRAM is also volatile, which means data present in DRAM is lost as soon as power is turned off.

What is ROM?

ROM stands for Read Only Memory, it is also the primary memory like RAM. It is read-only in memory as we can only read data on ROM, we cannot write data on it.

ROM can store the data permanently in the system and that makes it nonvolatile which means ROM can hold the data after the power is turned off.

ROM contains the programs that help the computer to start up, the computer BIOS is a PROM chip( PROM is a read-only memory that can be programmed after it is created and is used to store information permanently) that contains the program that is needed to start up the computer.

Read-only memory( ROM) is also called firmware which is an integrated circuit. ROM is used in microcontrollers that are used in computer keyboards, monitors, printers, and many electronic devices.

image alt

Types of ROM

image of rom

There are mainly three types of ROM:

  1. PROM: PROM stands for Programmable Read Only Memory, users can program or instruct the ROM according to its need and the instruction afterward cannot be changed, it is nonerasable and it is used in phones, and video game consoles.

  2. EPROM: EPROM stands for Erasable Programmable Read Only Memory can be removed or erased by exposing it to ultraviolet light for up to 20 – 40 minutes and it is mainly used to store the computer BIOS.

  3. EEPROM: EEPROM stands for Electrically Erasable Programmable Read Only Memory, it is programmable, and data inside it can be removed or erased electrically, it is used in smart cards and remote keyless systems.

  4. MROM: MROM stands for Mask Rom, it is a type of Read Only memory where Mask refers to the integrated circuit that is covered with opaque plates called photomask. It does not allow users to alter the data stored in it and is mainly used to store the finalized code of the project.

Key Difference Between RAM and ROM

The main difference between RAM and ROM is that: RAM is a volatile memory, which means that it loses its data when the computer is turned off. It is used to store data that the CPU is currently using, such as the operating system, running applications, and open files. RAM is much faster than ROM, which is why it is used for this purpose.

In contrast, ROM is a non-volatile memory, which means that it retains its data even when the computer is turned off. It is used to store permanent data, such as the BIOS (Basic Input/Output System) and the boot loader. The BIOS is a program that starts the computer and performs essential tasks such as loading the operating system. The boot loader is a program that loads the operating system from the hard drive into RAM.

Difference Between RAM and ROM

RAMROM
RAM is volatile memory, which could store data as long as power is supplied.ROM is non-volatile memory, which could store data permanently.
RAM is read-write memory, and data can be retrieved and altered.ROM is read-only memory, data can be read-only, and we cannot alter the data.
RAM is faster in speedROM is slower in speed
Data is temporary and requires constant power to maintain integrity.Data is permanent and remains intact without the need for power.
RAM is expensiveROM is cheaper than RAM
The CPU can access data stored in RAMThe CPU can not access the data stored in ROM unless data is stored in RAM
RAM is used as cache memory in computerROM is used as firmware by microcontrollers
RAM consists of four components which are memory matrix, address decoder, input buffer, and output bufferROM consists of two components which are Decoder and OR gates
Can be upgraded or expanded by adding more RAM modules.Cannot be upgraded or changed after production.
DDR4, DDR5, SDRAM, etc.BIOS ROM, firmware ROM, game cartridges in old consoles, etc.

Characteristics of RAM

The characteristic of RAM is as follow:

  • RAM is volatile i.e we require the computer power to read data, when power is turned off data is erased.
  • RAM read and write speed is faster than memories like ROM( Read Only Memory) , HDD( Hard Disk Drive) and SDD(Solid State Drive)
  • RAM is used as cache memory, Cache memory is the smallest memory in the computer system that provides high-speed data access to a processor.
  • RAM is expensive in comparison to other memories.

Characteristics of ROM

The characteristic of ROM is as follow:

  • ROM can write data only once but we can read data anytime.
  • ROM can store data permanently.
  • ROM is Non Volatile memory i.e it can retain data stored in it even after computer power is turned off.
  • ROM contains BIOS( Basic Input Output System), it is the first program that runs when a computer is switched on, that loads Operating System from secondary memory to primary memory, which helps in starting up the computer.

Advantages of RAM

The advantages of RAM are:

  • We can read and write in RAM
  • RAM is power efficient
  • RAM increases the speed of the computer system
  • RAM is faster than secondary storage

Advantages of ROM

The advantages of ROM are:

  • ROM is non-volatile, we can retain data after power is removed.
  • ROM has the functionality of auto-refreshing.
  • ROM can store data permanently.
  • ROM is less expensive as compared to ROM.

Learn More

Conclusion

RAM and ROM are essential for computer systems and both play a vital role where ROM contains BIOS that helps in booting up the computer and RAM stores the data which is actively processed by the CPU.

Hope you like this blog, if you find this blog insightful then don’t forget to share it with your friends.