Electrical Engineering Essentials for Software Engineers
Circuit Analysis
Reading the Map of a Circuit
Think of a circuit as a tiny city with roads and traffic. To understand what's happening, you need a map and some rules of the road. Circuit analysis gives us those rules. It's how we predict the flow of electricity—specifically, the voltage and current—at any point in a circuit. For software engineers working with hardware, knowing these basics is like knowing how the operating system manages memory. It helps you understand the environment your code lives in.
The Fundamental Rule: Ohm's Law
The most fundamental rule is Ohm's Law. It describes the relationship between three key quantities:
- Voltage (V): The electrical pressure pushing charges along. Measured in volts (V).
- Current (I): The rate of flow of electric charge. Measured in amperes (A), or amps.
- Resistance (R): The opposition to the flow of current. Measured in ohms (Ω).
Ohm's Law states that the voltage across a component is directly proportional to the current flowing through it. Imagine water flowing through a pipe. Voltage is the water pressure, current is the flow rate, and resistance is how narrow the pipe is. More pressure (voltage) pushes more water (current) through. A narrower pipe (higher resistance) restricts the flow.
This simple relationship is the bedrock of most circuit calculations. If you connect a 330Ω resistor to a 5V power source, you can predict the current that will flow.
Current , or 15 milliamperes (mA).
Kirchhoff's Laws of Conservation
When circuits get more complex than a single loop, Ohm's Law isn't quite enough. We need two more principles, developed by Gustav Kirchhoff in the 1840s. Both are based on the simple idea of conservation.
Node
noun
A point in a circuit where two or more components connect. It's like an intersection for electrical traffic.
First is Kirchhoff's Current Law (KCL). It states that the total current entering a node must equal the total current leaving it. This is because charge can't be created or destroyed at a junction. Whatever flows in must flow out.
Second is Kirchhoff's Voltage Law (KVL). This law applies to any closed loop in a circuit. It says that the sum of all voltage drops and gains around any closed loop must be zero. Think of it like walking up and down a hill. If you start and end at the same elevation, your total climb minus your total descent is zero. In a circuit loop, the voltage provided by a source (like a battery) is "spent" as it drops across components like resistors.
Series and Parallel
Components can be connected in two basic ways: in series or in parallel. Understanding the difference is key to analyzing a circuit.
In a series circuit, components are connected end-to-end, forming a single path for the current. It's like cars on a one-lane road. The same current flows through every component.
The total resistance in a series circuit is simply the sum of the individual resistances: .
In a parallel circuit, components are connected across the same two nodes, creating multiple paths for the current. It's like a river splitting into several streams. The voltage across each component is the same, but the total current splits among the branches.
Calculating the total resistance in parallel is a bit more involved. The reciprocal of the total resistance is the sum of the reciprocals of each resistance.
Armed with Ohm's law, Kirchhoff's laws, and the rules for series and parallel circuits, you can analyze the currents and voltages in a wide variety of circuits. This is the foundation for understanding everything from simple LED circuits to the complex logic inside a CPU.
What is the fundamental relationship described by Ohm's Law?
If a 9V battery is connected to a circuit with a total resistance of 300Ω, what is the current flowing through the circuit?

