Inside a chip, a bit is a voltage held on a tiny wire by a silicon switch called a transistor.
A transistor is a tap: a small voltage on one leg controls current between the other two.
A few transistors make a gate, a circuit applying one logical rule. Millions of gates make an adder or a memory cell.
Voltages take time to settle, because every wire has capacitance, the tendency to store charge and resist sudden change.
So the machine has a clock, a square wave ticking billions of times a second. On each tick, settled results are captured.
The honest version: a big 2026 chip is not one clock. It has many clock domains at different rates, and some blocks are deliberately clockless. One global heartbeat is a teaching simplification.
Mainstream digital logic is CMOS, complementary metal-oxide-semiconductor, using paired n-channel and p-channel field-effect transistors.
A logic level is a voltage band, not a point. Above VIH is 1, below VIL is 0, and the gap between them is forbidden in steady state.
Rail
Typical voltage
Where it appears
CPU core, 2026
0.6 to 1.2 V
logic on the die
DDR5 VDD
1.1 V
main memory
LVCMOS 3.3 V, VIH
2.0 V minimum
input read as 1
LVCMOS 3.3 V, VIL
0.8 V maximum
input read as 0
Claude Shannon’s 1937 master’s thesis at MIT showed that relay switching circuits implement Boolean algebra. That is the formal bridge from wires to logic.
Alan Turing’s 1936 paper “On Computable Numbers” defined what a general computing machine can compute, before any such machine existed.
Observation tools: lscpu and dmidecode report clocks and memory type; turbostat and powermetrics report frequency and power live.
Think of a kitchen. Shopping bags coming through the door are input.
The countertop is memory: small, close to hand, cleared at the end of the night.
The fridge and cupboard are storage: bigger, slower to reach, still full tomorrow.
The cook is processing, the only part that changes anything. The plate carried to the table is output.
Where this comparison breaks: a cook holds an idea in his head while walking to the fridge. A processor cannot. It has a few tiny slots called registers, and everything else must come back through memory.
ENIAC was built at the Moore School of Electrical Engineering, University of Pennsylvania, by J. Presper Eckert and John Mauchly. It first ran productively on 10 December 1945 and was announced publicly on 14 February 1946.
ENIAC used about 18,000 vacuum tubes, weighed more than 30 short tons, drew about 150 kW, and did roughly 5,000 additions per second. It was programmed by plugboard wiring, which could take days.
The Apple Watch Series 10, announced September 2024, uses the S10 SiP with a 64-bit dual-core processor, 64 GB of storage, and a 416 by 496 pixel display in the 46 mm size.
Observation tools: lsblk and diskutil list show storage; free -h and vm_stat show memory; lspci and lsusb show what sits on the buses.
Consider one byte with the pattern 01001000. In base 16 that is 48. In decimal it is 72.
byte 01001000 (hex 48, decimal 72)
read as a number -> 72
read as ASCII text -> the letter H
read as x86 machine -> part of a REX prefix
read as a pixel value -> a mid-grey level
read as an audio byte -> one sample, fairly loud
The bits never change. Only the interpretation changes.
The program counter is the register holding “where I am reading instructions from”.
If it points at that spot, the processor will try to execute those bytes as an instruction, and usually crash within microseconds.
Nothing in the memory chip distinguishes the two cases. The only difference is which register pointed at the address.
The processor keeps a program counter holding the address of the next instruction.
Each cycle it reads the bits there, works out what they mean, does it, and advances the counter. That loop is fetch, decode, execute.
Because instructions are ordinary bytes, an attacker who can write memory and redirect the counter runs code of their choosing.
So operating systems mark memory pages writable or executable and try never to allow both at once.
The honest version: “never both at once” is the goal, not the reality. Just-in-time compilers must briefly have both, and the whole field of exploit mitigation lives in that gap.
The canonical statement is the “First Draft of a Report on the EDVAC”, circulated 30 June 1945 under John von Neumann’s name alone.
It drew on work by Eckert and Mauchly, and credit for it is still disputed by historians.
The structure it describes, one memory holding both instructions and data reached over one path, is the von Neumann architecture.
Machine
First stored program
People
ENIAC, converted
April 1948
Clippinger, von Neumann
Manchester Baby
21 June 1948
Kilburn, Williams
EDSAC, Cambridge
6 May 1949
Maurice Wilkes
EDVAC
1951 in service
Eckert, Mauchly
The hardware defence against executing data is the no-execute page bit: AMD shipped NX from 2003, Intel calls it XD, Arm calls it XN. The operating system policy built on it is W xor X.
Observation tools: objdump -d disassembles bytes as instructions; xxd shows the same bytes as hex and text together; /proc/<pid>/maps shows which regions are executable.
AI services <- text in, text out
cloud <- machines by the hour
networks <- messages to elsewhere
programs <- what you actually use
operating system <- sharing, files, safety
machine code <- what the CPU obeys
CPU <- fetch, decode, execute
logic gates <- one rule per circuit
transistors <- one switch each
electricity <- charge that moves
silicon / rock <- purified sand
Now the honest part: what each layer hides, and what leaks through anyway.
Layer
Hides
Leaks anyway
Transistors
atoms, physics
heat, wear, errors
Gates
voltages, timing
propagation delay
CPU
gate wiring
cache misses, branches
Machine code
circuits
which CPU family is needed
Operating system
hardware detail
file locks, page faults
Programs
the OS
memory limits, crashes
Networks
distance
latency, packet loss
Cloud
the building
region choice, outages
AI services
the model
token limits, wrong answers
When a web page in India loads slowly, the network layer is leaking the speed of light through five layers of abstraction into a person’s experience.
The processor-software contract is the instruction set architecture, ISA: x86-64 from Intel and AMD, Arm A-profile at Armv9, and RISC-V, an open specification maintained by RISC-V International since 2015.
Below the ISA sits microarchitecture: pipelines, caches, branch predictors, out-of-order execution. It is invisible in the contract and visible on the stopwatch.
Joel Spolsky named the general phenomenon in his 2002 essay “The Law of Leaky Abstractions”: all non-trivial abstractions, to some degree, are leaky.
The most expensive proof arrived in January 2018 with Spectre and Meltdown, published by teams including Google Project Zero and Graz University of Technology.
Speculative execution, purely a microarchitectural optimization, leaked memory across the security boundary the ISA had promised.
To keep the three kinds of claim apart: x86-64 instruction encoding and POSIX system call names are standards; the layer diagram above is a convention; the L3 cache size on one chip is an implementation detail.
Observation tools: perf stat counts cache misses and branch mispredictions; strace and dtruss log system calls; mtr shows where network latency accumulates.
Think of a relay race with thirty runners, each carrying a baton a short distance.
Runner one carries “a key moved”. Runner ten carries “key number 4 went down”. Runner twenty carries “the character A”. Runner thirty carries “these pixels are white”.
Where this comparison breaks: several runners are actually queued behind other work.
And some handovers are not a pass at all. They are a note left in a shared box that the next runner checks periodically.
That periodic checking, called polling, is where a surprising amount of the delay comes from.
Keyboards speak USB HID, Human Interface Device, defined in the USB HID class specification version 1.11 from 2001. A boot-protocol keyboard report is 8 bytes: modifier byte, reserved byte, six key codes.
Scan code, key code, keysym and character are four distinct things, and confusing them is a classic bug: a hardware position, a kernel-normalized position, a layout-resolved symbol, and a Unicode value.
Stage
Typical time
Debounce in keyboard
1 to 5 ms
USB poll wait
1 to 8 ms
Kernel and driver
under 100 us
App and compositor
1 to 10 ms
Wait for vsync
8 to 17 ms
Panel response
1 to 20 ms
Observation tools: evtest and libinput debug-events show raw input events; xev shows keysyms; showkey -s prints scan codes.
Two limits build this ladder. The first is distance: signals cannot outrun light.
In copper or fibre they travel slower still, about two thirds of light speed.
In one nanosecond light covers about 30 centimetres in vacuum and about 20 centimetres in glass fibre.
The second limit is mechanism. A cache is a small grid of transistors that answers immediately.
Main memory is a huge grid of tiny capacitors that must be selected, sensed, amplified and refreshed, which costs tens of nanoseconds however much you spend.
A hard disk must move an arm and wait for a platter to spin, which is a mechanical event.
The honest version: every number in that table is an average hiding a wide spread. An SSD read under heavy write load can be ten times its idle figure.
Treat latency as a distribution with a long tail, never as a single constant.
Quoting a latency ladder is a convention, not a specification. Peter Norvig published an early version in his 2001 essay “Teach Yourself Programming in Ten Years”.
Jeff Dean’s version, circulated in Google talks from about 2009, made the practice standard.
Cache latencies are specified in cycles, not nanoseconds, because they scale with clock: L1 data 4 to 5 cycles, L2 12 to 20 cycles, L3 30 to 60 cycles.
L3 varies most, since it depends on core count and on-die topology. A large server part with a mesh interconnect can exceed 40 nanoseconds; a small desktop part can be near 10.
NVMe SSDs are quoted as 4 KiB random read latency: consumer TLC drives land near 50 to 100 microseconds, while Intel Optane, discontinued in 2022, reached about 10.
Round-trip time across an ocean has a hard floor set by fibre. Mumbai to northern Virginia is roughly 12,900 km great-circle, so about 25,800 km return.
At 200,000 km/s that is about 129 milliseconds before a single router touches the packet.
Observation tools: perf stat -e cache-misses, lmbench with its lat_mem_rd test, fio with --iodepth=1 for true storage latency, and ping or mtr for network round trip.
1 TB drive as sold:
1,000,000,000,000 bytes
/ 1024 -> 976,562,500 KiB
/ 1024 -> 953,674 MiB
/ 1024 -> 931.32 GiB
Windows prints "931 GB". Nothing is missing.
100 Mbps line:
100,000,000 bits per second
/ 8 = 12,500,000 bytes per second
= 12.5 MB/s on paper
x 0.949 Ethernet + IP + TCP overhead
= about 11.9 MB/s of real file
Those two sums explain most unit confusion. A 100 Mbps line downloading a 1.2 GB file takes about 100 seconds, not 12 and not 1,200.
Clock speed works the same way. A 3 GHz processor has a cycle time of 1 divided by 3,000,000,000, which is 0.333 nanoseconds.
Memory chips are addressed with binary numbers, so 30 address lines give exactly 2 to the power 30 locations, which is 1,073,741,824.
Not every byte on a network carries your file. Each packet carries headers and the link adds framing, so useful throughput is always below line rate.
The honest version: a byte has not always been eight bits. Early machines used 6, 7 and 9-bit bytes, which is why standards documents say octet when they mean exactly eight. Eight became universal by convention through the 1970s and only later entered standards.
Decimal prefixes are SI, maintained by the BIPM: k is 10^3, M is 10^6, G is 10^9, T is 10^12.
Binary prefixes are IEC: Ki is 2^10, Mi is 2^20, Gi is 2^30, Ti is 2^40. They were published as IEC 60027-2 Amendment 2 in January 1999 and adopted as IEEE 1541-2002, which the IEEE Standards Association raised to a full-use standard on 19 March 2005.
Unit
Bytes
Difference
1 kB / 1 KiB
1,000 / 1,024
2.4 percent
1 MB / 1 MiB
1e6 / 1,048,576
4.9 percent
1 GB / 1 GiB
1e9 / 1.0737e9
7.4 percent
1 TB / 1 TiB
1e12 / 1.0995e12
10.0 percent
Practice differs by product, and this is an implementation detail with a date: macOS has reported decimal GB since Mac OS X 10.6 Snow Leopard in 2009, while Windows File Explorer still shows binary values labelled GB as of 2026. On Linux ls -h is binary and ls --si is decimal.
Ethernet efficiency at a full 1500-byte MTU with IPv4 and TCP: 1460 bytes of payload inside 1538 bytes on the wire, counting the 14-byte header, 4-byte FCS, 8-byte preamble and 12-byte interframe gap. That is 94.9 percent, before any retransmission.
Even the processor’s own instruction list is not pure hardware on every design.
On x86, complicated instructions are broken into simpler internal steps by a small program stored on the chip. That program is microcode.
Microcode can be updated, which is how makers fix processor bugs without recalling chips.
Going the other way, a field-programmable gate array is a chip whose wiring you rewrite: you write something like a program and get real circuits.
The honest version: “hardware is fixed, software is changeable” is comfortable and wrong. The real question is how fast a thing can change and who is allowed to change it.
UEFI replaced the legacy PC BIOS, which dates from the IBM PC of 1981. The UEFI specification is maintained by the UEFI Forum and reached version 2.10 in 2022.
Microcode updates load at boot from firmware or from the operating system. On Linux they arrive as intel-ucode or amd-ucode packages and appear in dmesg.
FPGA designs are written in Verilog or VHDL and compiled to a bitstream. An ASIC is the same design frozen into silicon, cheaper per unit and impossible to change.
Observation tools: fwupdmgr get-devices lists updatable firmware on Linux; system_profiler SPHardwareDataType on macOS shows boot ROM version; nvme id-ctrl reports SSD firmware revision.
One more thing about Parts F and G, the networking part and the building-and-shipping part.
They do not use invented examples. They use one real fault and one real work session, from the reader this book was written for.
A real home broadband connection in India, on macOS, that reached some things and silently could not reach others.
A real traceroute crossing a home router, a provider’s private core, then a large company’s backbone through Delhi, Mumbai and Pune, and then answering nothing.
A real set of git problems in the same session: pushes that failed halfway, a token missing a permission, a rebase that changed a commit’s identity.
In particular you will learn to separate what an observation proves from what it merely suggests. That distinction is the whole of diagnosis.
Where this book touches artificial intelligence, in Part H, it separates three kinds of statement, and you should demand the same separation elsewhere.
Established fact: the transformer architecture was published in the 2017 paper “Attention Is All You Need” by Vaswani and colleagues at Google. That is checkable.
Active research: how much of a model’s ability comes from scale versus from data quality is still argued, with published results on both sides.
Marketing claim: any statement that a model reasons, understands, or is near human level is a claim about words with no agreed test behind it. A benchmark score is evidence about the benchmark first and about the world second.
Dates are attached to volatile facts deliberately. Anything about a current product, model or price should be re-checked; this chapter was written in 2026.
Wrong: a computer understands what it is doing. Right: it combines bits by fixed rules, and all meaning is assigned by people outside the machine.
Wrong: memory and storage are two words for one thing. Right: memory is fast and forgets without power; storage is slow and remembers.
Wrong: more gigahertz always means a faster computer. Right: work done is instructions per cycle times frequency, and a stalled processor retires almost nothing at any clock speed.
Wrong: a 1 TB drive showing 931 GB is missing space. Right: a trillion divided by 1024 three times is 931.32, and the operating system is labelling binary units with a decimal name.
Wrong: a 100 Mbps line downloads at 100 MB/s. Right: divide by 8 for bytes and subtract protocol overhead, giving about 11.9 MB/s.
Wrong: hardware is fixed and software is changeable. Right: firmware and microcode are updatable and reconfigurable chips exist, so the real question is how fast a thing can change and who may change it.
Wrong: the delay you feel when typing is the computer thinking. Right: most of it is waiting for a polling interval and a screen refresh, not computation.
Wrong: a slow reply from a distant server means bad engineering. Right: a round trip from India to the United States has a physical floor near 130 milliseconds, because light in fibre is not instantaneous.