Anantam IASPost · 28 July 2026

Difference Between RAM and ROM: Memory Types Explained

Study Notes · General Studies · GS I · GS III · Science & Tech

RAM is volatile working memory the processor reads and writes; ROM is non-volatile storage that holds start-up instructions. Full comparison table and types.

The difference between RAM and ROM comes down to two things: what happens when the power goes off, and who is allowed to write to the chip. RAM (Random Access Memory) is volatile working memory — it holds whatever the processor is using right now and empties the moment power is cut. ROM (Read Only Memory) is non-volatile — it keeps its contents without power and stores the fixed instructions a device needs to start up and run its basic hardware.

Both sit inside almost every computing device you own, and both are addressed randomly, which is why the names sound related. But they do opposite jobs. RAM is a workbench. ROM is the instruction manual bolted to the wall above it. The NCERT Class 11 Computer Science chapter on the computer system sets out the same division in its treatment of primary memory.

What RAM actually does

When you open a file, the processor does not work on it where it lives on the disk. It copies the file into RAM, works on it there, and writes the result back. Every running program, the operating system itself, and the data those programs are handling all occupy RAM while they are active.

RAM is called “random access” because the memory controller can reach any storage cell directly, in roughly the same time, regardless of where that cell sits — unlike tape, where you must wind through everything in between. Modern DRAM access latency is measured in nanoseconds, which is why RAM sits between the very fast processor and the comparatively slow disk.

The cost of that speed is volatility. RAM cells store information as an electrical state. Remove the supply and the state collapses. That is why unsaved work disappears in a power cut.

What ROM actually does

ROM holds instructions that must survive a power cycle and must not be casually overwritten. When you press the power button, the processor has no operating system yet — the OS is on the disk and nothing has loaded it. So the processor is hard-wired to fetch its first instructions from a fixed address in ROM. Those instructions, the firmware called BIOS or UEFI on a PC, test the hardware, initialise it, find the boot device, and hand control to the operating system, which is then loaded into RAM.

The “read only” in the name is now partly historical. The earliest ROM was written once at the factory and could never be changed. Modern firmware chips are flash memory, which can be rewritten deliberately — that is what a BIOS update does. What has not changed is the intent: this content is written rarely, by an authorised process, and read constantly.

RAM vs ROM: comparison table

BasisRAM (Random Access Memory)ROM (Read Only Memory)
VolatilityVolatile — contents lost when power is removedNon-volatile — contents retained without power
Primary functionTemporary working memory for running programs and active dataPermanent storage of start-up and firmware instructions
Read and writeFreely readable and writable by the processor at any timeRead constantly; written rarely and only through a controlled process
SpeedFaster — access latency in nanosecondsSlower to access, and much slower to write
Typical capacity in a deviceLarge — commonly 4 GB to 64 GB in phones and laptopsSmall — firmware chips are typically a few megabytes
Cost per bitHigherLower
Main typesSRAM and DRAMMROM, PROM, EPROM, EEPROM, flash
Physical formUsually a removable module or soldered chips on the boardA single small chip soldered to the motherboard
Effect on performanceDirectly affects multitasking and how many programs run smoothlyAlmost no effect on day-to-day speed
What it holdsOperating system in use, open applications, open files, cached dataBIOS/UEFI, bootstrap loader, embedded device control code
Behaviour on restartWiped clean; refilled from diskUnchanged; identical on every boot
Everyday exampleThe 8 GB in a laptop that lets you keep 30 browser tabs openThe chip that shows the manufacturer logo before Windows loads

Types of RAM

Static RAM (SRAM) stores each bit in a flip-flop circuit. As long as power is supplied, the bit stays where it is — no maintenance needed, hence “static”. SRAM is fast and needs no refresh cycles, but each cell takes about six transistors, so it is bulky and expensive per bit. It is used where speed matters most and quantity does not: processor cache and small buffers inside controllers.

Dynamic RAM (DRAM) stores each bit as a charge on a tiny capacitor guarded by one transistor, so it packs far more capacity into the same silicon at a fraction of the cost. The catch is that the capacitor leaks: the charge must be read and rewritten thousands of times per second. That refresh cycle is what makes it “dynamic”, and it costs both time and power. DRAM is what people mean by 16 GB of RAM in a laptop. The DDR generations, and the LPDDR variants in phones, are successive DRAM interface standards.

SRAM buys speed with cost and area; DRAM buys density with a refresh overhead. Both appear in the same machine, at different levels of the memory hierarchy. Graphics hardware follows the same logic — a graphics processing unit pairs thousands of cores with very high-bandwidth memory to keep them fed.

Types of ROM

Mask ROM (MROM) is programmed during manufacture. The data is part of the chip’s photolithographic mask, so it can never be altered. Cheapest at very high volumes, it was used for calculator function tables and cartridge games.

PROM (Programmable ROM) ships blank. The buyer writes it once using a PROM programmer, which burns tiny fuses inside the chip. Blown fuses cannot be restored, so PROM is one-time programmable.

EPROM (Erasable PROM) can be rewritten, but only by removing the chip and exposing its silicon to ultraviolet light through a quartz window in the package for several minutes — which wipes the entire chip. EPROMs are recognisable by that little glass window, usually covered by a sticker.

EEPROM (Electrically Erasable PROM) removed the need for UV light and physical removal. Erasing happens electrically, in place, byte by byte. That flexibility made it standard for small configuration stores holding a device’s serial number, calibration values, or settings.

Flash memory is an evolution of EEPROM that erases in blocks rather than individual bytes. Losing byte-level granularity buys large gains in density and write speed, which is why flash now dominates: SSDs, memory cards, USB drives, phone storage, and firmware chips. Imaging hardware relies on the same non-volatile stores for calibration data, as in a charge-coupled device camera module.

Each generation made rewriting easier without giving up non-volatility. That is why “read only” now describes a role rather than a physical restriction.

Where each one sits in a real device

A laptop starting up shows the division clearly:

  1. Power arrives. The processor jumps to a fixed address inside the flash ROM chip on the motherboard.
  2. The firmware there runs the power-on self test, initialises the memory controller, and makes RAM usable.
  3. It locates the boot device and loads the operating system’s bootloader from the SSD into RAM.
  4. Control passes to the operating system, which now runs entirely from RAM, as does every application you open.
  5. You shut down. RAM empties completely. The ROM chip is untouched and identical for the next boot.

A washing machine, a car’s engine control unit, and a router follow the same pattern at a smaller scale. The scale differs, not the kind: India’s national supercomputing programme builds machines with the same hierarchy measured in terabytes, and both memory types are among the priority products under the India Semiconductor Mission.

Common confusions

“My phone has 8 GB RAM and 128 GB ROM.” The biggest source of confusion, and technically wrong. The 128 GB is flash *storage*, equivalent to a laptop’s SSD. Phone marketing borrowed the word ROM because the storage is non-volatile flash, and the label stuck in South Asian retail listings. Real ROM in a phone — the firmware chip — is a few megabytes at most. Mentally translate “ROM” on a spec sheet to “internal storage”. A “custom ROM” for Android is the same borrowed usage: a replacement operating system image flashed to a storage partition, not a physical chip.

RAM is not storage. Adding RAM does not give you room for more photos. Adding storage does not let you run more apps at once. They solve different problems, and one cannot substitute for the other.

ROM is not permanent in the absolute sense. Modern firmware is rewritable. A failed BIOS update can leave a machine unable to boot precisely because the ROM contents were changed.

Virtual memory blurs the line, but does not erase it. When RAM runs short, the operating system moves inactive pages to a swap file on disk, making the disk act like slow overflow RAM. The round trip is thousands of times slower, which is exactly what you feel when a machine starts thrashing.

Frequently Asked Questions

Is ROM faster than RAM?

No. RAM is significantly faster for both reading and writing. ROM’s advantage is retention without power, not speed. Firmware code is often copied from ROM into RAM during boot — “shadowing” — precisely so it runs faster afterwards.

Can a computer work without ROM?

Not in the normal sense. Without ROM the processor would have no instructions to execute at power-on and no way to find the operating system. Some embedded systems boot from flash or a network image instead, but there is always a non-volatile source of the first instructions.

Why is RAM volatile at all — why not use non-volatile memory everywhere?

Because the technologies that retain data without power are, at present, slower to write and wear out after a finite number of write cycles. DRAM can be rewritten endlessly at nanosecond speeds. Non-volatile memory matching DRAM on both counts remains a research area rather than a mainstream product.

Does more RAM make a computer faster?

Only up to a point. If your workload already fits in RAM, adding more changes nothing. If it does not fit, the system swaps to disk and slows dramatically, and there more RAM helps a great deal. RAM removes a bottleneck rather than adding speed.

What is the difference between EPROM and EEPROM?

EPROM is erased by ultraviolet light, requires removing the chip from the circuit, and the erase wipes the whole chip. EEPROM is erased electrically, in place, byte by byte. That convenience is why EEPROM and its descendant, flash, replaced it.

Is cache memory a kind of RAM?

Yes. Processor cache is SRAM — the fastest and most expensive form of RAM, placed on or very near the processor die to reduce time spent waiting for main DRAM.

Practice Questions

1. Which of the following statements about DRAM is correct?

a) It stores each bit in a flip-flop and needs no refreshing
b) It stores each bit as a charge on a capacitor and requires periodic refreshing
c) It is non-volatile and retains data without power
d) It is used mainly for processor cache because of its speed

Answer: b) It stores each bit as a charge on a capacitor and requires periodic refreshing

2. The firmware that performs the power-on self test and initiates the boot process is typically stored in:

a) Dynamic RAM
b) Static RAM used as processor cache
c) A flash ROM chip on the motherboard
d) The swap partition of the hard disk

Answer: c) A flash ROM chip on the motherboard

3. Which type of read only memory requires exposure to ultraviolet light for erasure?

a) PROM
b) EPROM
c) EEPROM
d) Mask ROM

Answer: b) EPROM

4. Which of the following statements about SRAM and DRAM is correct?

a) SRAM is cheaper per bit than DRAM
b) SRAM requires refresh cycles while DRAM does not
c) SRAM is faster than DRAM and is used for cache memory
d) Both SRAM and DRAM are non-volatile

Answer: c) SRAM is faster than DRAM and is used for cache memory

5. Flash memory differs from conventional EEPROM primarily because it:

a) Is volatile and loses data on power failure
b) Can only be programmed once at the factory
c) Erases data in blocks rather than byte by byte
d) Requires a quartz window for erasure

Answer: c) Erases data in blocks rather than byte by byte

  1. Distinguish between volatile and non-volatile memory, and explain why a modern computing device needs both.
  2. Trace the evolution from mask ROM to flash memory. What technical problem did each successive type solve?
  3. “The memory hierarchy is an economic compromise, not a technical ideal.” Examine this statement with reference to SRAM, DRAM and secondary storage.
  4. Explain why the term ROM as used in consumer electronics marketing differs from its meaning in computer architecture, and discuss the implications of such terminological drift.
  5. Discuss the role of non-volatile memory in embedded systems, with examples from consumer appliances, automotive control units and scientific instrumentation.