Ohm's law says that the current through a resistor is proportional to the voltage across it: V = I × R, with voltage in volts, current in amperes and resistance in ohms. Kirchhoff's current law says the currents flowing into any junction add up to the currents flowing out, and his voltage law says the voltage changes around any closed loop add up to zero. Together they let you solve almost any direct current circuit with pencil and paper.
This post goes one level below our tour of famous equations that changed the world. It sits sideways from Maxwell's equations explained, which describe the fields that Kirchhoff's laws quietly approximate, and from semiconductor doping and p-n junctions, which explains the diodes and transistors that refuse to obey Ohm's law. If you want to see these laws sizing real hardware, our post on homelab UPS sizing, runtime and graceful shutdown applies the same watts, volts and amp hours to a battery backup. Energy bookkeeping in general is covered in the laws of thermodynamics explained.
A note on numbers: unit definitions come from NIST's edition of the SI brochure (NIST SP 330, 2019) and constants from NIST's CODATA pages. Copper's resistivity and temperature coefficient come from the National Bureau of Standards copper wire tables (NBS Handbook 100). USB and Ethernet power figures come from USB-IF and IEEE. Component values such as LED forward voltages and phone power draws are typical figures we label as illustrative, because they vary by part. Every calculation in the worked examples was rerun with a short Python script, which the walkthrough section reproduces so you can check it yourself.
Key takeaways
- Voltage is energy per unit charge (1 volt = 1 joule per coulomb), current is charge per second (1 ampere = 1 coulomb per second), resistance is volts per ampere, and power is volts times amperes, in watts.
- Since 20 May 2019 the ampere has been defined by fixing the elementary charge at exactly 1.602 176 634 × 10⁻¹⁹ coulomb. One ampere is about 6.24 × 10¹⁸ electrons passing a point every second.
- Ohm's law (V = I × R) describes ohmic materials such as metal wires and resistors at a steady temperature. Georg Simon Ohm published the mathematical treatment in Die galvanische Kette, mathematisch bearbeitet (Berlin, 1827).
- Ohm's law does not describe diodes, LEDs or transistors (their current is an exponential or switched function of voltage), and a resistor's value drifts with temperature. Copper's resistance rises about 0.393 percent per degree Celsius near room temperature.
- Kirchhoff's current law (KCL) follows from conservation of charge; Kirchhoff's voltage law (KVL) follows from conservation of energy in a circuit where changing magnetic fields stay inside components. Both are approximations that hold when a circuit is small compared with the wavelength of its signals.
- Series resistors add; parallel conductances add. A voltage divider scales a voltage by R2 / (R1 + R2), and an LED resistor is (supply voltage minus LED voltage) divided by the desired current.
- Power loss in a wire grows with the square of current. That is why USB Power Delivery reached 240 W by adding a 48 V level rather than more current, and why data centre racks have moved power distribution from 12 V to 48 V.
- You can check any hand solution with a few lines of Python or a SPICE simulator, and the walkthrough below shows both.
A dated timeline from the galvanic circuit to the quantum ohm
Every date in this table was checked against the source in the right hand column.
| Date | Event | Source |
|---|---|---|
| 1827 | Georg Simon Ohm (1789 to 1854) publishes Die galvanische Kette, mathematisch bearbeitet in Berlin (T. H. Riemann), the mathematical treatment of the galvanic circuit that contains the law now named after him | Internet Archive catalogue record, Smithsonian Libraries copy |
| 1845 | Gustav Kirchhoff publishes "Ueber den Durchgang eines elektrischen Stromes durch eine Ebene, insbesondere durch eine kreisförmige" in Annalen der Physik (pages 497 to 514), which closes with the two rules for currents at junctions and voltages around closed figures | Crossref record; Kirchhoff, Gesammelte Abhandlungen (Leipzig, 1882), first paper |
| 1847 | Kirchhoff publishes his paper on solving the equations of current distribution in linear conductor networks (Annalen der Physik, pages 497 to 508) | Crossref record; Gesammelte Abhandlungen |
| 1913 | Heike Kamerlingh Onnes receives the Nobel Prize in Physics for low temperature research that led, among other things, to liquid helium; his Nobel lecture describes mercury's resistance vanishing abruptly near 4.2 K | NobelPrize.org; Onnes Nobel lecture |
| 1948 | The 9th CGPM starts the study that leads to the International System of Units (SI) | NIST SP 330 (2019) |
| 1985 | Klaus von Klitzing receives the Nobel Prize in Physics for the discovery of the quantized Hall effect, the basis of today's resistance standards | NobelPrize.org |
| 27 Sep 2018 | IEEE approves 802.3bt, which raises Power over Ethernet capacity by using all four pairs of the cable (published 31 January 2019) | IEEE Standards Association |
| Nov 2018 | The 26th CGPM agrees to redefine the SI, including the ampere, in terms of fixed constants | NIST SP 330 (2019) |
| 20 May 2019 | The redefined SI takes effect; the elementary charge becomes exactly 1.602 176 634 × 10⁻¹⁹ C | NIST SP 330; NIST CODATA |
| 2021 | USB-IF announces USB Power Delivery Revision 3.1, raising the limit from 100 W to 240 W with new 28 V, 36 V and 48 V levels | USB-IF |
What do voltage, current, resistance and power mean physically?
Four quantities do almost all the work in circuit analysis. Each has a precise SI definition and a familiar analogy, and each analogy breaks somewhere. Knowing where it breaks is as useful as the analogy itself.
Current: charge per second
Electric current is the rate at which charge moves past a point. Its unit, the ampere (A), is one of the seven SI base units. NIST SP 330, the US edition of the SI brochure, states that the ampere is defined by taking the elementary charge e to be exactly 1.602 176 634 × 10⁻¹⁹ when expressed in coulombs, where a coulomb equals an ampere second. Turn that around and one ampere is 1 / (1.602 176 634 × 10⁻¹⁹) elementary charges per second, which is about 6.24 × 10¹⁸ electrons every second.
Before 2019 the ampere had a mechanical definition, which NIST SP 330 reproduces in its historical appendix: the constant current that, flowing in two infinitely long parallel wires one metre apart in vacuum, produces a force of 2 × 10⁻⁷ newton per metre between them. The brochure notes that this definition was abrogated by the 26th CGPM in 2018. The new definition does not change the size of an ampere in any way you could notice on a bench; it changes what the size is anchored to.
The everyday analogy is water flow: litres per second through a pipe. It works well for the idea that current is the same at every point along a single unbranched path, and that it splits at a junction. It fails in two places. First, the electrons in a copper wire drift slowly, typically fractions of a millimetre per second, even though a light switch acts almost instantly. The signal travels as an electromagnetic wave guided by the wire, close to the speed of light, while individual electrons shuffle along. Second, conventional current is defined as the flow of positive charge, so in a metal the electrons actually move the opposite way to the arrow on the diagram. Circuit analysis does not care, as long as you are consistent.
Voltage: energy per unit charge
Voltage, or potential difference, is the energy gained or lost per unit charge moving between two points. NIST SP 330 lists the volt as a derived unit equal to one watt per ampere, which is the same as one joule per coulomb. A 9 V battery gives each coulomb that passes through it 9 joules of energy, and the circuit spends those 9 joules before the charge returns.
The analogy is water pressure, or height in a gravity fed system. A reservoir higher up gives water more energy per litre; a battery with a higher voltage gives charge more energy per coulomb. The analogy helps with the idea that voltage is always measured between two points, never at one point on its own. It fails when people treat voltage as something that flows: voltage does not travel through a circuit, current does. A voltmeter reads a difference across something; an ammeter reads a flow through something. Connecting them the wrong way round is the most common way to blow a meter fuse.
Electromotive force (emf) is the name for the energy per unit charge that a source supplies, chemically in a battery or magnetically in a generator. It is measured in volts too, which is why textbooks sometimes write "emf" and "voltage" interchangeably.
Resistance: volts per ampere
Resistance is how much voltage it takes to push a given current through a component. NIST SP 330 lists the ohm (Ω) as one volt per ampere and its reciprocal, the siemens (S), as one ampere per volt. The historical CIPM definition reproduced in the same brochure is direct: the ohm is the resistance between two points of a conductor when one volt applied between them produces a current of one ampere, provided the conductor is not itself a source of emf.
In the water analogy resistance is a narrow pipe or a pipe packed with gravel. That picture captures the geometry of a wire's resistance well, because both depend on length and cross section. A conductor's resistance is R = ρ × L / A, where ρ (rho) is the material's resistivity, L the length and A the cross sectional area. NBS Handbook 100 gives the International Annealed Copper Standard as 1.7241 microhm centimetres at 20 °C, which is the same as 0.017 241 ohm square millimetres per metre. A one metre wire with a 1 mm² cross section therefore has about 0.017 Ω.
Where the analogy fails is temperature and material. Water pipes do not change size when warm, but a metal's resistance rises as its atoms vibrate more and scatter electrons more often. NBS Handbook 100 gives copper's temperature coefficient at 20 °C as 0.003 93 per degree. Semiconductors go the other way: their resistance falls as temperature rises, because more carriers are freed. And superconductors drop to zero resistance below a critical temperature, which no pipe can do.
Power: energy per second
Power is the rate at which energy is converted, in watts. NIST SP 330 defines the watt as one joule per second. In a circuit element, power is voltage times current: P = V × I. A 5 V supply delivering 2 A delivers 10 W.
Combine that with Ohm's law and you get two more forms that apply to resistors: P = I² × R and P = V² / R. The first matters most in practice. Because power lost in a conductor grows with the square of the current, doubling the current through a cable quadruples the heat it produces. That single relation explains why high voltage transmission lines exist, why USB chargers raise the voltage for fast charging, and why server racks distribute power at 48 V.
Energy is power multiplied by time. Batteries are usually rated in milliamp hours (mAh), which is a charge, not an energy; multiply by the battery's nominal voltage to get watt hours (Wh). A 4,000 mAh cell at 3.85 V stores about 15.4 Wh. Electric utilities bill in kilowatt hours: one kWh is 3.6 million joules.
Where the water analogy works and where it fails
| Electrical idea | Water analogy | Where the analogy holds | Where it fails |
|---|---|---|---|
| Current (A) | Flow rate (litres per second) | Same at every point in an unbranched loop; splits at junctions | Electrons drift slowly; the signal is a field moving near light speed |
| Voltage (V) | Pressure or height difference | Always between two points; drives flow | Voltage does not flow; there is no "voltage leak" |
| Resistance (Ω) | Narrow or gravel filled pipe | Longer and thinner means more resistance | Rises with temperature in metals, falls in semiconductors, vanishes in superconductors |
| Power (W) | Pressure × flow | Both factors matter | Heat in a wire follows I² × R, which has no tidy pipe equivalent |
| Capacitor | Elastic membrane in the pipe | Stores energy, blocks steady flow | Charge on the two plates is equal and opposite; there is no membrane to burst gradually |
| Battery | Pump | Raises energy per unit charge | A battery has internal resistance and a voltage that sags with load and age |
Who were Ohm and Kirchhoff, and how were the laws established?
Georg Simon Ohm and the galvanic circuit (1827)
Georg Simon Ohm (1789 to 1854) was a German schoolteacher and physicist. In 1827 he published Die galvanische Kette, mathematisch bearbeitet ("The galvanic circuit investigated mathematically") in Berlin, printed for T. H. Riemann. The Smithsonian Libraries copy, catalogued on the Internet Archive, came from the Burndy Library collection of science history.
The book's argument is the one we still use: the current in a circuit is proportional to the driving "tension" (what we now call electromotive force or voltage) and inversely proportional to the circuit's total resistance, and the resistance of a wire grows with its length and falls with its cross section. The book is a mathematical treatment: it sets out the circuit as a problem in continuous flow, in the style of the mathematical physics of the period.
Histories of physics commonly add two details about how Ohm got there: that he modelled his theory on Fourier's analysis of heat conduction, and that he used thermoelectric sources, which give a small but steady voltage, because the voltaic piles of the day drifted as they ran. We did not confirm those details on a primary source for this post, so treat them as background rather than citation. What is beyond dispute is the outcome: the relationship carries his name, and so does the SI unit of resistance.
Gustav Kirchhoff and the rules for networks (1845)
Gustav Kirchhoff published his paper on the flow of current through a plane, especially a circular one ("Ueber den Durchgang eines elektrischen Stromes durch eine Ebene, insbesondere durch eine kreisförmige"), in the Annalen der Physik in 1845. Crossref's record for the article places it in volume 140 (the journal's modern running number), issue 4, pages 497 to 514, and a short supplement (Nachtrag) followed in 1846. It is the first paper in his collected works, the Gesammelte Abhandlungen published in Leipzig in 1882, where it runs to page 16. The paper studies current spreading through a thin conducting sheet. Near its end Kirchhoff states two rules for a system of wires joined at points, which are the laws we teach today:
- If wires meet at a point, the sum of the currents flowing toward that point is zero (taking currents toward the point as positive).
- If wires form a closed figure, the sum of the products of each wire's current and resistance around the figure equals the sum of the electromotive forces in that loop.
The second rule, in this original form, is Ohm's law applied around a loop: the IR drops balance the emfs. Today we write it more generally as "the sum of voltages around a loop is zero", which covers components that are not resistors.
Two years later, in 1847, Kirchhoff returned to the subject in "Ueber die Auflösung der Gleichungen, auf welche man bei der Untersuchung der linearen Vertheilung galvanischer Ströme geführt wird" (Annalen der Physik, volume 148, pages 497 to 508, per Crossref): on solving the equations you get when you analyse how currents distribute through a network of wires. In the collected works that paper restates the junction rule and points back to the 1845 paper for it. It is the first systematic treatment of how many simultaneous loop and node equations a network produces and how to solve them, which is the ancestor of the nodal and mesh methods below and of the matrix methods inside every circuit simulator.
From laws to units
Ohm and Kirchhoff worked before the volt, ampere and ohm had agreed values. Those came later in the nineteenth century through international congresses, then through the metre convention bodies. NIST SP 330 records that the 9th General Conference on Weights and Measures (CGPM), in 1948, started the study that led to the SI, and that the 26th CGPM agreed the redefinition of the SI in November 2018, with effect from 20 May 2019. Since then the ampere has been fixed by the elementary charge, and the volt and ohm follow from it together with the other defining constants.
The ohm is now realised in national laboratories using the quantum Hall effect, discovered by Klaus von Klitzing, who received the 1985 Nobel Prize in Physics for it. NIST lists the von Klitzing constant, R_K = h / e², as exactly 25 812.807 45... Ω. Because both h and e have exact values in the revised SI, R_K is exact too. The volt is realised with Josephson junction arrays, using the Josephson constant K_J = 2e / h, which NIST lists as exactly 483 597.848 4... × 10⁹ hertz per volt. In other words, the laboratory definitions of the volt and the ohm now come from quantum effects, and Ohm's law (V = I × R) ties them together with the ampere.
What does V = I × R say, and when does it not apply?
The statement
Ohm's law says that for some components, the current is directly proportional to the voltage across them, and the constant of proportionality is the resistance. Plot current against voltage and you get a straight line through the origin, with slope 1 / R. Rearranged three ways:
- V = I × R: the voltage across a 220 Ω resistor carrying 10 mA is 2.2 V.
- I = V / R: 5 V across 1 kΩ drives 5 mA.
- R = V / I: if 12 V drives 0.5 A, the resistance is 24 Ω.
It is worth being precise about what the law is. Defining resistance as V / I is always possible; that is just a ratio. Ohm's law is the stronger claim that this ratio stays constant as the voltage changes. Materials and components for which it does are called ohmic.
There is also a microscopic version that applies inside a material: the current density J equals the conductivity σ times the electric field E. Integrate that over a uniform wire and you get V = I × R with R = ρ × L / A, where ρ = 1 / σ.
When it does not apply
Diodes and LEDs. A silicon diode's current grows roughly tenfold for every 60 mV of forward voltage at room temperature, as our p-n junction explainer works through. That is an exponential, not a straight line. In reverse it barely conducts at all. You can still use Ohm's law on the resistor in series with an LED, which is exactly what the worked example below does, but not on the LED.
Transistors. A MOSFET's drain current depends on the gate voltage as well as the drain voltage, and over much of its range it behaves as a current source that ignores the drain voltage. In its fully on state it does act roughly like a small resistor, which data sheets quote as on resistance. That is a useful approximation within a limited range, not Ohm's law in general.
Temperature. A resistor is ohmic only if its temperature stays put. A tungsten filament lamp is the classic counterexample: its resistance when hot is many times its resistance when cold, so its current against voltage curve bends. Copper changes less but still enough to matter. Using the NBS figure of 0.003 93 per degree at 20 °C, a copper winding that heats from 20 °C to 70 °C increases its resistance by a factor of 1 + 0.003 93 × 50, or about 1.20. Motor and transformer designers measure winding resistance hot and cold for exactly this reason.
Superconductors. Below a critical temperature some materials lose all resistance. A current set flowing in a superconducting ring keeps flowing without a driving voltage, which Ohm's law with any finite R cannot describe. Heike Kamerlingh Onnes received the 1913 Nobel Prize in Physics for the low temperature work behind this discovery. In his Nobel lecture he described measuring a thread of painstakingly purified mercury held in fine U shaped capillaries: as the temperature fell, the resistance disappeared, and not gradually but abruptly, at around 4.2 K.
Very high fields, very small devices and gases. Arcs, gas discharge lamps, and current in very thin films or nanoscale wires all depart from simple proportionality. Electrolytes conduct by moving ions and have electrode effects at their boundaries.
Alternating current with reactance. For sinusoidal signals, capacitors and inductors have impedance that depends on frequency. Ohm's law generalises to V = I × Z with complex numbers, and Kirchhoff's laws still hold for the phasors. That is beyond this post, but the bookkeeping is the same.
What are Kirchhoff's current and voltage laws, and why do they hold?
Kirchhoff's current law (KCL)
At any node in a circuit, the sum of currents entering equals the sum of currents leaving. Equivalently, with a sign convention, the algebraic sum of currents at a node is zero. If 1.5 A flows into a junction on one wire and 0.5 A leaves on a second wire, then 1.0 A must leave on the third.
KCL is conservation of charge. Charge cannot appear or disappear, and in an ordinary node (a solder joint, a copper trace) there is nowhere for a meaningful amount of charge to pile up. If it did pile up, the node's voltage would change rapidly and push the charge back out.
Kirchhoff's voltage law (KVL)
Around any closed loop in a circuit, the algebraic sum of the voltages is zero. The rises through sources equal the drops across loads. Walk around a loop from any node, add each voltage change with its sign, and you arrive back at the starting value.
KVL is conservation of energy for a unit charge: if you carry a test charge around a closed loop and it ends where it started, its potential energy must be the same as when it began. That works when the electric field in the region between components can be described by a single valued potential, which is true when there is no changing magnetic flux threading the loop.
The lumped circuit abstraction: where the laws come from and where they stop
MIT's introductory circuits course, 6.002 Circuits and Electronics (Professor Anant Agarwal, with content created with Professor Jeffrey Lang), describes itself as introducing "the fundamentals of the lumped circuit abstraction". Its first two lecture notes set out what they call the lumped matter discipline (LMD): constraints "we impose on ourselves to simplify our analysis". The rate of change of magnetic flux is taken as zero outside the elements, so no stray changing flux links the loops between components, and the rate of change of net charge is taken as zero inside the elements (wires, resistors, sources), so no element gathers charge overall. Under those constraints, the lecture notes say, Maxwell's equations simplify to algebraic KVL and KCL. The notes refer to chapter 1 of the course textbook, Agarwal and Lang's Foundations of Analog and Digital Electronic Circuits, for the full treatment.
A practical corollary, standard in engineering practice, is that signals must change slowly compared with the time it takes an electromagnetic wave to cross the circuit. When the assumptions break, so do the laws:
- High frequencies and long wires. A trace on a circuit board carrying a 5 GHz signal is a noticeable fraction of a wavelength long, and voltages at its two ends differ even with no resistance. Engineers treat it as a transmission line, a structure described by distributed inductance and capacitance per unit length.
- Changing magnetic fields in the loop. Place a wire loop near a transformer and the voltage you measure depends on where you route the voltmeter leads, because the loop encloses changing flux. KVL as a single valued sum no longer applies.
- Charge accumulating. On a capacitor plate charge clearly does pile up, which seems to contradict KCL. The lumped model handles it by drawing a box around the whole capacitor: the current into one terminal equals the current out of the other, with the displacement current inside accounting for the difference.
Our Maxwell's equations explainer covers the field equations that sit underneath. For direct current and for most circuits under a few tens of megahertz on a small board, the lumped abstraction is excellent.
How do series and parallel resistors, voltage dividers and LED resistors work?
Series resistors
Components in series carry the same current, because KCL leaves it nowhere else to go. Their voltages add (KVL), so their resistances add:
R_total = R1 + R2 + R3 + ...
A 100 Ω resistor in series with a 220 Ω resistor behaves as 320 Ω. Series resistance is always larger than the largest single resistor.
Parallel resistors
Components in parallel share the same voltage, because they connect between the same two nodes. Their currents add (KCL), so their conductances add:
1 / R_total = 1 / R1 + 1 / R2 + ...
For two resistors that simplifies to R_total = R1 × R2 / (R1 + R2). A 100 Ω resistor in parallel with 220 Ω gives 22,000 / 320 = 68.75 Ω. Parallel resistance is always smaller than the smallest single resistor. Two equal resistors in parallel give half the value of one.
Voltage dividers
Two resistors in series across a supply split the voltage in proportion to their values. The output taken across R2 is:
V_out = V_in × R2 / (R1 + R2)
This follows directly: the current is V_in / (R1 + R2), and the voltage across R2 is that current times R2. Dividers set reference voltages, scale a battery voltage into an analogue to digital converter's range, bias transistors, and form the basis of potentiometers and many sensors (a thermistor or light dependent resistor paired with a fixed resistor).
A divider's output is only accurate when whatever you connect to it draws little current compared with the divider's own current. The worked example shows how much a load moves it.
Current limiting resistors for LEDs
An LED is a diode. Once forward biased past its knee, a small increase in voltage causes a large increase in current, so connecting an LED straight across a supply with no current control will either do nothing (supply too low) or destroy it (supply too high). The usual fix is a series resistor that sets the current:
R = (V_supply − V_LED) / I_LED
where V_LED is the LED's forward voltage at the desired current, taken from its data sheet. Ohm's law applies to the resistor, and KVL ties the pieces together: the supply voltage equals the resistor drop plus the LED drop.
Worked examples with numbers
All five examples were checked with the Python script in the walkthrough. LED forward voltages and other component figures are illustrative typical values; use the data sheet for your part.
Worked example 1: an LED resistor on a 5 V USB rail
Problem. Light a red indicator LED from a 5 V USB supply at about 10 mA. Assume a forward voltage of 2.0 V at that current (illustrative; red LEDs are commonly around 1.8 to 2.2 V).
Solution.
- KVL around the loop: 5.0 V = V_R + 2.0 V, so the resistor must drop 3.0 V.
- Ohm's law on the resistor: R = 3.0 V / 0.010 A = 300 Ω.
- 300 Ω is not a standard E12 value. Pick the next value up, 330 Ω, so the current errs on the low side.
- Actual current with 330 Ω: I = 3.0 / 330 = 9.09 mA.
- Power in the resistor: P = I² × R = (0.00909)² × 330 = 27.3 mW. Power in the LED: 2.0 V × 9.09 mA = 18.2 mW. Total drawn from the supply: 5 V × 9.09 mA = 45.5 mW.
A common 0.125 W or 0.25 W resistor handles 27 mW easily.
Sensitivity. If the LED's forward voltage is actually 1.8 V, the current is (5 − 1.8) / 330 = 9.70 mA; at 2.2 V it is 8.48 mA. The resistor absorbs the spread because it drops most of the voltage.
The trap. Try the same trick with a blue LED (forward voltage about 3.0 V, illustrative) on a 3.3 V microcontroller pin. The resistor for 10 mA is (3.3 − 3.0) / 0.010 = 30 Ω. Now a forward voltage of 2.8 V gives 16.7 mA and 3.2 V gives 3.33 mA: a fivefold spread. When the resistor drops only a small share of the supply, small changes in the LED move the current a lot. The fix is either a higher supply voltage or a constant current driver. The general lesson: a series resistor regulates current well only when it drops a substantial fraction of the supply.
Worked example 2: a voltage divider into an ADC, and what loading does
Problem. Measure a 12 V battery with a microcontroller whose analogue input accepts 0 to 3.3 V. Use R1 = 27 kΩ on top and R2 = 10 kΩ on the bottom.
Solution.
- V_out = 12 × 10 / (27 + 10) = 12 × 10 / 37 = 3.243 V. That stays just under 3.3 V at 12 V. (A real lead acid battery charges to around 14 V, so in practice you would choose a larger ratio and add input protection; the numbers here are kept round for clarity.)
- Divider current: I = 12 V / 37 kΩ = 324.3 µA.
- Divider power: P = 12² / 37,000 = 3.89 mW, drawn continuously.
Loading. Suppose the ADC input looks like 100 kΩ to ground. It sits in parallel with R2: 10 kΩ ∥ 100 kΩ = 10 × 100 / 110 = 9.091 kΩ. The output becomes 12 × 9.091 / (27 + 9.091) = 3.023 V, about 7 percent low. The Thevenin equivalent explains why: seen from the output, the divider is a 3.243 V source behind R1 ∥ R2 = 27 × 10 / 37 = 7.297 kΩ. Any load that is not much larger than 7.3 kΩ will pull the output down.
The trade off. Larger resistors waste less current but are more sensitive to loading and to noise. A lithium ion cell at 4.2 V across a 1 MΩ plus 1 MΩ divider draws 2.1 µA. The same cell across 10 kΩ plus 10 kΩ draws 210 µA, which over a year is about 1,840 mAh, roughly half a typical phone battery. That is why battery powered products use high value dividers, a buffer amplifier, or a transistor that switches the divider off between readings.
Worked example 3: a two loop circuit solved with KCL and KVL
Problem. Two sources share a load. A 12 V source V1 feeds node A through R1 = 4 Ω. A 6 V source V2 feeds the same node A through R2 = 2 Ω. A load resistor R3 = 6 Ω connects node A to ground. Both sources have their negative terminals at ground. Find every current and check the power balance.
This is the sort of circuit you get when two power supplies of different voltages are tied together through wiring resistance, or a charger and a battery share a load.
Method 1: nodal analysis with KCL. Call the unknown voltage at node A V_A. Write KCL at node A, with every current written as leaving the node:
(V_A − 12) / 4 + (V_A − 6) / 2 + V_A / 6 = 0
Multiply every term by 12 to clear the fractions:
3(V_A − 12) + 6(V_A − 6) + 2 V_A = 0
3 V_A − 36 + 6 V_A − 36 + 2 V_A = 0
11 V_A = 72, so V_A = 6.545 V.
Now each current follows from Ohm's law:
- Current from V1 into node A through R1: I1 = (12 − 6.545) / 4 = 1.364 A.
- Current from V2 into node A through R2: I2 = (6 − 6.545) / 2 = -0.273 A. The negative sign means current actually flows from node A back into V2's positive terminal. The 12 V source is charging the 6 V source.
- Current down through the load: I3 = 6.545 / 6 = 1.091 A.
KCL check: I1 + I2 = 1.364 − 0.273 = 1.091 A = I3.
Method 2: mesh analysis with KVL. Define clockwise loop current Ia in the left loop (V1, R1, R3) and Ib in the right loop (R3, R2, V2), with R3 shared. KVL around each loop:
- Left loop: 12 = 4 Ia + 6 (Ia − Ib), which is 10 Ia − 6 Ib = 12.
- Right loop: walking clockwise up through R3, through R2 and down through V2 from its positive terminal gives 0 = 6 (Ib − Ia) + 2 Ib + 6, which is -6 Ia + 8 Ib = -6.
Solving the pair: from the second equation, Ib = (6 Ia − 6) / 8. Substituting into the first: 10 Ia − 6 (6 Ia − 6) / 8 = 12, so 80 Ia − 36 Ia + 36 = 96, which gives 44 Ia = 60 and Ia = 1.364 A. Then Ib = (8.182 − 6) / 8 = 0.273 A. The current down through R3 is Ia − Ib = 1.091 A. Same answer, as it must be.
KVL check. Left loop: 12 − 1.364 × 4 − 1.091 × 6 = 12 − 5.455 − 6.545 = 0. Right loop: 6 − (-0.273) × 2 − 1.091 × 6 = 6 + 0.545 − 6.545 = 0.
Power balance.
| Element | Calculation | Power |
|---|---|---|
| V1 delivers | 12 V × 1.364 A | 16.364 W |
| V2 absorbs (it is being charged) | 6 V × 0.273 A | 1.636 W |
| R1 dissipates | 1.364² × 4 | 7.438 W |
| R2 dissipates | 0.273² × 2 | 0.149 W |
| R3 dissipates | 1.091² × 6 | 7.140 W |
| Total absorbed | 1.636 + 7.438 + 0.149 + 7.140 | 16.364 W |
Energy in equals energy out, which is KVL and KCL together expressing conservation of energy. The practical lesson is real: parallel supplies at different voltages fight. Equipment that parallels supplies uses diodes, ideal diode controllers or current sharing circuits so that one supply cannot drive current backwards into another.
Worked example 4: power dissipation in a USB cable
Problem. Estimate the voltage drop and heat in a 1 m USB Type-C cable whose two power conductors (supply and return) each have a 0.2 mm² copper cross section, at several USB Power Delivery operating points.
Solution.
- Resistance of one 1 m conductor: R = ρ × L / A = 0.017 241 Ω mm²/m × 1 m / 0.2 mm² = 0.0862 Ω, or 86.2 mΩ.
- The current goes out on one conductor and back on the other, so the round trip is 172.4 mΩ. (Connector contact resistance adds more in practice; we ignore it here.)
- Apply V = I × R and P = I² × R at each operating point:
| Operating point | Power delivered | Cable drop | Cable loss | Loss as share of power |
|---|---|---|---|---|
| 5 V, 3 A | 15 W | 0.517 V | 1.55 W | 10.3 percent |
| 20 V, 5 A | 100 W | 0.862 V | 4.31 W | 4.3 percent |
| 20 V, 12 A (hypothetical) | 240 W | 2.069 V | 24.83 W | 10.3 percent |
| 48 V, 5 A | 240 W | 0.862 V | 4.31 W | 1.8 percent |
The hypothetical 12 A row shows why the USB specification did not simply push more current: at the same power, current at 20 V is 2.4 times the current at 48 V, so cable loss is 2.4² or about 5.8 times higher. USB-IF says Revision 3.1 introduced 28 V, 36 V and 48 V fixed voltages to reach 140 W, 180 W and 240 W, and that before this update USB PD was limited to 100 W using 20 V and 5 A cables. The arithmetic is the reason.
Worked example 5: data centre rack distribution at 12 V and 48 V
Problem. A rack draws 15 kW of IT load. Its busbar and connectors have a total resistance of 0.1 mΩ (an illustrative figure). Compare distribution at 12 V and at 48 V.
Solution.
- At 12 V: I = 15,000 / 12 = 1,250 A. Loss = 1,250² × 0.0001 = 156.2 W.
- At 48 V: I = 15,000 / 48 = 312.5 A. Loss = 312.5² × 0.0001 = 9.8 W.
Four times the voltage means a quarter of the current and one sixteenth of the I² × R loss, in the same copper. Or keep the loss constant and use a sixteenth of the copper cross section. The Open Compute Project's Open Rack V3 family includes a 48 V power supply specification, a power shelf specification and a battery backup unit (BBU) shelf specification, and the project lists 48 V onboard power solution requirements, which reflects how far this reasoning has spread in hyperscale designs.
How do these laws scale to real systems?
USB power budgets
A USB port is a voltage source with a current limit. The device and the charger agree on a voltage and maximum current, and the device must stay within it. USB Power Delivery is the negotiation protocol: USB-IF describes it as allowing low power devices such as headsets to request only what they need, while full featured Type-C cables carry up to 240 W under Revision 3.1 (announced in 2021).
Ohm's law shows up in three places:
- Cable drop. As worked example 4 showed, a few hundred milliohms of round trip resistance cost hundreds of millivolts at a few amps. A phone that asks for 9 V at the plug may see less at its connector, and its charging circuit must cope.
- Cable ratings. 5 A operation needs cables built for it. USB-IF says the USB Type-C specification was updated (to Release 2.1) to define the cable requirements for 240 W. A source that pushed 5 A through a cable designed for less would heat it by I² × R, which is why the negotiation takes the cable into account rather than only the device.
- Power budgets in hubs. A bus powered hub has a fixed input budget, and KCL says the currents drawn by the devices downstream add up at its input. Exceed it and the voltage sags, or the hub's protection cuts a port.
Power over Ethernet
Power over Ethernet carries direct current on the same twisted pairs as the data. IEEE 802.3bt, approved on 27 September 2018 and published on 31 January 2019, increased the power available to a powered device by using all four pairs of the cable, according to IEEE. Spreading the current over more pairs puts more copper in parallel, which lowers the effective resistance and the I² × R loss: two equal conductors in parallel have half the resistance of one, so the same total current loses half as much power. For a long cable run in a warm ceiling space, that heat matters, and it is also why installers pay attention to cable bundles carrying power.
Data centre power distribution
A data centre's electrical design is a chain of conversions, each with Ohm's law losses in its conductors and each subject to KCL at every distribution point. Typical figures (illustrative, and they vary widely):
- Utility feed at medium voltage, stepped down by transformers to low voltage three phase.
- An uninterruptible power supply and power distribution units feeding racks.
- Rack power shelves converting alternating current to a direct current bus, 12 V in older designs and increasingly 48 V.
- Point of load converters on each board stepping 48 V or 12 V down to around 1 V for processor cores, which can draw hundreds of amps each.
At each stage, the designer checks two things. KCL: the sum of the branch currents at a panel or busbar must stay below the upstream breaker and conductor ratings. Ohm's law: the voltage drop along each run must stay within what the equipment tolerates, and the I² × R heat must be removed by cooling. The 1 V, several hundred amp rail on a processor is the extreme case, which is why those converters sit millimetres from the chip.
Phone battery drain
A phone is a small, constantly reconfigured circuit. Its power management integrated circuit (PMIC) splits the battery's roughly 3.6 to 4.4 V into a dozen or more rails for the processor, memory, radios and display. KCL says the battery current is the sum of every rail's input current, and power conservation (minus converter losses) sets each one.
Illustrative arithmetic for a 4,000 mAh battery at a nominal 3.85 V:
- Energy: 4.0 Ah × 3.85 V = 15.4 Wh.
- Screen on, moderate use at an average 1.5 W: 15.4 / 1.5 = about 10.3 hours.
- Idle with screen off at an average 50 mW: 15.4 / 0.05 = about 308 hours, or nearly 13 days.
- Ideal charge at 20 W with no losses: 15.4 / 20 = 0.77 hours. Real charging is slower because lithium ion cells switch from constant current to constant voltage as they fill, and because the charger and battery dissipate heat.
The gap between 50 mW and 1.5 W shows why software matters so much to battery life: a background task that keeps a radio or the processor awake can multiply average power many times over.
The everyday quantity table
The values below are typical and illustrative. They show orders of magnitude, not a specification for any product.
| Quantity | Symbol | SI unit | Key formula | Phone (typical) | Laptop (typical) | Server rack (typical) |
|---|---|---|---|---|---|---|
| Voltage | V | volt (V = W/A) | V = I × R | 3.6 to 4.4 V battery; 5 to 9 V charging | 11 to 20 V battery; 20 V USB-C input | 230 V or 400 V AC feed; 12 V or 48 V DC bus |
| Current | I | ampere (A) | I = V / R | 0.01 to 1 A from battery; up to about 3 A when charging | 1 to 5 A at the input | tens of amps per AC phase; hundreds of amps on a 48 V bus |
| Resistance | R | ohm (Ω = V/A) | R = ρ × L / A | milliohm traces and battery internal resistance | milliohm power paths; kilohm sense dividers | tenths of a milliohm in busbars |
| Power | P | watt (W = J/s) | P = V × I = I² × R | 0.05 W idle to a few W under load | 5 to 65 W, more for gaming systems | 5 to 40 kW per rack, more for AI clusters |
| Charge | Q | coulomb (C = A s) | Q = I × t | battery about 14,000 to 18,000 C | battery about 200,000 C | not usually quoted |
| Energy | E | joule (J); also Wh | E = P × t | 15 to 20 Wh battery | 50 to 100 Wh battery | measured in kWh per day |
| Conductance | G | siemens (S = A/V) | G = 1 / R | rarely quoted | rarely quoted | rarely quoted |
The charge row converts mAh to coulombs: 1 mAh is 3.6 C, so 4,000 mAh is 14,400 C.
Which circuit analysis method should you use?
| Method | Built on | Best for | Unknowns you solve for | Watch out for |
|---|---|---|---|---|
| Series and parallel reduction | Ohm's law, KCL, KVL | Ladder networks you can collapse step by step | One at a time | Bridges and multiple sources do not reduce this way |
| Nodal analysis | KCL at each node, Ohm's law for currents | Circuits with many parallel branches; what SPICE uses internally | Node voltages (one fewer than the number of nodes) | Voltage sources between two non ground nodes need a supernode |
| Mesh analysis | KVL around each loop | Planar circuits with few loops and many series elements | Loop currents | Only works directly for planar circuits; current sources need a supermesh |
| Superposition | Linearity of Ohm's law | Seeing each source's contribution separately | Repeat the analysis once per source | Does not apply to power directly (power is not linear); not valid with diodes |
| Thevenin and Norton equivalents | Linearity | Studying what a load sees, such as divider loading | Open circuit voltage and equivalent resistance | Only valid for linear parts of the circuit |
| Simulation (SPICE) | Modified nodal analysis plus device models | Anything with diodes, transistors, time or frequency behaviour | Everything, numerically | Results are only as good as the models and the netlist |
Walkthrough: check the worked examples with Python and SPICE
The arithmetic in this post was checked with the script below. Run it yourself, change the numbers, and compare with your own hand calculations. Nothing here touches hardware.
Step 1: set up an isolated Python environment
python3 -m venv ohm-env
source ohm-env/bin/activate
python -m pip install --upgrade pip
python -m pip install "numpy==2.0.2"
python -m pip freeze > requirements-lock.txt
Pinning numpy to an exact version and saving the frozen list means a rerun months later uses the same library, which matters when you keep calculation scripts as engineering records. We ran the script below with numpy 2.0.2 on Python 3.9; on a newer Python you can pin a newer numpy release, as long as you record which one.
Step 2: the verification script
Save this as ohm_check.py:
import numpy as np
RHO_CU = 1.7241e-8 # ohm metre at 20 C, NBS Handbook 100 (IACS)
ALPHA_CU = 0.00393 # per degree C at 20 C, NBS Handbook 100
def led_resistor(v_supply, v_led, i_led):
return (v_supply - v_led) / i_led
def divider(v_in, r1, r2, r_load=None):
if r_load is not None:
r2 = r2 * r_load / (r2 + r_load)
return v_in * r2 / (r1 + r2)
def two_loop_nodal(v1, r1, v2, r2, r3):
# KCL at node A as a 1x1 conductance matrix G * v = i
G = np.array([[1/r1 + 1/r2 + 1/r3]])
i = np.array([v1/r1 + v2/r2])
va = np.linalg.solve(G, i)[0]
return va, (v1 - va)/r1, (v2 - va)/r2, va/r3
def two_loop_mesh(v1, r1, v2, r2, r3):
# KVL around each loop: A * [ia, ib] = b
A = np.array([[r1 + r3, -r3], [-r3, r2 + r3]])
b = np.array([v1, -v2])
return np.linalg.solve(A, b)
print("LED R:", led_resistor(5.0, 2.0, 0.010), "ohm")
i = (5.0 - 2.0) / 330
print(f"With 330 ohm: {i*1e3:.2f} mA, resistor {i*i*330*1e3:.1f} mW")
print(f"Divider unloaded: {divider(12, 27e3, 10e3):.3f} V")
print(f"Divider with 100k load: {divider(12, 27e3, 10e3, 100e3):.3f} V")
va, i1, i2, i3 = two_loop_nodal(12, 4, 6, 2, 6)
print(f"Node A {va:.3f} V, I1 {i1:.3f} A, I2 {i2:.3f} A, I3 {i3:.3f} A")
ia, ib = two_loop_mesh(12, 4, 6, 2, 6)
print(f"Mesh Ia {ia:.3f} A, Ib {ib:.3f} A, through R3 {ia - ib:.3f} A")
p_in = 12 * i1
p_out = -6 * i2 + i1**2 * 4 + i2**2 * 2 + i3**2 * 6
print(f"Power in {p_in:.3f} W, power absorbed {p_out:.3f} W")
r_rt = 2 * RHO_CU * 1.0 / 0.2e-6
for v, amps in [(5, 3), (20, 5), (48, 5)]:
print(f"{v} V at {amps} A: drop {amps*r_rt:.3f} V, loss {amps**2*r_rt:.2f} W")
print("Copper 20 C to 70 C factor:", round(1 + ALPHA_CU * 50, 4))
Step 3: run it and compare
python ohm_check.py
You should see an LED resistor of 300 Ω, 9.09 mA through 330 Ω, a divider output of 3.243 V unloaded and 3.023 V loaded, a node voltage of 6.545 V with currents of 1.364 A, -0.273 A and 1.091 A, mesh currents of 1.364 A and 0.273 A, power in and out both 16.364 W, cable losses of 1.55 W, 4.31 W and 4.31 W, and a copper temperature factor of 1.1965. If a number disagrees, your circuit description and the script disagree; find out which before trusting either.
Step 4: confirm the two loop circuit in SPICE
SPICE simulators solve circuits with modified nodal analysis, which is KCL written as a matrix with extra rows for voltage sources. ngspice is an open source simulator packaged by most Linux distributions and by Homebrew on macOS.
# Debian or Ubuntu
sudo apt install ngspice
# macOS with Homebrew
brew install ngspice
Save this netlist as two_loop.cir:
* Two loop example: V1 12 V via 4 ohm, V2 6 V via 2 ohm, 6 ohm load
V1 n1 0 DC 12
R1 n1 a 4
V2 n2 0 DC 6
R2 n2 a 2
R3 a 0 6
.op
.end
Run it in batch mode:
ngspice -b two_loop.cir
The operating point report should show v(a) at about 6.545 V. SPICE reports the current through each voltage source as flowing into its positive terminal, so v1#branch reads about -1.364 A (V1 is delivering current) and v2#branch reads about +0.273 A (current is flowing into V2, which is being charged). Those signs are a frequent source of confusion; they match the hand solution once you know the convention.
Step 5: extend it
Change R2 to 0.5 Ω and rerun. The 12 V supply now pushes more current back into the 6 V source. Add a diode in series with V2 (in SPICE, a D element with a .model line) and the reverse current disappears, which is the ideal diode idea from worked example 3. The diode is the first non ohmic element you add, and the hand method stops being linear algebra; the simulator iterates instead.
The software that manages power: an honest bridge
Ohm's and Kirchhoff's laws are physics, and Safeguard does not do physics. Its models are single purpose security models for software, it does not analyse circuits, and it does not scan firmware images or hardware. The bridge is narrower and real: the power in phones, laptops, USB chargers and server racks is increasingly managed by software. USB Power Delivery negotiation runs in controller firmware, a phone's PMIC is configured by its operating system, and rack power shelves and battery backup units report telemetry to management services that are ordinary web applications with ordinary open source dependency trees. Where Safeguard can help is the software your team builds around such systems, for example a power monitoring dashboard, a lab automation script written in Python, or the container image for a facility telemetry service: scanning those repositories, images and SBOM files for known vulnerable open source components and, when a fixed version exists, proposing the upgrade.
Power management is software now: charger firmware toolchains, PMIC configuration utilities, rack power shelf controllers and the dashboards that watch them all ship open source components, and a rebuilt monitoring service pulls its dependencies again on every build. The fit is indirect for the circuits themselves, but for the open source code you build and ship around them, the same dependency hygiene applies, and the Gold section further down shows how to close the gap when a fix exists or does not yet.
Common mistakes
- Applying Ohm's law to an LED or diode. The LED's voltage is set by its junction, not by a fixed resistance. Use Ohm's law on the series resistor and KVL to connect the two.
- Forgetting the power rating. A resistor that has the right value but too low a wattage rating will overheat. Always compute P = I² × R and choose a part with comfortable margin.
- Mixing milli and kilo. 5 V across 1 kΩ is 5 mA, not 5 A. Writing units at every step catches most slips.
- Treating mAh as energy. A 10,000 mAh power bank at 3.7 V holds 37 Wh, not "10,000" of anything comparable with a laptop's watt hours. Convert to watt hours before comparing.
- Ignoring divider loading. A high value divider feeding a low impedance input gives a reading that is quietly wrong. Compare the load with the divider's Thevenin resistance, or buffer it.
- Losing track of signs in KVL. Pick a direction for each loop and stick to it. A negative answer is not an error; it means the current flows opposite to the direction you assumed.
- Assuming current is "used up". Current is the same going in and coming out of a load (KCL). Energy is what the load converts.
- Forgetting temperature. A resistance measured cold can be 20 percent lower than its hot value in copper windings, and much more in a lamp filament.
- Paralleling supplies without protection. As worked example 3 shows, the higher voltage supply drives current into the lower one.
- Using KVL at high frequency without thinking. On a long trace or near a transformer, the lumped assumptions break; treat the trace as a transmission line or account for the changing flux.
- Trusting a simulation blindly. A SPICE result depends on the netlist and models. Check one or two node voltages by hand, as the walkthrough does.
FAQ
What is Ohm's law in simple terms?
The current through a resistor equals the voltage across it divided by its resistance: I = V / R. Double the voltage and the current doubles; double the resistance and the current halves. It holds for metal wires and resistors at a steady temperature, and not for diodes, LEDs or transistors.
What is the formula for Ohm's law?
V = I × R, where V is voltage in volts, I is current in amperes and R is resistance in ohms. Rearranged, I = V / R and R = V / I. Combined with P = V × I, it also gives P = I² × R and P = V² / R for the power in a resistor.
What are Kirchhoff's two laws?
The current law says the currents flowing into any junction equal the currents flowing out. The voltage law says the voltages around any closed loop add up to zero. The first follows from conservation of charge and the second from conservation of energy, under the lumped circuit assumptions taught in introductory courses such as MIT 6.002.
Why does Ohm's law not apply to diodes?
A diode's current grows exponentially with the voltage across it, roughly tenfold for every 60 mV in a silicon diode at room temperature, and it hardly conducts in reverse. A plot of current against voltage is a sharp curve, not a straight line through the origin, so there is no single resistance that describes it.
How do I calculate the resistor for an LED?
Subtract the LED's forward voltage from the supply voltage and divide by the current you want. For a 5 V supply, a 2.0 V red LED and 10 mA, R = (5 − 2) / 0.01 = 300 Ω; round up to a standard 330 Ω. Check the resistor's power rating: here it dissipates about 27 mW.
How do resistors in series and parallel add?
In series, resistances add: 100 Ω plus 220 Ω is 320 Ω. In parallel, conductances add, so 1 / R_total = 1 / R1 + 1 / R2; 100 Ω in parallel with 220 Ω gives 68.75 Ω. Series is always more than the largest; parallel is always less than the smallest.
When do Kirchhoff's laws fail?
They fail when the lumped circuit assumptions fail: when signals change fast enough that the circuit is a noticeable fraction of a wavelength long, when changing magnetic flux threads a loop outside the components, or when charge accumulates in places the model treats as wires. Engineers then use transmission line theory or Maxwell's equations directly.
How is the ampere defined today?
Since 20 May 2019, the ampere is defined by fixing the elementary charge at exactly 1.602 176 634 × 10⁻¹⁹ coulomb, with the coulomb equal to one ampere second. One ampere is therefore about 6.24 × 10¹⁸ elementary charges per second. The earlier definition, based on the force between parallel wires, was abrogated by the 26th CGPM in 2018.
Why do data centres use 48 V instead of 12 V?
For the same power, four times the voltage needs a quarter of the current, and conductor loss scales with current squared, so loss falls to one sixteenth. At 15 kW, a 12 V bus carries 1,250 A while a 48 V bus carries 312.5 A. The Open Compute Project publishes Open Rack V3 specifications built around 48 V power shelves.
Who discovered Ohm's law?
Georg Simon Ohm (1789 to 1854), a German physicist and teacher, published it in Die galvanische Kette, mathematisch bearbeitet in Berlin in 1827. The book treats the galvanic circuit mathematically and states that current is proportional to the driving voltage and inversely proportional to the circuit's resistance. The SI unit of resistance, the ohm, is named after him.
Fix it without waiting for upstream
Whatever the vulnerability, most of the risk sits in two gaps. The first is the time between a fix being published and that fix actually running in your production builds. The second, and worse, is the time before any fix exists at all, while a maintainer works out a patch and a release schedule. Waiting through both gaps is a habit, not a requirement. Safeguard gives teams three ways to close them.
1. Autonomous remediation: pull requests, not tickets
When a fixed version exists, Safeguard's Griffin models open a tested, policy gated pull request that moves the affected dependency to the safe version. You can run it on one repository or in bulk across every project that carries the vulnerable version. Remediation covers eight categories, including dependencies, licenses, security posture and findings. Reachability analysis ranks the vulnerable code paths your application actually calls first, so the first pull requests you merge are the ones that matter most. Autonomous remediation ships switched off, with every category set to Manual, so your team decides how much runs on its own and what still needs a human approval.
2. Gold Open Source: the safe version in seconds, free
gold.safeguard.sh is free and needs no login. Search any CVE or package to see affected and fixed versions, CVSS, EPSS, CISA KEV status and a recommended safe version, or use the "Am I affected?" checker. The same data is available through a free read API, README status badges and RSS threat feeds. The safeguard-sh/gold-scan-action GitHub Action can fail a build on a known exploited vulnerability, on any known vulnerability, or never, so a version you have just removed cannot quietly come back in next week's merge.
3. Gold Registry: start from components that are already fixed
registry.safeguard.sh provides hardened, drop in replacements for upstream packages and container images. Every Gold artifact is held continuously to zero exploitable critical or high CVEs, zero malware and a completed license check, with SLSA L3 or higher provenance, a Sigstore signature and a public evidence page you can hand to an auditor. An artifact loses its Gold badge if it regresses. Teams can point their own package directory at the registry so hardened equivalents resolve without changing how developers install anything.
When upstream has no fix yet, or will not ship one, Safeguard first works to get the fix accepted upstream. If the issue is severe or upstream will not move, Safeguard builds a fork, fixes the vulnerability there and publishes a hardened Gold build, so you are not stuck on a maintainer's release schedule. You can also request a hardened, compatibility tested build of a specific package. This fork and patch flow is in early access today, so ask which packages it covers before you plan around it.
| Your situation | What to use |
|---|---|
| A fixed version exists | Autonomous remediation opens the upgrade pull request; Gold Open Source confirms the safe version |
| You need to know today whether you are affected | Gold Open Source lookup and "Am I affected?" checker, free and without login |
| You want vulnerable versions to stop shipping | The Gold scan GitHub Action in CI, plus Safeguard policies and gates |
| Upstream has no fix yet, or will not ship one | A custom Gold request; fork and patch (early access) |
| You want to start clean on new projects | Pull hardened components and images from Gold Registry |
One honest limit: when the vulnerable code lives in a vendor appliance, a hosted service or an operating system runtime you do not build yourself, the fix still has to come from that vendor or distribution. The steps above apply to the open source dependencies and container images you build and ship, which is where most teams carry the largest and least tracked share of their exposure.
See how Safeguard would help
None of these demos involve circuit analysis; they show the software side described in the bridge above.
The first demo is a real Safeguard CLI session: it installs the CLI, opens the interactive terminal and asks it to fix a lodash CVE in a repository. It reads the finding and advisory, asks before each command, edits package.json to lodash 4.17.21, runs npm install and npm test with approval, prints a summary and pushes nothing. The same flow applies to a power monitoring dashboard or a lab automation tool your team maintains: scan the repository, then let the assistant propose the dependency upgrade under your approval.
Click through it at your own pace, or open it full screen.
The second demo sets up the Safeguard runner on your own machine, approves it with its device code and then scans from the terminal. That suits teams that keep calculation scripts, test bench software or build tooling on their own hardware and want the scan to run where the code lives.
Click through it at your own pace, or open it full screen.
The third demo connects Claude to the Safeguard MCP server with OAuth and lets you choose which tools Claude can use. For an engineer who already uses Claude while writing a test harness or a telemetry service, it puts dependency findings in the same conversation, limited to the tools you allow.
Click through it at your own pace, or open it full screen.
To try it on your own repositories, download Safeguard and follow the CLI documentation.
Quick check
A 9 V battery drives an LED with a 1.9 V forward voltage through a resistor. What resistor gives 15 mA, and how much power does it dissipate?
R = (9 − 1.9) / 0.015 = 473 Ω; the next standard E12 value up is 560 Ω (470 Ω would run slightly above 15 mA). With 560 Ω the current is 7.1 / 560 = 12.7 mA and the resistor dissipates about 0.0127² × 560 = 90 mW, so a 0.25 W part is fine.
Three currents meet at a node: 2.0 A flows in on one wire and 0.7 A flows out on another. What happens on the third wire?
By Kirchhoff's current law, 2.0 = 0.7 + I, so 1.3 A flows out on the third wire.
Sources
- NIST, Special Publication 330 (2019): The International System of Units (SI), PDF
- NIST, SI units reference (Physical Measurement Laboratory)
- NIST, SI redefinition: the ampere
- NIST CODATA, elementary charge
- NIST CODATA, von Klitzing constant
- NIST CODATA, Josephson constant
- BIPM, The SI Brochure
- National Bureau of Standards, Handbook 100: Copper Wire Tables (PDF)
- MIT OpenCourseWare, 6.002 Circuits and Electronics (Spring 2007)
- Internet Archive, Ohm, Die galvanische Kette (Berlin, 1827), Smithsonian Libraries copy
- Internet Archive, Kirchhoff, Gesammelte Abhandlungen (Leipzig, 1882)
- MIT OpenCourseWare, 6.002 Lecture 1 notes (Agarwal and Lang), PDF
- MIT OpenCourseWare, 6.002 Lecture 2 notes (Agarwal and Lang), PDF
- Crossref, metadata for Kirchhoff (1845), Annalen der Physik 140(4), 497 to 514
- Crossref, metadata for Kirchhoff (1847), Annalen der Physik 148, 497 to 508
- NobelPrize.org, The Nobel Prize in Physics 1913
- Heike Kamerlingh Onnes, Nobel Lecture, 11 December 1913 (PDF)
- NobelPrize.org, The Nobel Prize in Physics 1985
- USB-IF, USB Charger (USB Power Delivery)
- IEEE Standards Association, IEEE 802.3bt-2018
- Open Compute Project, Open Rack specifications and designs
Last reviewed: 23 October 2026.