SRAM versus DRAM

Every computer must answer a physical question before it answers a logical one: where do the bits actually live? A processor running at several billion cycles per second cannot wait for a signal to travel across a slow, dense memory chip on every instruction fetch. Yet a system also needs gigabytes of storage that a fast but expensive technology could never provide at an affordable price. This tension between speed and capacity is not solved by a single memory technology. Instead, it is solved by using two fundamentally different circuits, side by side. Each one does what it does best. Static RAM (SRAM) and Dynamic RAM (DRAM) are the two workhorse technologies. Together they make the Memory Hierarchy physically possible. SRAM cells are fast, stable, and expensive per bit. DRAM cells are slow, leaky, and cheap per bit. This single set of physical facts — not marketing, not accident — explains why your processor puts SRAM in caches and registers, and DRAM in main memory. Understanding the transistor-level difference between these two circuits is the missing piece. It makes the abstract idea of "memory hierarchy" concrete. The hierarchy exists because the underlying hardware genuinely cannot be built any other way at every level simultaneously. This article explains the storage cell of each technology. It works out why one is fast and one is dense. It connects those physical facts to their assigned roles in a real system: SRAM for register files and caches, DRAM for main memory. It builds directly on the concept of Locality of Reference that motivates having a hierarchy at all. It also sets up the mechanics of Cache Basics: Blocks, Hits, and Misses and Virtual Memory: Concept and Motivation. Both of those topics assume you already know why the fast tier is small and the big tier is slow. By the end, you should be able to look at a system's cache sizes (kilobytes to a few megabytes) and main memory size (gigabytes). You should be able to explain, from the transistor level up, why those numbers could not be swapped.

Key takeaways
  • SRAM stores a bit in a bistable latch (6 transistors); DRAM stores a bit as charge on a capacitor (1 transistor + 1 capacitor).
  • SRAM needs no refresh and holds data as long as power is on; DRAM leaks charge and must be refreshed every ~64 ms.
  • SRAM is 5–10× larger in area per bit than DRAM, so DRAM packs far more bits into the same silicon area.
  • DRAM reads are destructive (the read discharges the capacitor) and must be immediately rewritten; SRAM reads are non-destructive.
  • Speed and cost per bit trade off directly: SRAM ≈ nanoseconds and dollars-per-megabyte; DRAM ≈ tens of nanoseconds and cents-per-gigabyte.
  • The hierarchy places SRAM in registers/caches (small, fast) and DRAM in main memory (large, slower) because no single technology optimizes both axes.
The core insight

SRAM trades transistor count for speed and stability, DRAM trades transistor count for density and cost, and the memory hierarchy exists precisely to exploit both trades at once.

The idea

A memory cell is the smallest circuit that stores one bit. SRAM (Static Random-Access Memory) implements a cell as a pair of cross-coupled inverters — a bistable latch built from six transistors (the "6T cell"). Because the two inverters actively reinforce each other's output, the cell holds its state indefinitely as long as power is supplied; no periodic action is needed to keep the bit from decaying. This is what "static" means: the stored value is stable without intervention.

DRAM (Dynamic Random-Access Memory) implements a cell as one transistor acting as a switch plus one capacitor that stores charge (the "1T1C cell"). A charged capacitor represents a 1, a discharged one a 0. Capacitors are not perfect insulators — leakage current slowly drains the charge — so every DRAM cell must be periodically refreshed: read out and rewritten before the charge decays past the threshold that distinguishes a 1 from a 0. This is what "dynamic" means: the stored value decays and must be dynamically restored. Reading a DRAM cell is also destructive — the act of sensing the tiny charge on the capacitor drains it — so every DRAM read is followed by an automatic rewrite of that row. These two circuit choices propagate into every practical property that matters for computer architecture: cell area, access latency, power consumption, and manufacturing cost per bit. The 6T SRAM cell needs roughly 5–10 times the silicon area of a 1T1C DRAM cell, so for the same chip area DRAM stores far more bits — this is the density advantage. But SRAM's active bistable circuit resolves to a stable logic level almost immediately when accessed, giving access times of roughly 1–3 processor cycles, while DRAM's sense amplifiers must detect a minuscule charge difference on a capacitor connected to a long, capacitive bit line, an operation that takes tens of nanoseconds — the latency disadvantage. The result is a clean, physically grounded division of labor that anchors the entire Memory Hierarchy: put SRAM wherever speed matters most and the data set is small (registers, L1/L2/L3 caches), and put DRAM wherever capacity matters most and some latency is tolerable (main memory).

How it works

The SRAM cell (6T)

Two CMOS inverters are cross-coupled: the output of inverter A feeds the input of inverter B, and vice versa. This creates two stable states — (A=0, B=1) and (A=1, B=0) — and no stable in-between state, hence bistable. Two additional access transistors connect the cell's two internal nodes to a pair of complementary bit lines (BL and BL̄), gated by a word line (WL). To read, the word line is raised, the access transistors turn on, and the pre-charged bit lines are pulled apart by the cell's stored value; a sense amplifier detects the small voltage difference and amplifies it to a full logic level. To write, the bit lines are driven hard with the new value and the word line is raised, forcing the cross-coupled inverters to flip if necessary. Because the inverters actively drive their outputs, the read is non-destructive, and no refresh is ever needed.

The DRAM cell (1T1C)

A single access transistor connects a storage capacitor to a bit line, gated by a word line. To write, the word line is raised and the bit line is driven to the desired voltage, charging or discharging the capacitor. To read, the word line is raised and the capacitor's charge redistributes onto the (much larger) bit line capacitance, producing a tiny voltage perturbation that a sense amplifier detects and amplifies — this amplification simultaneously restores the correct full-swing value onto the bit line and back into the cell, which is why a DRAM read is followed by an implicit rewrite. Left untouched, leakage paths (through the access transistor and the capacitor dielectric) drain the charge over milliseconds, so a background refresh operation must read and rewrite every row on a strict schedule, typically once every 64 ms for the whole array.

Refresh, step by step

``` // DRAM background refresh (conceptual) REFRESH_INTERVAL_MS = 64 // JEDEC-typical full-array refresh window NUM_ROWS = rows_in_array function REFRESH_ALL_ROWS(): // Spread refresh work evenly to avoid one giant stall per_row_period = REFRESH_INTERVAL_MS / NUM_ROWS for row in 0 .. NUM_ROWS - 1: wait_until(next_scheduled_time(row, per_row_period)) ACTIVATE(row) // sense amplifiers read the row, restoring charge PRECHARGE(row) // close the row, leaving bit lines ready for next access ``` ``` // Reading one SRAM bit (non-destructive) function SRAM_READ(cell): precharge(BL, BL_bar) // both bit lines pulled to Vdd/2 or Vdd assert(cell.WL = 1) // raise word line delta = sense_amplifier(BL, BL_bar) // amplify the differential swing return delta > 0 ? 1 : 0 // cell's cross-coupled inverters still hold original value: non-destructive ``` ``` // Reading one DRAM bit (destructive, needs rewrite) function DRAM_READ(cell): precharge(BL, Vdd/2) // bit line pre-set to reference voltage assert(cell.WL = 1) // raise word line, connect capacitor to BL delta = sense_amplifier(BL) // tiny charge-sharing perturbation, amplified bit = (delta > 0) ? 1 : 0 drive(BL, bit == 1 ? Vdd : 0) // sense amp restores full-swing value // capacitor is rewritten to bit via BL: this IS the refresh, incidental to read return bit ``` The key structural fact both snippets expose: SRAM's read path never needs to "put the value back," while DRAM's read path must restore the value as an unavoidable side effect of sensing it. This single difference cascades into the timing, area, and power numbers architects rely on.

Figure
Cell structure: SRAM's cross-coupled latch vs. DRAM's capacitor-and-switch
SRAM cell (6T) DRAM cell (1T1C) Inv A Inv B cross-coupled M5 M6 BL BL̄ Word Line (WL) Bistable: no refresh needed M1 Word Line (WL) Capacitor C BL Ground plate Leaks: refresh every ~64 ms 6 transistors / bit 1 transistor + 1 capacitor / bit Fast, stable, large Slow, leaky, dense

Complexity & correctness

Treat "complexity" here as physical resource cost rather than algorithmic asymptotic cost, since these are hardware primitives, not algorithms — but the same discipline of honest accounting applies.

Area per bit. An SRAM cell needs six transistors laid out with two cross-coupled inverters and two access transistors, plus the wiring for two bit lines and isolation to keep the bistable pair from being disturbed by neighboring cells. A DRAM cell needs one transistor and one capacitor, and the capacitor can often be built in a "trench" or "stack" structure that uses the vertical dimension of the die rather than more lateral area. Empirically, this yields roughly a 5–10× area advantage for DRAM per bit, which is why DRAM chips reach gigabit-per-die densities that SRAM does not approach at competitive cost.

Latency. SRAM latency is dominated by the propagation delay through the cross-coupled inverters and the sense amplifier resolving a bit line pair that was actively driven by the cell — a few hundred picoseconds to a couple of nanoseconds in modern processes, translating to roughly 1–3 CPU cycles for an L1 cache access. DRAM latency is dominated by (1) activating a row (driving the word line and letting all capacitors in that row share charge onto their bit lines), (2) the sense amplifier resolving a much smaller voltage perturbation against a much larger bit-line capacitance, and (3) precharging the array before the next access. This full activate–sense–precharge cycle costs tens of nanoseconds, an order of magnitude slower than SRAM, before the request even leaves the DRAM chip and crosses the memory bus.

Power. SRAM's cross-coupled inverters draw static leakage current continuously (to hold state) even when idle, scaling with transistor count and process leakage; large SRAM caches are a major source of a chip's static power. DRAM cells draw negligible static power when idle (the capacitor just leaks slowly), but refresh operations add a periodic energy cost, and this cost grows with array size and shrinks as the technology improves retention time — a genuine tradeoff, not a free win for DRAM.

Correctness of refresh. The invariant that must hold is: every DRAM row is refreshed at least once within its guaranteed retention window (the JEDEC-specified interval, canonically 64 ms across the whole array, i.e., an average interval per row of 64 ms ÷ (number of rows)). If any row is skipped past its retention window, some cells may decay far enough that the sense amplifier reads the wrong logic value — silent data corruption. Correctness reduces to a scheduling guarantee: the refresh controller must issue a refresh command to every row within the interval, regardless of concurrent read/write traffic, which is why DRAM controllers interleave refresh commands with normal accesses and why refresh consumes a small but nonzero fraction of memory bandwidth (typically a few percent).

Why the split is efficient, not arbitrary. If a system used only SRAM, main memory would be enormously expensive and would consume far more chip area and static power for the same capacity — infeasible at gigabyte scale. If a system used only DRAM, register files and L1 caches would be an order of magnitude slower, and since Locality of Reference guarantees that a small working set is accessed overwhelmingly often, that slowdown would dominate almost every instruction. Using SRAM for small, hot structures and DRAM for large, cooler main memory is the efficient point on the cost–capacity–latency surface, and it is exactly the physical justification for building a multi-level Memory Hierarchy instead of a flat address space in one technology.

Worked example

Consider a simplified but realistic system and trace the consequences of the cell-level facts through to system numbers.

QuantitySRAM (used for L1 cache)DRAM (used for main memory)
Cell transistor count6T1T1C
Typical cell area (relative)1.0× (baseline)~0.12–0.20× (5–8× smaller)
Capacity built with equal die area512 KB4–8 MB (illustrative ratio only)
Access latency~1 ns (≈2–3 cycles @ 2–3 GHz)~50–70 ns (row activate + sense + precharge)
Refresh required?NoYes, every row within 64 ms
Idle power behaviorContinuous static leakageNear-zero idle, periodic refresh energy
Assigned hierarchy tierL1/L2/L3 cache, register fileMain memory (DRAM DIMMs)

Now trace a single memory access request through both technologies to see the latency gap concretely.

Step 1 — CPU issues a load for address `0x1000`.

Step 2 — L1 cache (SRAM) lookup. The cache's tag array and data array are SRAM. The processor asserts a word line for the indexed set, the bit lines swing based on the stored bistable values, and a sense amplifier resolves tag and data within roughly 1 cycle (~0.3–1 ns at multi-GHz clock). Suppose this is a cache miss — the tag doesn't match.

Step 3 — Request falls to DRAM main memory. The memory controller issues:

  • `ACTIVATE row R` — the word line for the row is raised, every capacitor in that row shares charge onto its bit line (~15–20 ns).
  • Sense amplifiers detect the tiny perturbation and drive it to a full logic level, simultaneously restoring the row's capacitors (~part of the same window).
  • `READ column C` — the desired word is selected from the now-open row and driven onto the data bus (~10–15 ns).
  • `PRECHARGE` — bit lines are reset for the next access to a different row (~15 ns).

Total: roughly 50–70 ns, versus ~1 ns for the SRAM hit — a 50–70× latency gap, which is exactly why a cache miss is expensive and why the memory hierarchy is designed to make misses rare via Locality of Reference.

Step 4 — Data returns and is placed into the SRAM cache (a new cache line is installed), so that if the same address (or a nearby one, by locality) is requested again soon, Step 2 succeeds and Step 3 is skipped entirely. This is the entire economic argument for caching in one trace: pay the DRAM latency once, then reap many cheap SRAM hits. Meanwhile, in the background, unrelated to this specific access, the DRAM's refresh controller is independently cycling through all rows on its 64 ms schedule:

Time (ms)Action
0.00Refresh row 0
0.00XRefresh row 1 (X ≈ 64 ms / total rows)
...... continues across all rows ...
63.99Refresh last row; cycle restarts

If the memory controller ever fell behind this schedule — say, due to a burst of competing read/write traffic that starved refresh commands for too long — a row could decay past its safe retention margin, and a subsequent read could return a corrupted bit. This never happens in a correctly designed controller because refresh commands are given guaranteed priority slots, illustrating that DRAM's density advantage is not free: it is purchased with an ongoing scheduling obligation that SRAM never incurs.

Common pitfalls & traps

PitfallWhy it's wrongFix
"DRAM is slower just because it's cheaper hardware"Conflates cost with mechanism; the real cause is the destructive, charge-sensing read path requiring activate/sense/prechargeExplain latency via the physical read mechanism, not price
Assuming SRAM never needs any timing overheadSRAM still has sense-amplifier and bit-line delays; it is fast, not instantaneousCompare relative orders of magnitude, not "zero vs. nonzero"
Thinking refresh only matters for correctnessRefresh also costs bandwidth and energy, silently competing with real trafficAccount for refresh overhead in bandwidth/power budgets
Believing bigger SRAM caches are "free" performance winsLarger SRAM arrays have longer bit lines/word lines, increasing access latency and static powerRecognize the area–latency tradeoff even within one technology
Confusing "dynamic" (DRAM) with "clock-dependent""Dynamic" refers to charge decay needing refresh, unrelated to clock frequency or dynamic power in the CMOS senseKeep "dynamic" (needs refresh) and "dynamic power" (switching power) as separate ideas
Assuming a DRAM read leaves the cell unchangedThe read is destructive; the sense amplifier's restore step is mandatory, not optionalAlways couple "DRAM read" with "implicit rewrite" in explanations

Pioneers & history

The 6T SRAM cell and the 1T1C DRAM cell both emerged from the same era of MOS integrated circuit development, but from different design goals: SRAM prioritized speed and simplicity of control, DRAM prioritized density to make large-scale memory economically viable.

Origins · 1 minRobert Dennard and how this was discovered
RD
Robert Dennard
1932–2020 · IBM researcher who invented the single-transistor DRAM cell

Robert Dennard, working at IBM's Thomas J. Watson Research Center, recognized that a memory cell could be reduced to a single transistor and a capacitor if the read operation were allowed to be destructive and immediately restored. This 1T1C design, patented in 1968, discarded the multi-transistor stability of earlier memory schemes in exchange for a dramatic reduction in area per bit — the foundational insight that made gigabit-scale, low-cost main memory possible. Dennard is also known for Dennard scaling, the observation that shrinking transistors could maintain constant power density, which shaped decades of processor design.

History
1963
— MOS-based flip-flop memory cells (multi-transistor, SRAM-like) demonstrated in early integrated circuits.
1968
— Robert Dennard files the patent for the single-transistor DRAM cell at IBM.
1970
— Intel releases the 1103, the first commercially successful DRAM chip, displacing magnetic core memory.
1970
s — SRAM cells standardize around the 6-transistor cross-coupled-inverter design still used today.
1990
s–2000s — DRAM refresh and latency-hiding techniques (burst mode, synchronous DRAM, double data rate) evolve to keep pace with faster processors, deepening the SRAM/DRAM split across cache and main memory tiers.

Where this matters

Every general-purpose processor built since the 1970s embodies this split. Register files and L1/L2/L3 caches are built from SRAM because they must respond within a handful of processor cycles, directly enabling the fast tiers assumed by Cache Basics: Blocks, Hits, and Misses — the entire hit/miss framework only makes sense because SRAM caches are fast enough to be worth checking first. Main memory — the DIMMs in a desktop, server, or phone — is built from DRAM (commonly DDR4/DDR5 today) because gigabytes of capacity at an affordable price are only possible with the small 1T1C cell, and this large-but-slower tier is exactly what makes Virtual Memory: Concept and Motivation necessary: software needs an abstraction that lets a program's address space span far more capacity than any single fast tier could hold, backed transparently by this dense, cheaper technology. Beyond general-purpose CPUs, GPUs use large on-chip SRAM structures (register files, shared memory, L2 caches) to feed thousands of parallel execution units with minimal stall, while relying on high-bandwidth DRAM (GDDR, HBM) for the large datasets those units chew through. Embedded systems and microcontrollers often use SRAM exclusively for small, latency-critical working memory when capacity requirements are modest enough that DRAM's refresh circuitry and controller complexity are not worth the cost. Even outside computing, the cell-level tradeoff generalizes: any system needing both speed and capacity in the same design will end up splitting into a small fast tier and a large slow tier, precisely because no single physical mechanism optimizes both simultaneously — the same principle underlying disk caching, content-delivery networks, and multi-level storage in distributed systems.

Ask the tutor: How does DDR (double data rate) timing interact with DRAM's activate–sense–precharge cycle to hide latency?

Why does SRAM cost more per bit than DRAM if both are made of transistors?

Cost per bit tracks silicon area consumed per stored bit, not the raw material. An SRAM cell needs six transistors arranged as two cross-coupled inverters plus two access transistors, along with wiring for a differential bit-line pair, all of which occupies substantially more die area than a DRAM cell's single transistor and one capacitor. Since manufacturing cost scales strongly with die area — fewer chips fit on a wafer, and yield drops as chips get larger — SRAM ends up costing several times more per bit even though the underlying fabrication process (CMOS) is shared with DRAM. This is a direct, physical consequence of transistor count, not a pricing or market artifact.

Does SRAM ever need any kind of periodic maintenance, like DRAM's refresh?

No — this is the defining distinction. An SRAM cell's cross-coupled inverters form a bistable circuit: as long as power is supplied, each inverter actively drives its output to reinforce the other inverter's input, so the stored state persists indefinitely without any external action. DRAM's capacitor-based cell has no such active reinforcement; leakage current continuously drains the stored charge, so it must be periodically read and rewritten (refreshed) to prevent data loss. This is precisely the "static" versus "dynamic" distinction the two names encode, and it is the single biggest practical difference in how the two technologies are used in a real memory controller.

Why is DRAM's read operation destructive but SRAM's is not?

DRAM stores a bit as charge on a tiny capacitor, and reading it means connecting that capacitor to a much larger bit-line capacitance and letting charge redistribute between them — a process that inherently drains the capacitor's stored charge to produce a detectable signal. The sense amplifier must therefore immediately rewrite the sensed value back into the cell as part of every read. SRAM, by contrast, stores a bit via an actively driven bistable circuit: reading only requires observing the already-stable output of the cross-coupled inverters, which does not disturb their internal state, so no rewrite is needed after a read.

If DRAM is so much slower, why not just build large main memories entirely from SRAM?

It is physically possible but economically and practically infeasible at scale. SRAM's 6-transistor cell occupies roughly 5–10 times the area of a DRAM cell, so an all-SRAM main memory of, say, 16 gigabytes would require a chip area (and cost) many times larger than an equivalent DRAM design, along with far higher static power draw from millions of continuously leaking bistable cells. The Memory Hierarchy instead exploits Locality of Reference: a small SRAM cache captures the vast majority of accesses cheaply, while DRAM supplies the bulk capacity at an acceptable, if higher, latency for the comparatively rare cache misses.

How does refresh actually affect real system performance, not just correctness?

Refresh operations consume memory bandwidth and time that would otherwise serve real read/write requests, because a row being refreshed is temporarily unavailable for normal access. Modern DRAM controllers interleave refresh commands across the full 64 ms window in small increments per row (rather than refreshing the entire array at once) specifically to minimize the visible stall on user traffic, but refresh still typically consumes a few percent of total memory bandwidth and adds worst-case latency when a request happens to collide with a scheduled refresh. This overhead grows as DRAM density increases (more rows to refresh) and as leakage worsens with temperature, which is one reason high-density and high-temperature operation both push architects toward more sophisticated refresh scheduling.

Is the SRAM/DRAM split the same thing as the levels of cache (L1, L2, L3)?

Not exactly — the SRAM/DRAM split is a technology boundary, while L1/L2/L3 are hierarchy levels that happen to sit on the SRAM side of that boundary before main memory (DRAM) begins. All three cache levels are typically built from SRAM, but they differ from each other in size, associativity, and latency due to design choices covered separately in Cache Basics: Blocks, Hits, and Misses. The SRAM/DRAM boundary specifically marks the transition from on-chip, per-core or per-socket fast storage to the shared, off-chip, high-capacity main memory that every core in a system ultimately draws from.

Does this SRAM/DRAM distinction still matter with modern packaging like HBM or on-chip DRAM caches?

Yes, the underlying cell physics is unchanged even as packaging innovates. High Bandwidth Memory (HBM) and embedded/on-package DRAM still use the 1T1C cell and still require refresh; they achieve higher bandwidth and lower latency mainly through wider buses and physical proximity (stacking dies, shorter wires), not by changing the cell's fundamental speed-versus-density tradeoff. Likewise, large on-chip "DRAM caches" sit between SRAM caches and off-chip DRAM specifically because architects keep finding new intermediate points on the same latency-versus-capacity curve, reinforcing rather than replacing the core SRAM/DRAM distinction this article describes.

Before this

Where this leads