Memory is a way to store and load stateโsimilar to registers, but on a larger scale. The two common memory technologies are:
- Static RAM (SRAM): 6 transistors per bit, optimized for speed.
- Dynamic RAM (DRAM): 1 transistor and 1 capacitor per bit, optimized for density.
Our ๐ง CPU depends on main memory (DRAM) to run instructions; thus, itโs only as fast as memory. However, modern memory latency is much more than execution latency, creating a bottleneck. The solution to this is a hierarchy of ๐ต Hardware Caches (SRAM).
Note that memory is volatile, meaning it is lost when it loses power. Forms of non-volatile storage include magnetic disk and flash.