A memory is a huge grid of cells, each storing one bit. The cell's design decides most of the memory's character:
- SRAM: a latch of two cross-coupled inverters plus two access transistors (6 transistors). Fast, needs no refresh, but large.
- DRAM: one transistor and one capacitor. Tiny and cheap, but the charge leaks, so it needs refresh.
- ROM: a connection or no connection to a data line. Fixed at manufacture or programming.
- Flash and EEPROM: a transistor with a floating gate that traps charge. Non-volatile and rewritable.
Every cell connects to a word line (which row is selected) and a bit line (the data for its column). When its word line is active, the cell is connected to its bit line so it can be read or written. Otherwise it's isolated and just holds its bit.
Cell size is why technologies differ in memory density: a 6-transistor SRAM cell takes several times the area of a DRAM cell.