EEPROM (Electrically Erasable Programmable Read-Only Memory) and flash memory are non-volatile, electrically reprogrammable memory technologies. Both are descendants of ROM but can be erased and rewritten without removing them from the system.

The difference between EEPROM and flash is granularity: EEPROM can erase individual bytes; flash erases in large blocks. Flash sacrifices fine-grained writes for higher density and lower cost per bit.

EEPROM

  • Cell: 1 transistor with a floating gate that holds trapped charge.
  • Read: fast (~50–200 ns).
  • Write: slow (~ms per byte) and erasing requires a special voltage.
  • Granularity: byte-by-byte erase and rewrite.
  • Endurance: ~100K to 1M write cycles per cell before wearing out.
  • Use case: small amounts of configuration data — a network device’s MAC address, a router’s settings, BIOS calibration values.

EEPROM is ideal where you need infrequent, fine-grained updates to small data — settings that the user occasionally changes but the device keeps across power cycles.

Flash memory

  • Cell: similar floating-gate transistor as EEPROM.
  • Read: fast (~25–100 ns for NOR, slower for NAND).
  • Write: slow per byte but supports high-bandwidth bulk writes.
  • Granularity: erases in blocks of typically 4 KB to several MB. Can’t change individual bytes without erasing and rewriting the whole block.
  • Endurance: ~1K to 100K erase cycles per block.
  • Density: very high — flash cells are tightly packed.

Flash is the technology behind SSDs, USB drives, SD cards, and embedded device storage.

NOR vs NAND flash

Two main flash architectures:

  • NOR flash: cells in parallel, supports random byte-level reads (like a ROM). Lower density, used for code storage where execute-in-place matters (firmware, BIOS).
  • NAND flash: cells in series, only supports page-level reads (typically 2–8 KB pages). Higher density, used for data storage (SSDs, USB sticks, SD cards).

NAND is more common for large storage; NOR for code that needs random access.

Why “block erasure”

The convention in NOR and NAND flash is that erased = 1 and programmed = 0. The high-voltage erase operation removes electrons from the floating gate, leaving every cell at logical . The (lower-voltage) program operation injects electrons into a chosen cell, flipping it from .

The asymmetry: programming can flip individual bits from , but flipping a bit from is impossible without erasing — and erase only works at block granularity. So once a bit has been programmed to , the only way to read from it again is to erase the whole block (returning all bits in the block to ) and re-program everything else.

This is why flash writes are organized at the block level: small in-place modifications “in the wrong direction” require a full erase-and-rewrite of the surrounding block.

Software libraries (file systems for flash, like F2FS, JFFS2) handle this transparently, but they have to do wear leveling — spreading writes across the chip so no single block wears out before the others. Without wear leveling, the most-frequently-written block (e.g., a file system’s allocation table) would burn through its write endurance long before the rest of the chip.

Use cases by technology

TechnologyUse case
EEPROMSmall config data, calibration, MAC addresses
NOR flashBoot ROM, firmware, code storage in embedded devices
NAND flashSSDs, USB drives, SD cards, smartphones
3D NANDModern high-capacity SSDs (stacked NAND for higher density)

Modern SSDs with terabyte capacities are made of NAND flash organized into many planes and dies, with sophisticated controllers managing wear leveling, bad blocks, and parallelism. The raw NAND chips alone aren’t usable as direct storage — they need a controller to translate between block-style operations and the file-system-friendly byte access.

In the Memory hierarchy

EEPROM and flash sit below main memory (DRAM) in the hierarchy:

  • Main memory: nanoseconds, gigabytes, volatile.
  • SSD (NAND flash): microseconds, terabytes, non-volatile.
  • Hard disk: milliseconds, terabytes, non-volatile.

SSDs are dramatically faster than spinning disks (50–100× faster random access) and have largely displaced them in laptops and consumer devices. Datacenters still use spinning disks for cold storage where capacity per dollar is the priority.