KB KEDBYTE TECHNOLOGIES PRIVATE LIMITED
CHAPTER
2

Electricity - The Thing That Does All The Work

Part A · The Physical World|12,537 words|about 55 min read|Volume 1

2.0 What this chapter gives you#

  1. You will be able to say what electricity is, in terms of atoms and the particles inside them.
  2. You will be able to explain voltage, current and resistance, and do sums with them.
  3. You will be able to work out how much heat a chip makes, and say where that heat comes from.
  4. You will be able to trace energy from a wall socket to one transistor inside a processor.
  5. You will be able to say what a resistor, capacitor, inductor and diode do, and read real part values.
  6. You will be able to explain why computers went digital, using noise margin, not a slogan.
  7. You will be able to say what “3.5 GHz” physically means, and why light speed limits chip size.
  8. You will be able to explain how one bit is held as charge, and why it can be lost.

2.1 What electricity really is#

PLAIN2.1.1 in simple words#

  1. Everything is made of atoms. An atom has a heavy centre, the nucleus, with light electrons around it.
  2. The nucleus holds protons and neutrons. Each particle has a property called charge, a label for how it pushes and pulls on others.
  3. A proton is positive, an electron is negative, and a neutron has none, so it is called neutral.
  4. Same charges push apart, opposite charges pull together. A normal atom has as many electrons as protons, so it seems to have no charge.
  5. In a metal such as copper, the outermost electron of each atom is held weakly and can wander between atoms.
  6. Those wandering electrons are electricity. A battery pushes them one way, pulling electrons in at one terminal and shoving them out at the other.

PLAIN2.1.2 a picture in your head#

  1. Picture a pipe, already completely full of water, joined end to end in a ring, with a pump in it.
  2. Because the pipe is already full, water moves at the far end almost the instant you start the pump.
  3. The pump is the battery, its pressure is the voltage, the moving water is the current, and a narrow section is a resistor.
  4. Put a water wheel in the ring and the flow turns it. That is a load. Not one drop is destroyed.

Where this comparison breaks

  1. In a real wire the electrons crawl at about a tenth of a millimetre per second, far slower than water.
  2. Water carries energy inside the pipe. In a circuit most energy travels in the field around the wire, not in the copper.
  3. The honest version: the pipe picture models pressure and flow only. Use it for sums, never to decide what is physically true.

PLAIN2.1.3 a worked example#

  1. Take a copper wire one square millimetre in cross section carrying one ampere. Copper has about 8.5 x 10^28 free electrons per cubic metre.
Drift velocity
v = I / (n * A * e)
  = 1 / (8.5e28 * 1e-6 * 1.602e-19)
  = 0.0000735 m/s = 0.0735 mm per second
  = about 26 centimetres per hour
  1. So one electron takes over an hour to crawl the length of a desk lamp cable.
  2. Yet the lamp lights instantly, because the push travels through the already-full wire near the speed of light.

PLAIN2.1.4 what is really happening inside#

  1. A battery’s chemistry separates charge, leaving one terminal short of electrons and one with a surplus.
  2. That separation creates an electric field, an invisible push filling the space around the terminals.
  3. Connect a wire and the field spreads along it near light speed, so every free electron feels the push almost at once.
  4. As the electrons drift they bump into vibrating copper atoms, handing over energy that appears as heat.
  5. The electrons are not consumed; the same number leaves as enters. What is consumed is energy, delivered by the field to wherever the bumping happens.

TECHNICAL2.1.5 the engineer’s version#

  1. Charge is quantized in units of the elementary charge e, fixed exactly at 1.602176634 x 10^-19 C by the 2019 SI redefinition.
  2. The ampere is now defined from that fixed e, rather than from a force between wires as it was from 1948 to 2019.
  3. In a metal the valence and conduction bands overlap, so carriers just above the Fermi level respond to any applied field.
  4. Copper gives about one conduction electron per atom, so n is roughly 8.5 x 10^28 per cubic metre, and drift velocity is v = J / (n e).
  5. Signal propagation is a field phenomenon, travelling at c divided by the square root of the effective relative permittivity.
  6. Poynting’s theorem, published by John Henry Poynting in 1884, places the energy flux outside the conductor, not inside it.
  7. History: von Kleist and van Musschenbroek made the Leyden jar in 1745 and 1746, J. J. Thomson identified the electron in 1897, and Ernest Rutherford proposed the nuclear atom in 1911.

WORDS2.1.6 remember these#

  1. Atom — the smallest normal piece of a material — a nucleus of protons and neutrons with bound electrons.
  2. Charge — the property that makes things push or pull electrically — quantized in units of e, measured in coulombs.
  3. Electron — a tiny negative particle that moves between atoms in a metal — the mobile charge carrier in a conductor.
  4. Drift velocity — the slow crawl of the electron crowd — v = J / (n e), typically under a millimetre per second.
  5. Electric field — the invisible push that moves charges — force per unit charge, in volts per metre.

2.2 Voltage, current and resistance#

PLAIN2.2.1 in simple words#

  1. Voltage is how hard the electricity is pushed, measured in volts. It is always a difference between two points.
  2. Current is how much charge flows past a point each second, measured in amperes.
  3. Resistance is how strongly a material fights the flow, measured in ohms.
  4. One rule ties all three together: voltage equals current times resistance, written V = I R. Know any two and you can find the third.
  5. Power is how fast energy is delivered. It is voltage times current, P = V I, measured in watts.
  6. Nearly all the power that goes into a chip comes out as heat, which is why chips need fans and metal blocks.

PLAIN2.2.2 a picture in your head#

  1. Back to the water ring. Pressure is voltage, litres per second is current, a narrow section is resistance.
  2. More pressure through the same pipe gives more flow, so more voltage across the same resistance gives more current.
  3. Narrow the pipe further and less flows. More resistance means less current.
  4. The pump’s effort depends on both. High pressure with no flow does no work, and neither does flow with no pressure.

Where this comparison breaks

  1. Water resistance changes messily with speed. A good resistor keeps almost the same ohms at any current.
  2. The honest version: Ohm’s law is not a law of nature like gravity. It describes materials that happen to behave in a straight line. Diodes, lamps and transistors do not.

PLAIN2.2.3 a worked example#

Sum 1. A 5 V supply across a 220 ohm resistor.
  I = V / R = 5 / 220 = 0.0227 A = 22.7 mA

Sum 2. A wire of 0.05 ohms carrying 2 A.
  V = I * R = 2 * 0.05 = 0.1 V lost along it

Sum 3. A part dropping 1.8 V at 15 mA.
  R = V / I = 1.8 / 0.015 = 120 ohms

Power. A core at 1.0 V burning 125 W.
  I = P / V = 125 / 1.0 = 125 A
  1. That last figure is real. A modern processor pulls over a hundred amps at about one volt.
  2. One volt is a gentle push, but a hundred amps is the current of a small welding machine.

PLAIN2.2.4 what is really happening inside#

  1. Voltage is energy per unit charge. One volt means one joule given to every coulomb that passes.
  2. Current is a counting rate. One ampere is about 6.24 million million million electrons per second.
  3. Resistance comes from electrons colliding with warm, vibrating atoms, and each collision turns motion into more vibration, which is heat.
  4. So heat is not a side effect bolted on. It is energy the electrons lose when they cannot travel freely.
  5. In a chip most heat is not wire resistance. It is the charging and discharging of tiny capacitances inside every transistor.
  6. Heat is the enemy because hot silicon leaks more current, which makes more heat, which makes more leaking. That loop can run away.

TECHNICAL2.2.5 the engineer’s version#

  1. Ohm’s law comes from Georg Simon Ohm, published in 1827 in Die galvanische Kette, mathematisch bearbeitet.
  2. Power has three equivalent forms: P = V I, P = I squared times R, and P = V squared divided by R.
  3. Conductor loss is I squared R, so doubling current quadruples loss. That is why power is transmitted at high voltage and low current.
  4. Dynamic switching power in CMOS is about P = alpha C V squared f, with alpha the activity factor and C the switched capacitance.
  5. The V squared term is why lowering supply voltage is the strongest power lever, and why core voltages fell from 5 V to under 1 V.
  6. Static power is leakage, from subthreshold conduction and gate-oxide tunnelling, and it rises sharply with temperature.
  7. Thermal Design Power is a cooling specification, not a measured maximum. Real peaks routinely exceed it.
Processor Base power Max turbo power
Intel Core Ultra 9 285K 125 W 250 W
AMD Ryzen 9 9950X 170 W TDP 230 W PPT
Thin laptop chip 15 to 28 W 45 to 65 W
Phone application chip 2 to 5 W 8 to 12 W
  1. These are published figures as of 2025. Tom’s Hardware measured a 285K peak near 325 W under Prime95 with AVX, above its 250 W rating.
  2. Observe power live with sensors and turbostat on Linux, powermetrics on macOS, or the RAPL counters under /sys/class/powercap.

WORDS2.2.6 remember these#

  1. Volt — how hard electricity is pushed — joules per coulomb of potential difference.
  2. Ampere — how much charge flows per second — one coulomb per second, defined from fixed e since 2019.
  3. Ohm — how much a part fights the flow — one volt of drop per ampere of current.
  4. Watt — how fast energy is used — one joule per second, equal to V times I.
  5. TDP — the heat a cooler must remove — Thermal Design Power, a cooling target, not a measured peak.
  6. Leakage — current that escapes when nothing is switching — subthreshold and tunnelling current, strongly temperature dependent.

2.3 A circuit: the loop that makes it work#

PLAIN2.3.1 in simple words#

  1. A circuit needs four things: a source, a path out, something that does work, and a path back.
  2. The source is a battery, adapter or generator, the paths are conductors, and the thing that does work is the load.
  3. It must be a complete loop, because charge cannot pile up at the end of a wire and stop.
  4. A short circuit is a return path that skips the load. With nothing to limit it, current becomes enormous and things melt.
  5. Ground is the point we agree to call zero volts, and every other voltage is measured against it.
  6. In DC the push is steady and one way. In AC it swaps direction many times a second.

PLAIN2.3.2 a picture in your head#

  1. Think of a one-way ring road with a roundabout where a machine pushes cars along.
  2. Cars leave, drive through a town delivering goods, and come back to the roundabout.
  3. Close the road beyond the town and no car can complete the trip, so none leave at all. That is an open circuit.
  4. Build a slip road that skips the town and every car takes it, delivering nothing. That is a short circuit.

Where this comparison breaks

  1. Cars choose routes. Charge does not choose; it splits between all available paths in inverse proportion to their resistance.
  2. The honest version: ground is not one thing. Circuit common, chassis ground and protective earth are three different ideas sharing one word and one symbol.

PLAIN2.3.3 a worked example#

  1. Indian mains supplies about 230 V AC at 50 Hz, so the push reverses direction 100 times a second. Here is the journey to one transistor gate.
Wall 230 V AC, 50 Hz
   |
   v  bridge of 4 diodes: all half-cycles made positive
Pulsing DC, peaks near 325 V
   |
   v  large capacitor: fills the dips between peaks
Rough DC bus, about 324 V
   |
   v  transistor chops it at 60 kHz to 150 kHz
High-frequency square wave
   |
   v  small transformer: steps down and isolates
Low-voltage AC
   |
   v  fast diodes, capacitors, feedback control
Clean 20 V DC out of the brick
   |
   v  buck converters on the motherboard
12 V rail -> 5 V, 3.3 V, 1.8 V, about 1.0 V core
   |
   v
One transistor gate inside the CPU
  1. A transformer shrinks as frequency rises. At 50 Hz it is a heavy iron block; at 100 kHz it fits on a fingertip.
  2. That is why modern chargers are light. Old adapters worked directly at 50 Hz and were heavy.

PLAIN2.3.4 what is really happening inside#

  1. Four diodes act as one-way gates, so both halves of the AC wave come out the same way up.
  2. The big capacitor stores charge on the peaks and gives it back in the gaps, smoothing the bumps.
  3. A transistor switches that high DC on and off fast, making a square wave the transformer can use.
  4. The transformer has two coils. Changing current in the first makes a changing field, which makes a voltage in the second.
  5. The turns ratio sets the voltage ratio, and the coils never touch electrically. That isolation keeps mains voltage away from your hands.
  6. A feedback circuit adjusts how long the switch stays on, holding the output steady as the load changes.

TECHNICAL2.3.5 the engineer’s version#

  1. Kirchhoff’s current law, from Gustav Kirchhoff in 1845, says currents into any node sum to zero. That is why the loop is mandatory.
  2. Indian mains is nominally 230 V RMS at 50 Hz per IS 12360 and IEC 60038; North America uses 120 V RMS at 60 Hz.
  3. RMS is the equivalent heating value. Peak is RMS times root two, so 230 V RMS peaks near 325 V, and a bridge leaves a bus near 324 V.
  4. The ATX specification defines desktop rails. Legacy ATX 2.x supplies these, plus -12 V for legacy serial ports.
Rail Nominal Tolerance Typical use
+12 V 12.0 V plus or minus 5% CPU VRM, GPU, fans
+5 V 5.0 V plus or minus 5% SATA, USB, logic
+3.3 V 3.3 V plus or minus 5% DIMM support, M.2
+5 VSB 5.0 V plus or minus 5% standby, wake on LAN
  1. Intel’s ATX12VO, published around 2019 and revised to 2.0 in February 2022, keeps only 12 V and 12 V standby. The board then makes 5 V and 3.3 V locally.
  2. ATX 3.0, February 2022, introduced the 12VHPWR connector rated to 600 W. ATX 3.1, 2024, replaced it with the 12V-2x6 variant after connector failures.
USB level Voltage Current Power
USB 2.0 high power 5 V 500 mA 2.5 W
USB 3.x 5 V 900 mA 4.5 W
USB Type-C 3 A 5 V 3 A 15 W
USB PD SPR max 20 V 5 A 100 W
USB PD 3.1 EPR max 48 V 5 A 240 W
  1. Power Delivery fixed voltages in the Standard Power Range are 5 V, 9 V, 15 V and 20 V.
  2. PD 3.1, announced in May 2021, added 28 V, 36 V and 48 V, giving 140 W, 180 W and 240 W.
  3. PD 3.0 also defines Programmable Power Supply, a continuously adjustable output from about 3.3 V to 21 V in 20 mV steps.

WORDS2.3.6 remember these#

  1. Circuit — a complete loop for charge to travel round — a closed network obeying Kirchhoff’s current and voltage laws.
  2. Load — the part that does the useful work — the element converting electrical energy into heat, light, motion or computation.
  3. Short circuit — an unwanted low-resistance path skipping the load — a fault path of near-zero resistance giving very high current.
  4. Ground — the point everyone agrees to call zero volts — the reference node, distinct from chassis and protective earth.
  5. AC and DC — a push that swaps direction, against a steady one-way push — alternating current at 50 Hz in India, against direct current.
  6. RMS — the equivalent steady value of a wobbling one — root mean square; peak is RMS times root two for a sine.
  7. Buck converter — a circuit that steps voltage down efficiently — a switching regulator using an inductor and a switch.

2.4 Conductors, insulators and semiconductors#

PLAIN2.4.1 in simple words#

  1. A conductor lets electricity pass easily: copper, silver, aluminium, gold. An insulator blocks it: plastic, rubber, glass, dry air.
  2. A semiconductor sits between them. Silicon is the famous one, and on its own it barely conducts.
  3. Copper conducts because each atom releases one outer electron, and those electrons roam free through the metal.
  4. Plastic does not conduct because every electron is locked into a bond between two atoms, with nothing free to move.
  5. Silicon locks its electrons too, but weakly, so a little heat or light can free a few of them.
  6. The magic is that we can change how well silicon conducts, on purpose, by mixing in traces of other elements. That is why computers are silicon.

PLAIN2.4.2 a picture in your head#

  1. Imagine a car park. A conductor is one only half full, so any car can move at once.
  2. An insulator is packed solid, bumper to bumper, with a high wall and the next empty level far above. Nothing moves.
  3. A semiconductor is the same packed park, but the empty level is only a short ramp up, so a nudge of warmth or light lets a car reach it.
  4. A neighbour shuffles into the space it left, so the space appears to move the other way. Engineers call that moving space a hole.

Where this comparison breaks

  1. Real electrons are not objects in slots. They are quantum states shared across the whole crystal.
  2. The honest version: band gap is the true idea. The levels are energy bands and the wall height is the gap in electron-volts. The picture gets the behaviour right and the physics only roughly right.

PLAIN2.4.3 a worked example#

  1. Resistivity says how strongly a material fights current for a standard sample size. The range spans over twenty powers of ten.
Material Resistivity, ohm-metre Band gap, eV
Silver 1.59 x 10^-8 none, metal
Copper 1.68 x 10^-8 none, metal
Aluminium 2.65 x 10^-8 none, metal
Pure silicon about 2.3 x 10^3 1.12
Germanium about 0.46 0.66
Glass 10^11 to 10^15 wide
PTFE plastic above 10^23 very wide
  1. Copper conducts about 10^11 times better than pure silicon, and silicon about 10^20 times better than PTFE.
  2. Now the trick. Add one phosphorus atom per ten million silicon atoms and the resistivity falls by a factor of thousands.
  3. That is doping, and it is the step that turns sand into a switch.

PLAIN2.4.4 what is really happening inside#

  1. Silicon has four outer electrons and bonds with four neighbours, so every electron is paired and none is free.
  2. Phosphorus has five outer electrons, so four bonds form and one electron is left loosely held. That is n-type silicon.
  3. Boron has three, so one bond is incomplete, leaving a vacancy that behaves like a positive carrier. That is p-type silicon.
  4. Put n-type and p-type next to each other and the junction passes current one way and blocks the other.
  5. Stack those junctions in the right pattern and you get a transistor: a switch with no moving parts, controlled by a voltage, repeated billions of times in a chip.

TECHNICAL2.4.5 the engineer’s version#

  1. Conduction follows band structure. Metals have a partly filled conduction band; insulators and semiconductors have a filled valence band and a forbidden gap.
  2. Silicon has an indirect band gap of 1.12 eV at 300 K. Germanium is 0.66 eV, gallium arsenide 1.42 eV, gallium nitride 3.4 eV, diamond about 5.5 eV.
  3. Silicon dioxide, the gate insulator, has a gap near 9 eV, which is why it works as a barrier only a few atomic layers thick.
  4. Intrinsic carrier concentration in silicon at 300 K is about 1.0 x 10^10 per cubic centimetre, against 5 x 10^22 atoms per cubic centimetre.
  5. Doping runs from about 10^15 per cubic centimetre in lightly doped wells to above 10^20 at source and drain contacts.
  6. Copper resistivity has a temperature coefficient near 0.00393 per degree Celsius, so a trace is about 40% more resistive at 100 C than at 0 C.
  7. Semiconductors move the opposite way: resistance falls as temperature rises, because thermal energy frees more carriers.
  8. Aluminium was the standard on-chip interconnect until IBM shipped copper interconnect in 1997, cutting wire resistance by roughly 40%.

WORDS2.4.6 remember these#

  1. Conductor — a material electricity passes through easily — partly filled conduction band, high carrier mobility.
  2. Insulator — a material electricity cannot pass through — a wide forbidden band gap, typically above 4 eV.
  3. Semiconductor — a material in between, whose conducting can be controlled — a moderate band gap, roughly 0.5 to 3.5 eV.
  4. Band gap — the energy step an electron must climb to move — the forbidden range between valence and conduction bands, in eV.
  5. Doping — adding traces of another element to change conductivity — controlled introduction of donor or acceptor impurities.
  6. n-type and p-type — silicon with spare electrons, against silicon with missing ones — donor-doped and acceptor-doped material.
  7. Hole — the moving gap where an electron is missing — a quasiparticle carrying positive charge in the valence band.

2.5 The resistor#

PLAIN2.5.1 in simple words#

  1. A resistor is a small part whose only job is to fight current by a fixed, known amount.
  2. Inside is a ceramic rod coated with a thin film of carbon or metal, with a spiral groove cut into the film.
  3. A longer, thinner spiral means a longer electrical path, so more ohms. That is how the value is set.
  4. Resistors turn the energy they take into heat, so each has a power rating that must not be exceeded.
  5. Two very common uses are the pull-up and the pull-down, which stop an input wire from having no defined voltage.
  6. A wire connected to nothing is floating, and a floating input on a chip is a genuine bug, not a harmless idle state.
  7. Another everyday use is limiting the current into an LED, which would otherwise destroy itself instantly.

PLAIN2.5.2 a picture in your head#

  1. A pull-up resistor is like a weak spring holding a door closed.
  2. Anyone can push the door open easily, but if nobody touches it the spring decides where it sits.
  3. Without the spring the door drifts, banging half open in any draught. That is a floating input.
  4. The spring is deliberately weak so a real signal can override it without wasting effort.

Where this comparison breaks

  1. A doorway caps how many people pass. A resistor does not cap current at all.
  2. The honest version: a resistor develops a voltage proportional to whatever current passes through it. Force enough current through and it burns.

PLAIN2.5.3 a worked example#

  1. Light a red LED from a 5 V supply at about 15 mA. A red LED drops about 2.0 V, and that drop barely changes with current.
Voltage left for the resistor
  = 5.0 - 2.0 = 3.0 V

R = V / I = 3.0 / 0.015 = 200 ohms
Nearest standard E12 value: 220 ohms

Actual current  I = 3.0 / 220 = 13.6 mA
Heat in resistor
  P = I * I * R = 0.01364 * 0.01364 * 220
    = 0.041 W

A 0.25 W part is comfortable. Even an 0603 surface
mount part rated 0.1 W is fine.
  1. Leave the resistor out and the LED tries to pass everything the supply can give, and fails within seconds.

PLAIN2.5.4 what is really happening inside#

  1. In the resistive film, electrons collide with the disordered atoms of the alloy, turning electrical energy into heat.
  2. Because electrons lose energy along the way, the potential falls steadily from one end to the other. That fall is the voltage drop.
  3. A pull-up connects an input pin to the supply, so a small current holds the pin high when nothing else drives it.
  4. When a switch pulls the pin to ground it wins easily, because the pull-up is weak. A 10 kilohm pull-up on 3.3 V wastes only 0.33 mA.
  5. Floating is dangerous because a MOS gate is an insulator, giving an input resistance above a million million ohms, so any stray charge drags the pin anywhere.
  6. Worse, a pin resting halfway turns on both transistors of the input stage at once, drawing extra current and adding heat.

TECHNICAL2.5.5 the engineer’s version#

  1. Types include carbon film, metal film, metal oxide, thick film on alumina for surface mount, wirewound for power, and foil for precision.
  2. Values follow the IEC 60063 preferred series. E12 gives twelve values per decade at 10% spacing, E24 gives 24, and E96 gives 96 for 1% parts.
  3. The E12 sequence is 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, and decade multiples of those.
  4. Through-hole colour bands are read left to right, with the tolerance band set off by a wider gap.
Colour Digit Multiplier Tolerance
Black 0 x1 none
Brown 1 x10 1%
Red 2 x100 2%
Orange 3 x1 k none
Yellow 4 x10 k none
Green 5 x100 k 0.5%
Blue 6 x1 M 0.25%
Violet 7 x10 M 0.1%
Grey 8 x100 M 0.05%
White 9 x1 G none
Gold none x0.1 5%
Silver none x0.01 10%
  1. Worked reading: red, red, brown, gold is 2, 2, times 10, at 5 percent, giving 220 ohms plus or minus 11 ohms.
  2. Surface mount sizes and typical ratings: 0402 at 0.063 W, 0603 at 0.1 W, 0805 at 0.125 W, 1206 at 0.25 W, sized in hundredths of an inch.
  3. Common pull-up values are 10 kilohm general purpose, and 4.7 or 2.2 kilohm for I2C depending on bus capacitance and speed.
  4. The I2C specification, from Philips in 1982 and now maintained by NXP as UM10204, caps bus capacitance at 400 pF and constrains rise time per mode.
  5. Microcontroller internal pull-ups are typically 20 to 50 kilohms and are too weak for I2C. A floating CMOS input shows a slow wandering trace on a scope, not a flat line.

WORDS2.5.6 remember these#

  1. Resistor — a part that fights current by a known amount — a two-terminal component with specified ohmic value and power rating.
  2. Pull-up — a weak connection to the supply that holds a line high — a resistor from a node to VDD defining the idle logic level.
  3. Pull-down — a weak connection to ground that holds a line low — a resistor from a node to VSS defining the idle logic level.
  4. Floating — a wire connected to nothing, with undefined voltage — a high-impedance node with no DC path, open to noise coupling.
  5. E12 series — the standard twelve resistor values per decade — an IEC 60063 preferred number series at 10% spacing.
  6. Current limiting resistor — the resistor that stops an LED burning out — a series element sized as supply minus Vf, divided by target If.

2.6 The capacitor#

PLAIN2.6.1 in simple words#

  1. A capacitor is two sheets of metal held very close, with a thin insulator between them so they never touch.
  2. Apply a voltage and electrons pile onto one sheet while the same number are pulled off the other. No charge crosses the gap.
  3. The sheets simply become oppositely charged, and the capacitor now holds energy.
  4. How much charge it holds per volt is its capacitance, in farads. A farad is huge, so real parts are millionths or million-millionths.
  5. Charging is not instant. Fed through a resistor, it fills quickly at first and then more slowly, and the time depends on resistance times capacitance. That product is the time constant.
  6. One bit of your computer’s main memory is literally a capacitor holding charge, and it leaks, so it must be topped up.

PLAIN2.6.2 a picture in your head#

  1. Think of a rubber sheet stretched tightly across a pipe, sealing it completely.
  2. Water cannot get past, but pushing against one side stretches the sheet, which pushes water out of the other side.
  3. Push harder and it stretches more. That stretch is stored energy, exactly like charge on the plates.
  4. Push and release repeatedly and water sloshes back and forth. That is why a capacitor passes AC and blocks DC.

Where this comparison breaks

  1. A rubber sheet has a breaking point. A capacitor has a voltage limit too, but past it the insulator punches through and the part usually shorts.
  2. The honest version: a capacitor does not pass AC. No charge ever crosses the insulator. Current flows in one wire and out the other because the charge on each plate is changing.

PLAIN2.6.3 a worked example#

  1. Take a 10 kilohm resistor feeding a 100 nanofarad capacitor from a 3.3 V supply.
tau = R * C = 10000 * 0.0000001
    = 0.001 s = 1 millisecond
  1. The voltage climbs along a curve, reaching about 63.2% after one time constant, and never quite arriving.
Time Multiples of tau Percent charged Volts
1 ms 1 63.2% 2.09
2 ms 2 86.5% 2.85
3 ms 3 95.0% 3.14
5 ms 5 99.3% 3.28
  1. Engineers treat five time constants as fully charged, because the last 0.7% is below normal measurement noise.
  2. This exact sum sets how long a reset pin stays low at power-on, how long a button debounce lasts, and how fast an edge can rise.

PLAIN2.6.4 what is really happening inside#

  1. When a chip switches millions of transistors at once, it demands a burst of current within a few billionths of a second.
  2. The supply is centimetres away, and the copper path to it behaves like a small coil that cannot change current that fast.
  3. Without help the voltage at the chip would dip every time it worked hard, and it would misread its own signals.
  4. A decoupling capacitor sitting millimetres from the power pins supplies that burst locally, then refills from the main supply.
  5. Large ones hold plenty but respond slowly; small ones hold little but respond fast, so designers fit several values in parallel.
  6. In main memory one bit is one capacitor plus one transistor, and charge leaks away within tens of milliseconds.
  7. So the controller reads every row and writes it straight back, forever. That is refresh, and it never stops while power is on.

TECHNICAL2.6.5 the engineer’s version#

  1. Capacitance is C = Q / V in farads. For parallel plates, C equals epsilon-zero times epsilon-r times area, divided by separation.
  2. Charging through a resistor gives v(t) = V times one minus e to the power of minus t over RC, and discharging drops to 36.8% after one tau.
  3. Energy stored is one half C V squared, so a 470 microfarad bulk capacitor at 12 V holds 0.034 joules.
  4. Real capacitors have equivalent series resistance and inductance, creating a self-resonant frequency above which they behave as inductors.
  5. A typical 0402 100 nF ceramic self-resonates around 30 to 50 MHz, which is why power networks use several decades of value in parallel.
  6. Dielectric class matters. C0G or NP0 is stable and low loss; X7R is denser but loses 30% to 60% of its capacitance under DC bias near its rating.
  7. Robert Dennard invented the one-transistor, one-capacitor DRAM cell at IBM in 1966; United States patent 3,387,286 was granted in 1968.
  8. Modern DRAM storage capacitance is roughly 6 to 10 femtofarads, held in a deep trench or tall pillar to gain area without floor space.
  9. DDR4 requires every row refreshed within 64 ms, with an average interval tREFI of 7.8 microseconds at or below 85 C, halved above it.
  10. DDR5 tightens the window to 32 ms at normal temperature and 16 ms in the extended range, with on-die thermal sensing to request faster refresh.
  11. Refresh costs real bandwidth; on large DDR4 modules the overhead can exceed 5% of available cycles. Read module timings on Linux with decode-dimms.

WORDS2.6.6 remember these#

  1. Capacitor — two plates with a gap, storing charge — a component storing energy in an electric field, C = Q / V.
  2. Farad — the unit of charge stored per volt — one coulomb per volt; practical parts are pF, nF and uF.
  3. Time constant — how long a capacitor takes to fill — tau = R C; 63.2% after one tau, 99.3% after five.
  4. Decoupling capacitor — a local energy store beside a chip — a capacitor supplying transient current and lowering power network impedance.
  5. Dielectric — the insulating layer between the plates — the material whose permittivity sets capacitance and whose breakdown sets voltage rating.
  6. ESR — the hidden resistance inside a capacitor — equivalent series resistance, which dominates ripple loss and heating.
  7. Refresh — reading and rewriting memory so it does not forget — periodic restoration of DRAM cell charge within the retention window.

2.7 The inductor and the coil#

PLAIN2.7.1 in simple words#

  1. Whenever current flows through a wire, an invisible magnetic field wraps around it in circles.
  2. One straight wire makes a weak field. Wind it into a coil and every turn adds its field to the others.
  3. A coil carrying current therefore behaves like a magnet. That is an inductor.
  4. The second half of the rule matters more: a magnetic field that is changing pushes electrons in any nearby wire.
  5. Current makes a field, and a changing field makes current. Those two sentences explain motors, generators, transformers and speakers.
  6. An inductor resists changes in current, passing a steady current freely but fighting any sudden rise or fall. That makes it the opposite of a capacitor.
  7. Coils are all over a computer: the blocks near the processor socket, the coil in every speaker, the aerial in every wireless chip.

PLAIN2.7.2 a picture in your head#

  1. Think of a heavy flywheel on a shaft. To get it spinning you must push for a while.
  2. It refuses to speed up instantly however hard you shove, and once spinning it fights hard if you try to stop it.
  3. Current in an inductor behaves exactly like that speed. It builds slowly and resists being stopped.
  4. Cut the current to a coil abruptly and it produces a large voltage spike, which is why any circuit switching a relay or motor includes a diode.

Where this comparison breaks

  1. A flywheel stores energy in motion. An inductor stores it in the magnetic field around the coil, not in the copper.
  2. The honest version: nothing is spinning. The inertia is the field’s resistance to change, described by Faraday’s law and Lenz’s law, acting at the speed of light.

PLAIN2.7.3 a worked example#

  1. A motherboard must make about 1.0 V for the processor core from the 12 V rail, at over 100 amps.
  2. It cannot use a resistor, because 11 V times 100 A would waste 1100 watts as heat. It uses a buck converter instead.
Vout is about D * Vin, where D is the duty cycle

To get 1.0 V from 12 V:
  D = 1.0 / 12 = 0.083 = 8.3%

At 1 MHz switching, one period is 1000 ns, so the
switch is on 83 ns and off 917 ns, a million times
every second.

Energy in one choke, L = 0.15 uH at I = 30 A:
  E = 0.5 * L * I * I
    = 0.5 * 0.00000015 * 900 = 67.5 microjoules
  1. Because 100 A is too much for one switch and one coil, the design splits into phases, often 8, 12 or 16.
  2. The phases take turns, evenly spaced in time, so their ripple largely cancels. Those evenly spaced blocks around the socket are exactly this.

PLAIN2.7.4 what is really happening inside#

  1. When the switch turns on, 12 V appears across the inductor and current ramps up, building the magnetic field.
  2. Current cannot jump, so it rises in a straight ramp while the output capacitor collects the charge.
  3. When the switch turns off, the field collapses and drives the current onward through a second transistor to ground.
  4. So current into the load is continuous, even though the switch is only connected 8.3% of the time.
  5. A transformer uses the same physics differently: two coils share one field, and the voltage ratio equals the turns ratio.
  6. In a loudspeaker a coil sits in a magnet’s gap and is glued to a cone.
  7. Current in the coil makes a force, so the cone moves. The speaker chapter builds on this.

TECHNICAL2.7.5 the engineer’s version#

  1. Hans Christian Orsted found in 1820 that a current deflects a compass needle, and Andre-Marie Ampere formalized the force between conductors that same year.
  2. Michael Faraday demonstrated electromagnetic induction in 1831 at the Royal Institution, showing a changing field induces an electromotive force.
  3. Heinrich Lenz stated in 1834 that the induced current opposes the change producing it, which is why Faraday’s law carries a minus sign.
  4. The defining relation is v = L di/dt, with L in henries, named after Joseph Henry, who found induction independently around 1831.
  5. Energy stored is one half L I squared. Real inductors also have DC resistance, core loss, and a saturation current.
Application Typical inductance Typical current
CPU VRM choke 0.1 to 1 uH 25 to 60 A
Buck for 5 V or 3.3 V 1 to 10 uH 1 to 5 A
Speaker voice coil 0.1 to 1 mH 0.1 to 3 A
Wireless charging coil 6 to 24 uH under 2 A
  1. Multiphase controllers interleave phases 360 degrees divided by N apart, cancelling much of the input and output ripple current.
  2. Switching frequencies run 300 kHz to 1 MHz for desktop CPU VRMs, and 1 to 3 MHz for point-of-load converters.
  3. Coils appear in antennas as matching elements, in relays and motors as the actuator, and formerly in disk drives as inductive read heads.
  4. Inductive heads gave way to giant magnetoresistive heads, shipped by IBM in 1997, from work by Albert Fert and Peter Grunberg that won the 2007 Nobel Prize.
  5. Qi wireless charging, from the Wireless Power Consortium, operates at 87 to 205 kHz in the baseline power profile.

WORDS2.7.6 remember these#

  1. Magnetic field — the invisible pull wrapping around a current — the vector field B, in tesla, produced by moving charge.
  2. Inductor — a coil that resists changes in current — a component with defined inductance, following v = L di/dt.
  3. Henry — the unit of inductance — one volt induced per ampere per second of current change.
  4. Induction — a changing field creating a voltage in a nearby wire — Faraday’s law, opposed in direction per Lenz’s law.
  5. Transformer — two coils sharing a field to change voltage — a coupled pair with output set by turns ratio, giving galvanic isolation.
  6. VRM — the circuit making the processor’s low voltage — voltage regulator module, a multiphase synchronous buck converter.
  7. Saturation — the point where a coil’s core gives up — the current above which permeability collapses and inductance falls sharply.

2.8 The diode#

PLAIN2.8.1 in simple words#

  1. A diode lets current pass one way and blocks it the other. It is made by joining p-type silicon to n-type silicon.
  2. Push current the right way and it flows, but the diode keeps about 0.7 volts as a toll, called the forward voltage.
  3. Push the other way and almost nothing flows, until the voltage is so high that the diode breaks and usually dies.
  4. Four diodes in a diamond form a rectifier bridge, turning alternating current into current that always flows one way.
  5. An LED is a diode made from materials that give off light when current passes.
  6. A photodiode is the same idea backwards. Light falling on the junction makes a small current, so it works as a light sensor.

PLAIN2.8.2 a picture in your head#

  1. Picture a swing door hinged to open only one way, with a weak spring holding it shut.
  2. From the correct side you can push through, but you must lean on it a little. That lean is the forward voltage.
  3. From the wrong side the door will not budge, and shoving hard enough breaks the hinges, which is exactly reverse breakdown.
  4. Once open, extra people flow through very easily, which is why a diode cannot limit current by itself.

Where this comparison breaks

  1. A door is open or shut. A diode conducts smoothly and exponentially: a trickle at 0.5 V, plenty at 0.7 V, far too much at 0.8 V.
  2. The honest version: 0.7 V is not a fixed property. It is where a small silicon diode reaches a few milliamps at room temperature, and it shifts by about minus 2 mV per degree Celsius as it warms.

PLAIN2.8.3 a worked example#

  1. Feed 230 V AC into a bridge of four silicon rectifiers with a smoothing capacitor.
Peak = RMS * square root of 2 = 230 * 1.414 = 325 V

Two diodes are in the path at any moment, each
dropping about 0.7 V:
     325 - 1.4 = about 324 V DC
  1. This is why the inside of a mains adapter is dangerous even after unplugging. The bulk capacitor can hold over 300 V for many seconds.
  2. Now LEDs. Forward voltage depends on colour, because colour is set by the energy step each electron falls through.
LED colour Forward voltage at 20 mA
Infrared 1.2 to 1.6 V
Red 1.8 to 2.2 V
Yellow or amber 2.0 to 2.2 V
Green 2.8 to 3.5 V
Blue 3.0 to 3.6 V
White 2.8 to 3.6 V
  1. Redder light means less energy per photon and a lower forward voltage. Blue and white need about 3 V, so one 1.5 V cell cannot light a white LED.

PLAIN2.8.4 what is really happening inside#

  1. Where p-type and n-type meet, spare electrons from the n side drift across and fill vacancies on the p side.
  2. That leaves a thin zone with no free carriers, called the depletion region, with a built-in voltage across it.
  3. Connect positive to the p side and you push against that built-in voltage. Overcome it and carriers flood across.
  4. Connect positive to the n side and the empty zone widens instead, so nothing can cross and the diode blocks.
  5. In an LED, an electron crossing and dropping into a vacancy loses energy that leaves as a photon, and the band gap sets its colour exactly.
  6. In a photodiode the reverse happens. An arriving photon knocks an electron free and the built-in field sweeps it out as current.

TECHNICAL2.8.5 the engineer’s version#

  1. The current-voltage relation is the Shockley diode equation, with thermal voltage about 25.9 mV at 300 K, giving an exponential curve.
  2. Forward voltage by technology: silicon p-n 0.6 to 0.7 V, germanium 0.25 to 0.35 V, Schottky 0.2 to 0.45 V, silicon carbide about 0.8 V.
  3. Schottky diodes use a metal-semiconductor junction and have almost no reverse recovery time, which is why switching supplies use them.
  4. Zener diodes run deliberately in reverse breakdown, at standard values from 2.4 V to 200 V, as simple references and clamps.
Part Type Rating
1N4148 small signal 100 V, 200 mA
1N4007 rectifier 1000 V, 1 A
1N5819 Schottky 40 V, 1 A
BAT54 surface mount Schottky 30 V, 200 mA
  1. Ratings to check on any datasheet: peak inverse voltage, average forward current, forward voltage at the operating current, and reverse recovery time.
  2. Oleg Losev reported light from silicon carbide junctions in 1927, but the effect was not developed at the time.
  3. Nick Holonyak Jr. made the first practical visible-spectrum LED, a red one, at General Electric in 1962.
  4. Shuji Nakamura produced high-brightness blue LEDs at Nichia in 1993, making white LEDs possible. He shared the 2014 Nobel Prize in Physics with Isamu Akasaki and Hiroshi Amano.
  5. Photodiodes usually run reverse biased in photoconductive mode, giving faster response and a current linear in optical power.
  6. Every CMOS input pin has ESD protection diodes to VDD and VSS, which is why driving a signal into an unpowered chip can back-feed its supply rail.

WORDS2.8.6 remember these#

  1. Diode — a one-way valve for current — a p-n junction device conducting only under forward bias.
  2. Forward voltage — the toll for letting current through — Vf, about 0.7 V for silicon, set by the Shockley equation and temperature.
  3. Reverse breakdown — where a diode gives up and conducts backwards — avalanche or Zener breakdown beyond the peak inverse voltage.
  4. Rectifier — a circuit turning AC into one-way current — a half-wave or full-wave bridge arrangement of diodes.
  5. LED — a diode that gives out light — a direct-band-gap junction emitting photons on carrier recombination.
  6. Photodiode — a diode turning light into current — a reverse-biased junction producing photocurrent proportional to optical power.
  7. Schottky diode — a fast diode with a low toll — a metal-semiconductor junction with low Vf and negligible reverse recovery.

2.9 Signals: analogue and digital#

PLAIN2.9.1 in simple words#

  1. A signal is any physical thing that changes over time in order to carry information: a voltage on a wire, sound in air, light in a fibre.
  2. An analogue signal carries meaning in its exact value. Half a volt more is a genuinely different message.
  3. A digital signal carries meaning only in which side of a line the value falls on, so 2.9 V and 3.2 V mean exactly the same thing.
  4. Every wire picks up unwanted wobble from nearby wires, motors and radio. That wobble is noise.
  5. Noise damages an analogue signal a little at every stage, and the damage adds up and can never be removed.
  6. A digital signal survives, because each stage rebuilds a clean, full-strength copy, as long as noise never pushes a value across the line.
  7. The gap between the worst a sender may produce and the least a receiver demands is the noise margin.

PLAIN2.9.2 a picture in your head#

  1. Imagine passing a message down a line of a hundred people in a noisy room.
  2. In the analogue version each person whispers the exact loudness they heard, so small errors creep in at every step and the end is mush.
  3. In the digital version everyone agrees on only two messages, a nod or a shake, and each person makes a fresh, full-strength one.
  4. Person one hundred receives exactly what person one sent, even though every step was imperfect.

Where this comparison breaks

  1. If the room gets loud enough that a nod is mistaken for a shake, the error becomes permanent and is copied faithfully forever.
  2. The honest version: digital is not immune to noise. Below the threshold errors vanish completely; above it they become total. That cliff edge is why systems add error-detecting codes on top.

PLAIN2.9.3 a worked example#

  1. A 3.3 V chip drives another. The sender promises a one will be at least 2.4 V, and the receiver reads anything above 2.0 V as a one.
High noise margin = VOH min - VIH min
                  = 2.4 - 2.0 = 0.4 V

Low noise margin  = VIL max - VOL max
                  = 0.8 - 0.4 = 0.4 V
  1. So any noise smaller than 0.4 V cannot corrupt a bit. Drop the system to 1.2 V logic and the cushion falls to roughly 0.15 V.
  2. The same 0.2 V of noise that was harmless at 3.3 V now flips bits. Nothing about the noise changed, only the cushion.
  3. That is the central trade of the last thirty years: lower voltage saves a great deal of power and costs you margin.

PLAIN2.9.4 what is really happening inside#

  1. A digital output is a pair of transistors, one connecting the wire to the supply and one to ground, with only one on at a time.
  2. When the output flips, the wire’s own capacitance must be charged or drained, and that takes time. That time is the rise time.
  3. Rise time is measured from 10% to 90% of the swing, because the very start and end of the curve are slow and vague.
  4. During the rise the voltage passes through the forbidden middle zone where the receiver’s answer is undefined, which is safe only because the clock says when to read.
  5. A faster edge spends less time undefined, but carries higher frequency content that reflects, radiates and rings, so designers sometimes slow edges on purpose.

TECHNICAL2.9.5 the engineer’s version#

  1. The four defining parameters on every logic datasheet are VOH minimum, VOL maximum, VIH minimum and VIL maximum.
  2. Noise margin high is VOH min minus VIH min. Noise margin low is VIL max minus VOL max.
Family Supply VIL max VIH min
TTL 74xx 5.0 V 0.8 V 2.0 V
CMOS 74HC 5.0 V 1.35 V 3.15 V
LVTTL, LVCMOS 3.3 V 0.8 V 2.0 V
LVCMOS 2.5 V 0.7 V 1.7 V
LVCMOS 1.8 V 0.63 V 1.17 V
Family VOL max VOH min Margins, low and high
TTL 74xx 0.4 V 2.4 V 0.4 V and 0.4 V
CMOS 74HC 0.1 V 4.4 V 1.25 V and 1.25 V
LVTTL 3.3 V 0.4 V 2.4 V 0.4 V and 0.4 V
LVCMOS 1.8 V 0.45 V 1.35 V 0.18 V and 0.18 V
  1. These are typical family values from standard datasheets and the JEDEC JESD8 series. Always confirm against the exact part and its test conditions.
  2. TTL, transistor-transistor logic, came from the Texas Instruments 7400 series introduced in 1964 and dominated for two decades.
  3. TTL thresholds are asymmetric because bipolar inputs sink current when low. CMOS inputs draw almost none, so their thresholds sit near half the supply.
  4. Supply voltages fell in steps as features shrank: 5 V through the 1980s, 3.3 V from the mid 1990s, then 2.5 V, 1.8 V, 1.5 V and 1.2 V.
  5. Processor core voltage today runs roughly 0.7 V to 1.35 V, adjusted dynamically thousands of times a second by the power management unit.
  6. DDR4 uses a 1.2 V supply, DDR5 uses 1.1 V, and LPDDR5 uses 1.05 V with 0.5 V on the data lines.
  7. Rise time relates to bandwidth by the approximation: bandwidth in gigahertz equals 0.35 divided by rise time in nanoseconds.
  8. Modern high-speed links drop single-ended thresholds for differential pairs. LVDS swings about 350 mV around a common mode near 1.2 V, and the receiver measures only the difference, rejecting common-mode noise.

WORDS2.9.6 remember these#

  1. Signal — something that changes over time to carry information — a time-varying physical quantity conveying data.
  2. Analogue — meaning carried by the exact value — a continuous-amplitude representation where every level is distinct information.
  3. Digital — meaning carried by which side of a line — a discrete representation quantized to defined logic levels.
  4. Noise — unwanted wobble picked up along the way — random or coupled interference added to a signal.
  5. Noise margin — the cushion before noise breaks a bit — VOH min minus VIH min, and VIL max minus VOL max.
  6. Rise time — how long an edge takes to go up — the 10% to 90% transition time, which sets the bandwidth required.
  7. Differential pair — two wires carrying opposite copies of one signal — a balanced scheme rejecting common-mode noise.

2.10 Clocks: how a computer keeps time#

PLAIN2.10.1 in simple words#

  1. A computer needs a steady heartbeat so every part agrees when a step begins and ends. That is the clock.
  2. The clock is a square wave: a voltage going high, low, high, low, forever, at an exactly even rate.
  3. The steadiness comes from a small piece of quartz crystal, usually sealed in a tiny metal can on the board.
  4. Quartz has an unusual property. Squeeze it and it makes a small voltage; apply a voltage and it physically bends. That is the piezoelectric effect.
  5. A quartz bar of a given size wants to vibrate at one particular rate, the way a tuning fork wants to sound one note.
  6. Put it in an amplifier that feeds its own output back into it and it settles at exactly that rate and stays there.
  7. The crystal is slow compared with a processor, so a circuit called a multiplier turns a low rate into a very high one.

PLAIN2.10.2 a picture in your head#

  1. Think of a pendulum in a grandfather clock. Its swing rate is set by its length, not by how hard you push it.
  2. A tiny nudge each swing keeps it going, and the swings stay even for years. The nudge does not set the rate; the pendulum does.
  3. A quartz crystal is the same idea, but the pendulum is a sliver of stone the size of a grain of rice, swinging thirty-two thousand times a second.

Where this comparison breaks

  1. A pendulum drifts with gravity and temperature. A crystal drifts with its cut, its temperature and its age.
  2. The honest version: a crystal is not perfect. A typical watch crystal is specified at plus or minus 20 parts per million, which is about 1.7 seconds a day, or roughly ten minutes a year.

PLAIN2.10.3 a worked example#

  1. Nearly every real-time clock chip and quartz wristwatch uses exactly 32,768 hertz, which is two multiplied by itself fifteen times.
32768 -> 16384 -> 8192 -> 4096 -> 2048 -> 1024
  -> 512 -> 256 -> 128 -> 64 -> 32 -> 16
  -> 8 -> 4 -> 2 -> 1 Hz

Fifteen halvings. A chain of 15 flip-flops does it
with no arithmetic, no adder and almost no power.
  1. It is also a good compromise. A lower frequency needs a physically larger crystal, and a higher one burns more power in the divider.
Base clock (BCLK) = 100 MHz
Multiplier        = 35
Core clock        = 100 * 35 = 3.5 GHz

One clock period at 3.5 GHz:
  T = 1 / 3.5e9 = 0.2857 ns = 285.7 picoseconds
  1. So 3.5 GHz physically means the core’s heartbeat completes 3,500,000,000 full cycles a second, each lasting 286 trillionths of a second.

PLAIN2.10.4 what is really happening inside#

  1. In one clock period a signal can only travel so far, because nothing beats light and copper is slower than that.
  2. Light in empty space covers about 30 centimetres in one nanosecond. On a circuit board a signal covers roughly half that.
Medium Speed In 1 ns In one 3.5 GHz tick
Vacuum, light 30 cm/ns 30 cm 8.6 cm
Coax at 66% 20 cm/ns 20 cm 5.7 cm
FR-4 microstrip 17.5 cm/ns 17.5 cm 5.0 cm
FR-4 stripline 15.0 cm/ns 15.0 cm 4.3 cm
  1. The honest version: the often-repeated figure of about 8.5 centimetres per tick at 3.5 GHz is the vacuum figure. In copper on a board it is roughly half that, and inside a chip it is worse again.
  2. That is a hard physical ceiling. A processor die is one to three centimetres across, so a signal cannot cross a large die and settle within one cycle.
  3. This is why big chips are divided into regions, why data takes several cycles to cross a die, and why making a chip bigger does not make it faster.
  4. The clock itself must reach every corner at almost the same moment, so designers build a balanced tree of buffers with equal path lengths.
  5. Any remaining difference in arrival time is clock skew, and it eats directly into the time available for real work.

TECHNICAL2.10.5 the engineer’s version#

  1. Jacques and Pierre Curie discovered piezoelectricity in 1880, working with quartz, tourmaline and Rochelle salt.
  2. Warren Marrison and J. W. Horton built the first quartz clock at Bell Telephone Laboratories in 1927.
  3. Watch crystals use a tuning-fork cut in a small cylindrical can, commonly specified at 32.768 kHz plus or minus 20 ppm at 25 C.
  4. Frequency drifts with temperature along a parabola for tuning-fork cuts, peaking near 25 C. TCXO and OCXO parts add compensation or an oven, reaching 0.01 ppm.
  5. The oscillator is typically a Pierce circuit: one inverting amplifier, the crystal, two load capacitors and a feedback resistor.
  6. A phase-locked loop multiplies the reference, using a phase detector, a loop filter, a voltage-controlled oscillator and a feedback divider.
  7. A 100 MHz base clock has been the convention on Intel and AMD desktop platforms since around 2011, replacing earlier 133 MHz and 200 MHz references.
  8. That is a convention, not a written standard, and board makers may shift it slightly.
  9. Advertised frequency is several numbers, not one: a base clock, a single-core boost and an all-core boost, all limited by temperature and current.
  10. Clock jitter, the cycle-to-cycle variation, matters as much as average frequency for serial links. PCI Express 5.0 at 32 GT/s has a unit interval of 31.25 ps.
  11. On-die clock distribution uses H-trees or grids with skew budgets of tens of picoseconds, and can consume 20% to 30% of dynamic power.
lscpu | grep -i mhz
grep MHz /proc/cpuinfo
sudo dmidecode -t processor
cpupower frequency-info

WORDS2.10.6 remember these#

  1. Clock — the steady heartbeat every part follows — a periodic square wave defining the timing reference for synchronous logic.
  2. Piezoelectric effect — squeeze makes voltage, voltage makes bend — reversible electromechanical coupling, found by the Curies in 1880.
  3. Crystal — the quartz sliver that sets the rate — a mechanical resonator of very high Q used as a frequency reference.
  4. 32.768 kHz — the standard watch frequency — two to the power of fifteen hertz, divisible to exactly 1 Hz by fifteen flip-flops.
  5. PLL — the circuit that multiplies a slow clock into a fast one — phase-locked loop with phase detector, loop filter, VCO and divider.
  6. Base clock — the low reference frequency on the board — BCLK, conventionally 100 MHz on modern desktop platforms.
  7. Clock skew — the small difference in when the beat arrives — the spread in clock edge arrival times across a die, in picoseconds.

2.11 How one bit is physically stored and moved#

PLAIN2.11.1 in simple words#

  1. A bit is not a thing you can hold. It is an agreement about what a physical state means.
  2. On a wire in transit, a bit is a voltage: above an agreed level means one, below another agreed level means zero.
  3. In main memory, a bit is an amount of electric charge sitting on a tiny capacitor.
  4. In a solid-state drive, a bit is charge trapped inside an insulated island, where it stays for years without power.
  5. On a spinning hard disk, a bit is the direction a microscopic patch of magnetic material points.
  6. In every case the physical thing is continuous and messy, and the digital reading is made by comparing it against a threshold.
  7. The cushion between what a sender guarantees and what a receiver requires is the noise margin, and it keeps the reading correct.

PLAIN2.11.2 a picture in your head#

  1. Picture a water tank with a line painted on the side, and a rule: above the line means yes, below means no.
  2. Anyone filling it is told to fill well above the line, and anyone reading it answers yes for anything above the line.
  3. The gap between fill-to-here and read-as-yes-from-here is the safety cushion, and ripples smaller than that cushion do not matter.
  4. Shrink the tank to save water and the cushion shrinks with it, while the ripples stay the same size.

Where this comparison breaks

  1. A tank has one line. Real logic has two, one for each direction, with a forbidden band between them.
  2. The honest version: in that forbidden band a real receiver does not report an error. It returns a one or a zero effectively at random, and two receivers on the same wire may disagree.

PLAIN2.11.3 a worked example#

  1. Here is a 3.3 V logic signal drawn to scale in volts.
3.3 V +-------------------------------+ VDD
      |  driver guarantees HIGH here  |
2.4 V +-------------------------------+ VOH min
      |  high noise margin = 0.4 V    |
2.0 V +-------------------------------+ VIH min
      |                               |
      |        FORBIDDEN BAND         |
      |   receiver may return 0 or 1  |
      |   two receivers may disagree  |
      |                               |
0.8 V +-------------------------------+ VIL max
      |  low noise margin = 0.4 V     |
0.4 V +-------------------------------+ VOL max
      |  driver guarantees LOW here   |
0.0 V +-------------------------------+ GND
  1. Now one bit of DRAM, using real numbers.
Cell capacitance  C = 10 femtofarads = 1e-14 F
Cell voltage      V = 1.1 V

Charge stored     Q = C * V = 1.1e-14 coulombs
Electrons         N = Q / 1.602e-19
                    = about 69,000 electrons
  1. Sixty-nine thousand electrons is the entire physical existence of one bit of memory, and it leaks away within tens of milliseconds.

PLAIN2.11.4 what is really happening inside#

  1. To write a DRAM bit, the controller raises the word line, which switches on the cell’s single transistor.
  2. That connects the tiny capacitor to a long wire called the bit line, and the capacitor charges or discharges to match.
  3. Lower the word line, the transistor turns off, and the charge is sealed in. The bit is stored.
  4. To read it, the bit line is first set exactly halfway between one and zero, then the word line is raised.
  5. The cell’s small charge nudges the bit line up or down by only tens of millivolts, and a sense amplifier detects which way it moved.
  6. Reading destroys the stored charge, so the sense amplifier immediately writes the value back. Every read is also a rewrite.
  7. Nothing here is truly digital. It is careful analogue engineering, with the decision made at the end, on purpose, at a chosen moment.

TECHNICAL2.11.5 the engineer’s version#

  1. Storage mechanisms and their physical carriers, with real figures.
Technology Physical carrier Typical retention
SRAM cell 6 cross-coupled MOSFETs while powered
DRAM cell 6 to 10 fF capacitor 32 to 64 ms
NAND flash trapped gate charge about 1 to 10 years
Hard disk magnetic domain decades
  1. DRAM sense amplifier input is on the order of 50 to 150 mV of bit line swing, against a precharge reference of half the supply.
  2. NAND flash stores several bits per cell using more threshold levels: SLC 2 levels, MLC 4, TLC 8, QLC 16, and PLC 32 in research.
  3. Each extra level halves the voltage window per state, which is exactly why QLC has lower endurance and needs stronger error correction.
  4. Modern NAND relies on LDPC error-correcting codes in the controller, because the raw bit error rate is far too high to use directly.
  5. Row hammer, published by Yoongu Kim and colleagues in 2014, showed that repeatedly activating one DRAM row flips bits in neighbouring rows.
  6. That is a direct consequence of everything in this chapter: bits are charge, charge leaks, and neighbours are very close together.
  7. Mitigations include Target Row Refresh, higher refresh rates and on-die ECC in DDR5. Research since 2020 has defeated several of them, so this is active research, not a solved problem.
  8. Cosmic-ray neutrons and alpha particles also flip DRAM bits. Server memory uses ECC, usually single-error-correcting and double-error-detecting.
  9. Inspect memory error events on Linux with edac-util -v, or with rasdaemon and ras-mc-ctl --summary.

WORDS2.11.6 remember these#

  1. Bit — the smallest piece of information, a yes or a no — a binary digit, physically encoded as a distinguishable state.
  2. Threshold — the level that decides one from zero — VIH and VIL, the guaranteed input decision points.
  3. Sense amplifier — the circuit that reads a very faint memory bit — a differential amplifier resolving tens of millivolts of bit line swing.
  4. Word line — the wire selecting one row of memory cells — the gate control line activating access transistors across a row.
  5. Bit line — the wire carrying the value in or out — the shared column line joining cells to sense amplifiers.
  6. ECC — extra bits that catch and fix memory errors — error-correcting code, commonly SECDED for DRAM and LDPC for NAND.
  7. Row hammer — poking memory until neighbours change — a disturbance fault from repeated row activation, first published in 2014.

2.98 Common wrong ideas#

  1. Wrong: Electrons travel through wires at the speed of light. Right: Individual electrons crawl, usually under a tenth of a millimetre per second. The field that pushes them travels near light speed, and that is what makes the lamp light instantly.

  2. Wrong: The bulb uses up the current, so less comes back than went in. Right: Exactly the same current returns, because charge is conserved. What the bulb uses is energy, which the charge carries and gives up as heat and light.

  3. Wrong: Higher voltage always means more power. Right: Power is voltage times current. A 10,000 V static spark carries microjoules and is harmless, while a 12 V car battery at 400 A can melt a spanner.

  4. Wrong: Static electricity is a different kind of electricity from current in a wire. Right: It is the same electrons and the same charge. The only difference is that static charge sits still on an insulator instead of flowing through a conductor.

  5. Wrong: An input pin with nothing connected reads zero. Right: It floats. Its voltage is undefined and wanders with nearby noise, so it can read one, zero, or both within a microsecond, and it makes the chip draw extra current.

  6. Wrong: Ground is a real place where electricity is disposed of. Right: Ground is whichever node we choose to call zero volts. A phone on battery has a ground that touches nothing in the earth at all.

  7. Wrong: A capacitor lets direct current pass through it. Right: No charge ever crosses the insulating gap. Current appears to flow because charge accumulates on one plate and leaves the other.

  8. Wrong: Digital circuits are immune to noise. Right: They tolerate noise up to the noise margin and then fail completely. Below the margin errors vanish; above it bits flip, which is why error-correcting codes exist.

  9. Wrong: Ohm’s law applies to everything electrical. Right: It applies to ohmic materials over a limited range. Diodes are exponential, lamps change resistance as they heat, and transistors are controlled devices, not resistors.

  10. Wrong: Chips get hot because of poor design, and better engineering could remove the heat. Right: Computing physically consists of charging and discharging capacitance. The energy has to go somewhere, and it goes into heat. It can be reduced, never abolished.

2.99 Chapter summary in 20 lines#

  1. Atoms have a nucleus of protons and neutrons surrounded by electrons, and charge is the property that makes them push and pull.
  2. In a metal one outer electron per atom is loosely held, and that crowd of free electrons is what carries current.
  3. Voltage is energy per unit charge, current is charge per second, and resistance is how strongly a material fights the flow.
  4. Ohm’s law, from Georg Ohm in 1827, ties them together as V equals I times R, and holds only for ohmic materials.
  5. Power is V times I, also I squared R, and almost all power delivered to a chip leaves it again as heat.
  6. Heat comes from electrons colliding with the lattice, and inside chips mainly from charging capacitance billions of times a second.
  7. A circuit must be a closed loop because charge cannot pile up at the end of a wire, and ground is simply the node chosen as zero volts.
  8. Indian mains is 230 V RMS at 50 Hz, peaking near 325 V, and an adapter rectifies, smooths, chops, transforms and regulates it down.
  9. ATX supplies 12 V, 5 V, 3.3 V and 5 V standby, while USB Power Delivery 3.1 has reached 48 V and 240 W since 2021.
  10. Conductors have free carriers, insulators have a wide band gap, and semiconductors sit between, with silicon at 1.12 eV.
  11. Doping silicon with phosphorus or boron makes n-type or p-type material, and the junction between them is the basis of every chip.
  12. A resistor sets a known voltage drop for a given current, provides pull-ups and pull-downs, and limits LED current.
  13. A floating input is a genuine bug, because a MOS gate has near-infinite input resistance and follows any stray noise.
  14. A capacitor stores charge on two plates, charges along an exponential curve with time constant RC, and decouples power locally.
  15. One DRAM bit is about 69,000 electrons on a few femtofarads, which leaks and must be refreshed within 32 ms on DDR5.
  16. An inductor stores energy in a magnetic field and resists changes in current, which is what makes buck converters and VRMs possible.
  17. A diode conducts one way only, costing about 0.7 V in silicon; LEDs emit photons on recombination and photodiodes do the reverse.
  18. Digital beat analogue because every stage regenerates a clean level, so errors stop accumulating while noise stays inside the margin.
  19. A quartz crystal, using the piezoelectric effect found by the Curie brothers in 1880, gives the stable reference a PLL multiplies to gigahertz.
  20. At 3.5 GHz one clock period is 286 picoseconds, in which a board signal travels four to five centimetres, a hard limit on chip size.