Memory technologies

Digital logic & computing · tree view

Memory is an array of addressed cells: SRAM latches bits in flip-flops, DRAM refreshes leaking capacitors, and ROM/flash families trade write convenience for permanence. N address lines select one of 2^N words.

Prerequisites

flip-flop symbol
flip-flop
ttl-7400 symbol
ttl-7400
cmos-4000 symbol
cmos-4000
sram-16x1-decoder.svg
sram-16x1-decoder.svg
memory-volatility-map.svg
memory-volatility-map.svg

The basic goal of digital memory is to provide a means to store and access binary data: sequences of 1's and 0's.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 15 — Why digital? source

The location of this data within the storage device is typically called the address, in a manner reminiscent of the postal service.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 15 — Digital memory terms and concepts source

Many electronic memory devices store binary data by means of circuits that are either latched in a "high" or "low" state, and this latching effect holds only as long as electric power is maintained to those circuits. Such memory would be properly referred to as volatile.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 15 — Digital memory terms and concepts source

What "RAM" really refers to is the volatility of the memory, and not its mode of access.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 15 — Digital memory terms and concepts source

Only the cell circuit that is addressed by the 4-bit decoder input will be accessible through the data bus.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 15 — Modern nonmechanical memory source

This simple memory circuit is random-access and volatile.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 15 — Modern nonmechanical memory (static RAM) source

They called this type of memory circuit a dynamic RAM, because of its need of periodic refreshing.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 15 — Modern nonmechanical memory (dynamic RAM) source

Read-only memory (ROM) is similar in design to static or dynamic RAM circuits, except that the "latching" mechanism is made for one-time (or limited) operation.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 15 — Read-only memory source

It is volatile, which means all data in memory is lost when the power supply is removed.

— NEETS Module 22, Module 22, ch. 2, p. 2-6 (Semiconductor storage)

Core storage is nonvolatile. This means the data is retained even if there is a power failure or breakdown, since the cores store data in the form of magnetic charges rather than electric current.

— NEETS Module 22, Module 22, ch. 2, p. 2-6 (Magnetic core storage)

Another kind of memory used inside computers is called random-access memory (RAM) or read/write memory. RAM memory is rather like a blackboard on which you can scribble down notes, read them, and rub them out when you are finished with them.

— NEETS Module 22, Module 22, ch. 2, p. 2-8 (Random-access memory)

Memory that enables us to do this without the programs and data being lost (even when the computer is powered down) is called read-only memory.

— NEETS Module 22, Module 22, ch. 2, p. 2-7 (Read-only memory)
Show alternative explanations

Some of the advantages of semiconductor storage are fast internal processing speeds, high reliability, low power consumption, high density (many circuits), and low cost. However, there is a drawback to this type of storage.

— NEETS Module 22, Module 22, ch. 2, p. 2-5/2-6 (Semiconductor storage)

Random access means that you can quickly and precisely address a specific data location within the device, and non-random simply means that you cannot.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 15 — Digital memory terms and concepts source

Storage media such as magnetized disk or tape is nonvolatile, because no source of power is needed to maintain data storage.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 15 — Digital memory terms and concepts source

Recent advances in IC chip manufacturing has led to the introduction of flash memory, which works on a capacitive storage principle like the dynamic RAM, but uses the insulated gate of a MOSFET as the capacitor itself.

— kuphaldt-linac DIGI, Vol. IV (Digital), ch. 15 — Modern nonmechanical memory source

The memory (internal storage) section of a computer is essentially an electronically operated file cabinet.

— NEETS Module 22, Module 22, ch. 2, p. 2-4 (Memory internal storage section)

Address decode — N lines choose one of 2^N words

Every memory cell sits behind a decoder: the address lines are a binary number, and exactly the one selected cell connects to the data bus (Kuphaldt's 16-cell array uses 4 address lines into a 1-of-16 decoder). The prediction rule is pure powers-of-two.

To predict the outcome:

  1. Count the address lines, N.
  2. Compute 2^N — that is the number of distinct words the chip can select; every other cell stays disconnected (high-Z) on the bus.
  3. Check against the book's example: 4 address lines → 16 cells, a "16 x 1 bit" static RAM.
  4. Reverse it: a chip with a non-power-of-two-sounding size (a "64 kbyte" part holding 65,536 bytes) still maps roundly to binary — 16 address lines, 2^16 locations.
address_lines_nwords_selectableexample
12selects between 2 cells
416Kuphaldt's 16 x 1 static RAM
8256LUT-sized ROM (see the FPGA lesson)
101,0241 KiB = 2^10, not 1,000
1665,536'64 kbyte' device — 2^16 bytes
201,048,5761 MiB = 2^20
324,294,967,2964 GiB address space

RAM vs ROM — behavior verdicts

NEETS calls RAM "read/write memory" — a blackboard you scribble on and rub out — while ROM arrives pre-written by the manufacturer and cannot be changed in normal use. Predict each behaviour from those definitions, then check the verdict column.

To predict the outcome:

  1. Read at an address: both RAM and ROM return the stored word — the read operation is identical.
  2. Write new data at an address in normal operation: RAM accepts it; ROM does not (contents come fixed from the manufacturer; PROM/EPROM variants need special programmers or erasing equipment).
  3. Cut the power: RAM (latched cells and refreshed capacitors) forgets; ROM and its programmable cousins keep their data.
  4. Assign the role that follows: RAM for working data, ROM/firmware for permanent programs such as boot code.
operationramromverdict
read word at addressworks — returns stored wordworks — returns stored wordno difference in reading
write new word at addressaccepted — cell updatedignored — contents fixedthe defining difference
power removed, then restoreddata lost (volatile)data retained (nonvolatile)volatility, not access mode, decides
reprogram in the fieldany time, any addressno; PROM once, EPROM only with UV/electrical eraserwrite convenience costs permanence
typical jobworking memory / variablesboot code, firmware, fixed tablescomplements, not substitutes

Volatile or not — classify the technologies

Two verdict axes only: does it lose data without power (volatile?), and can a user rewrite it in normal operation? Everything else (speed, density, refresh) follows from the storage mechanism — latched flip-flops need power; magnetic domains and trapped MOSFET gate charge do not.

To predict the outcome:

  1. Ask first: what physically holds the bit? Latches/capacitors hold charge → volatile; magnetization or floating-gate charge → nonvolatile.
  2. DRAM is the trap: it stores in capacitors, so it is volatile even though disks are not — refresh does not make it permanent.
  3. "RAM" names volatility, not access (Kuphaldt): judge each row by the mechanism, not the marketing name.
  4. Check verdicts against the class column before trusting speed or size assumptions.
technologyholds_bit_withvolatileuser_writabletypical_role
SRAM (static RAM)flip-flop latch (bistable multivibrator)yesyes, any timecache, small fast arrays
DRAM (dynamic RAM)tiny capacitor + MOSFET, periodically refreshedyesyes, any timemain memory
ROMfixed pattern written at manufacturenonofirmware, boot code
PROMblown (or intact) fusesnoonce, with a programmerone-time custom firmware
EPROM / EEPROMcharge on insulated MOSFET gatenoyes, after UV or electrical erasereworkable firmware, config storage
Flashsame floating-gate charge, block-erasablenoyes, in blocksSSDs, phone storage, MCU program memory
Magnetic disk / tapemagnetized domains on the mediumnoyesbulk / backup storage
Ferrite core (historical)bistable magnetization of a ferrite ringnoyesmain memory 1960s–70s, read is destructive

The book's 16 x 1 static RAM — one bus, sixteen latches

Kuphaldt builds a 16-bit static RAM from sixteen D latches, each with a tristate buffer pair on a shared 1-bit bus, all addressed by a 4-line decoder. Predict, for each address, which cell talks on the bus and what the other fifteen are doing.

To predict the outcome:

  1. Read the 4 address bits as a binary number 0–15.
  2. The decoder raises exactly that cell's address-enable; every other cell's buffers go high-Z, disconnecting it from the bus.
  3. The read/write line then steers the selected cell: read drives the bus from Q, write drives D from the bus.
  4. Verify the tally: 16 addresses x 1 data bit = "16 x 1 bit" — the notation NEETS-style datasheets still use.
address_a3_a2_a1_a0cell_enabledothersbus_sees
0000cell 015 cells high-Zcell 0's stored bit
0010cell 215 cells high-Zcell 2's stored bit
0111cell 715 cells high-Zcell 7's stored bit
1000cell 815 cells high-Zcell 8's stored bit
1111cell 1515 cells high-Zcell 15's stored bit

Candidate projects — awaiting review

  • Hand-addressed RAM: wire a 32K x 8 SRAM (AS6C62256 or a 74LS189 for the 16x4 nibble experience) to DIP-switch address lines and pushbutton write enable; store and read back patterns with LEDs — powers-of-two addressing you can feel with your fingers. (https://www.reddit.com/r/beneater/comments/ad2uko/upgrading_the_ram_module_to_256_bytes/, community)
  • Build the book's memory in miniature: sixteen D-latches (two CD4042 or 74LS75s) plus tristate buffers (74LS125s) and a 74LS154 1-of-16 decoder on a 1-bit bus — reproduce Kuphaldt's 16 x 1 static RAM and demonstrate high-Z isolation with a voltmeter. (https://www.ibiblio.org/kuphaldt/electricCircuits/DIGI/DIGI_15.html (Modern nonmechanical memory), book)
  • Volatility lab: run the same demo program from SRAM and from a 28C256 EEPROM on a breadboard computer; kill the power, restart, and show RAM lost its contents while ROM boots unchanged — then swap the two roles and explain why. (https://www.reddit.com/r/beneater/comments/16cexrs/which_of_these_sram_modules_would_work_6502/, community)
  • EEPROM write-cycle study: program a 28C256 byte-by-byte with an Arduino, then dump and verify contents; measure how long a page write takes and discuss why flash is written in blocks, not bytes. (https://www.reddit.com/r/beneater/comments/1bpjnwr/memory_module_working_finally/, community)