Read vs Write Operation in Memory: Differences Explained (RAM, Cache and SSD)

Read and Write Operation in Memory
On this page
  1. Read vs write at a glance
  2. How a memory read works (step by step)
  3. How a memory write works (step by step)
  4. Read and write in different memory types
  5. Why writes matter for SSDs
  6. Cache write policies
  7. FAQ

A read operation copies data from a memory location to the CPU without changing it; a write operation stores new data into a memory location, replacing what was there. In both, the CPU puts the address on the address bus and uses a control signal (Read or Write). For a read, the memory places the data on the data bus for the CPU; for a write, the CPU places the data on the data bus and the memory stores it. Reads are non-destructive and usually faster; writes change memory and, on flash storage, cause wear.

Read vs write at a glance

Read operationWrite operation
PurposeFetch data or instructionsStore or update data
Data directionMemory → CPUCPU → memory
Changes memory?No (contents stay the same)Yes (old value is overwritten)
Control signalRead / MEMR (RD)Write / MEMW (WR)
Registers involvedMAR holds address; data arrives in MDR/MBRMAR holds address; MDR/MBR holds data to store
Typical speedOften fasterOften slower (especially SSD/flash)
WearNo wearWears flash cells (SSDs, USB drives)

How a memory read works (step by step)

  1. The CPU places the memory address in the Memory Address Register (MAR) and on the address bus.
  2. The control unit asserts the Read signal on the control bus.
  3. The memory decodes the address and selects the right cell(s).
  4. The memory puts the stored data on the data bus.
  5. The data is copied into the Memory Data Register (MDR) and then into a CPU register.

In DRAM, reading a row actually drains the tiny capacitors, so the memory automatically rewrites ("restores") the row afterwards; to the CPU it still looks non-destructive.

How a memory write works (step by step)

  1. The CPU places the address in the MAR / on the address bus.
  2. It places the data to be stored in the MDR / on the data bus.
  3. The control unit asserts the Write signal.
  4. The memory stores the data at the selected address, replacing the old value.

Read and write in different memory types

MemoryReadWriteNotes
CPU cache (SRAM)About 1–40 nsSimilarWrite-back or write-through policies
RAM (DRAM, DDR5)Tens of ns latencySimilarVolatile: data lost when power is off; needs refresh
NVMe SSD (flash)Thousands of MB/sUsually a bit slower; can drop when cache fillsMust erase blocks before rewriting; limited write endurance (TBW)
HDDAbout 100–250 MB/sSimilarMechanical; slow random access
ROMYesNo (or only by special flashing for EEPROM/flash ROM)Firmware, BIOS

More background: RAM vs storage, types of memory mapping, and memory addressing.

Why writes matter for SSDs

  • Flash cells wear out after a limited number of program/erase cycles; SSDs spread writes with wear levelling.
  • Endurance is listed as TBW (terabytes written); a typical 1 TB consumer SSD is rated for hundreds of TB, which most users never reach.
  • SSDs write data in pages but erase in larger blocks, so they use TRIM and garbage collection to stay fast.

Cache write policies

  • Write-through: data written to cache and main memory at the same time (simpler, slower).
  • Write-back: data written to cache first and to memory later when the line is evicted (faster, more complex).
  • Read hit / read miss: a read hit finds data in cache; a miss fetches it from RAM.

FAQ

Which is faster, read or write?

In RAM they're similar; in SSDs and flash, reads are usually faster, especially for random writes.

What is a read/write (R/W) line?

A control-bus signal that tells memory whether the CPU wants to read or write at the given address.

Is RAM read-write memory?

Yes. RAM is read/write memory; ROM is mainly read-only.

What is read-write head?

In hard drives, the read/write head magnetises (writes) or senses (reads) data on the spinning platters.

Related guides