Apex › Hardware
The CPU cache — sets, ways & the address split
The small fast SRAM that hides main memory's ~100 ns latency behind ~1 ns hits, by exploiting locality. A physical address splits into tag / set-index / byte-offset; the index picks a set, and the tag is compared against every way in it — a hit is fast, a miss fetches the 64-byte line and evicts the least-recently-used way. Change the associativity and run access patterns to watch conflict misses appear on a direct-mapped cache and vanish on a set-associative one.
More in Hardware
- Transistors → logic gates
- Binary adder (gates→math)
- Flip-flop (how bits are stored)
- ALU (the compute core)
- How hardware multiplies fast (Wallace tree)
- Address decoding & buses
- How RAM works (DRAM)
- Memory, up close (guided tour)
- Polling · interrupts · DMA
- How a keystroke reaches the screen
- How an SSD works (flash/FTL)
- How flash stores a bit (floating gate)
- GPU / SIMT execution
- How a TPU multiplies matrices (systolic array)