Apex › Hardware
The ALU — how a CPU computes
The arithmetic logic unit is the adder plus a few logic gates, with a multiplexer that an opcode uses to pick which result to keep. It computes add, subtract, and, or, xor, shifts, and compare all at once and selects one, raising the Z/N/C/V flags that turn a comparison into a branch. Pick an operation and two operands and watch the result and flags.
More in Hardware
- Transistors → logic gates
- Binary adder (gates→math)
- Flip-flop (how bits are stored)
- How hardware multiplies fast (Wallace tree)
- Address decoding & buses
- CPU cache (sets & ways)
- 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)