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

On this page
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 operation | Write operation | |
|---|---|---|
| Purpose | Fetch data or instructions | Store or update data |
| Data direction | Memory → CPU | CPU → memory |
| Changes memory? | No (contents stay the same) | Yes (old value is overwritten) |
| Control signal | Read / MEMR (RD) | Write / MEMW (WR) |
| Registers involved | MAR holds address; data arrives in MDR/MBR | MAR holds address; MDR/MBR holds data to store |
| Typical speed | Often faster | Often slower (especially SSD/flash) |
| Wear | No wear | Wears flash cells (SSDs, USB drives) |
How a memory read works (step by step)
- The CPU places the memory address in the Memory Address Register (MAR) and on the address bus.
- The control unit asserts the Read signal on the control bus.
- The memory decodes the address and selects the right cell(s).
- The memory puts the stored data on the data bus.
- 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)
- The CPU places the address in the MAR / on the address bus.
- It places the data to be stored in the MDR / on the data bus.
- The control unit asserts the Write signal.
- The memory stores the data at the selected address, replacing the old value.
Read and write in different memory types
| Memory | Read | Write | Notes |
|---|---|---|---|
| CPU cache (SRAM) | About 1–40 ns | Similar | Write-back or write-through policies |
| RAM (DRAM, DDR5) | Tens of ns latency | Similar | Volatile: data lost when power is off; needs refresh |
| NVMe SSD (flash) | Thousands of MB/s | Usually a bit slower; can drop when cache fills | Must erase blocks before rewriting; limited write endurance (TBW) |
| HDD | About 100–250 MB/s | Similar | Mechanical; slow random access |
| ROM | Yes | No (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.