RAM, ROM and memory types
The two main memories
- A computer's main memory comes in two flavours: RAM and ROM.
- Within RAM there are two technologies; ROM has several programmable variants.
- The key idea is volatile (loses data without power) vs non-volatile.
RAM vs ROM
- RAM (random access memory) — volatile: loses its contents without power. Holds the OS, running programs and their data; read and written constantly.
- ROM (read-only memory) — non-volatile: keeps data without power. Usually written once; holds the firmware needed at start-up (the BIOS / boot loader).
- So ROM starts the system; RAM then holds the active work.
Which statement is true?
RAM loses its contents without power (volatile); ROM keeps them (non-volatile).
ROM typically holds:
ROM is non-volatile and written once, so it stores the start-up firmware. Running programs live in RAM.
SRAM vs DRAM
- SRAM stores each bit in a flip-flop of several transistors. Fast, but expensive and not dense → used for CPU cache.
- DRAM stores each bit as charge on a tiny capacitor. Cheaper and denser but slower, and must be refreshed thousands of times a second → used for main memory.
SRAM is fast but expensive, so it is mainly used for:
SRAM (flip-flops) is fast but not dense, ideal for small fast cache. DRAM is used for large main memory.
DRAM must be refreshed (rewritten) thousands of times a second to keep its data.
DRAM stores each bit as charge on a capacitor, which leaks away — so it is constantly refreshed. SRAM does not need this.
PROM, EPROM and EEPROM
- PROM — written once (fuses burned by a programmer); cannot be changed.
- EPROM — erased by strong UV light, then rewritten (the whole chip at once).
- EEPROM — erased and rewritten electrically, a byte at a time, in circuit. Flash memory is a derivative optimised for fast block erase.
EEPROM differs from EPROM because it can be:
EEPROM is erased electrically a byte at a time in place; EPROM needs UV to erase the whole chip; PROM is write-once.
You've got it
- RAM = volatile (running programs); ROM = non-volatile (start-up firmware)
- SRAM (flip-flops, fast) → cache; DRAM (capacitor, needs refresh) → main memory
- PROM write-once; EPROM UV-erased; EEPROM electrically erased a byte at a time (flash = block erase)