Computers from the inside out

Taking a computer apart layer by layer: bits and addition in logic gates, how a CPU runs instructions and caches, memory, the operating system with CPU and GPU, then networking through 5 layers, with experiments you can run.

  1. Bits, bytes and 1 + 1: from NAND gates to the CPU clock

    What actually happens inside the chip when a computer does 1 + 1? From bits, negative numbers and floats, to NAND gates, an adder built in Python, the CPU clock measured with a chain of adds, and the add machine instruction in 4 bytes.

  2. How a CPU runs instructions: pipelines, branch prediction and caches

    Why the same loop runs 11 times faster once the array is sorted, why reading a number from RAM costs over 300 cycles, and why walking a matrix by columns is 10 times slower than by rows. Pipelines, branch prediction, cache levels, measured in C and Python.

  3. Networking through 5 layers: what happens when you open viet.sarl

    Following one page load from start to finish: DNS, the TCP handshake, TLS 1.3, HTTP/2, IP routing, Ethernet and Wi-Fi frames, down to physical signals. The 5-layer model mapped to the 7 OSI layers, measured with dig, ping, curl and Python on this very website.