## Section6.1Crash Course in Electronics

¶Although it is not necessary to be an electrical engineer to understand how logic gates work, some basic concepts will help. This section provides a very brief overview of the fundamental concepts of electronic circuits. We begin with two definitions.

- Current
The movement of electrical charge. Electrical charge is measured in coulombs. A flow of one coulomb per second is defined as one ampere, often abbreviated as amp. Current only flows in a closed path through an electrical circuit.

- Voltage
The difference in electrical potential between two points in an electrical circuit. One volt is defined as the potential difference between two points on a conductor when one ampere of current flowing through the conductor dissipates one watt of power.

The electronic circuits that make up a computer are constructed from:

A power source that provides the electrical power.

Passive elements that control current flow and voltage levels.

Active elements that switch between various combinations of the power source, passive elements, and other active elements.

We will look at how each of these three categories of electronic components behaves.

### Subsection6.1.1Power Supplies and Batteries

In almost all countries, the electrical power is supplied to our homes, schools, and businesses in the form of Alternating Current (AC). A plot of the magnitude of the voltage versus time shows a sinusoidal wave shape. Computer circuits use direct current (DC) power, which does not vary over time. A power supply is used to convert AC power to DC as shown in Figure 6.1.1.

As you probably know, batteries also provide DC power.

Computer circuits distinguish between two different voltage levels to provide logical \(0\) and \(1\text{.}\) For example, logical \(0\) may be represented by \(0.0\) volts DC and logical \(1\) by \(+2.5\) volts DC. Or the reverse may be used, \(+2.5\) volts as logical \(0\) and \(0.0\) volts as logical \(1\text{.}\) The only requirement is that the hardware design be consistent. Fortunately, programmers do not need to be concerned about the actual voltages used.

Electrical engineers typically think of the AC characteristics of a circuit in terms of an ongoing sinusoidal voltage. Although DC power is used, computer circuits are constantly switching between the two voltage levels. Computer hardware engineers need to consider circuit element time characteristics when the voltage is suddenly switched from one level to another. It is this *transient* behavior that will be described in the following sections.

### Subsection6.1.2Resistors, Capacitors, and Inductors

¶All electrical circuits have resistance, capacitance, and inductance.

- Resistance
Dissipates power. The electric energy is transformed into heat.

- Capacitance
Stores energy in an electric field. Voltage across a capacitance cannot change instantaneously.

- Inductance
Stores energy in a magnetic field. Current through an inductance cannot change instantaneously.

All three of these electro-magnetic properties are distributed throughout any electronic circuit. In computer circuits they tend to limit the speed at which the circuit can operate and to consume power, collectively known as *impedance*. Analyzing their effects can be quite complicated and is beyond the scope of this book. Instead, to get a feel for the effects of each of these properties, we will consider the electronic devices that are used to add one of these properties to a specific location in a circuit; namely, resistors, capacitors, and inductors. Each of these circuit devices has a different relationship between the voltage difference across the device and the current flowing through it.

A *resistor* irreversibly transforms electrical energy into heat. It does not store energy. The relationship between voltage and current for a resistor is given by the equation

where \(v\) is the voltage difference across the resistor at time \(t\text{,}\) \(i\) is the current flowing through it at time \(t\text{,}\) and \(R\) is the value of the resistor. Resistor values are specified in *ohms*. The circuit shown in Figure 6.1.2 shows two resistors connected in series through a switch to a battery.

The battery supplies \(2.5\) volts. The Greek letter \(\Omega\) is used to indicate ohms, and \(\mathrm{k}\Omega\) indicates \(10^{3}\) ohms. Since current can only flow in a closed path, none flows until the switch is closed.

Both resistors are in the same path, so when the switch is closed the same current flows through each of them. The resistors are said to be connected in *series*. The total resistance in the path is their sum:

The amount of current can be determined from the application of Equation (6.1.1). Solving for \(i\text{,}\)

where “ma” means “milliamps.”

We can now use Equation (6.1.1) to determine the voltage difference between points A and B.

Similarly, the voltage difference between points B and C is

Figure 6.1.3 shows the same two resistors connected in parallel.

In this case, the voltage across the two resistors is the same: \(2.5\) volts when the switch is closed. The current in each one depends upon its resistance. Thus,

and

The total current, \(i_t\text{,}\) supplied by the battery when the switch is closed is divided at point A to supply both the resistors. It must equal the sum of the two currents through the resistors,

A *capacitor* stores energy in the form of an electric field. It reacts slowly to voltage changes, requiring time for the electric field to build. The voltage across a capacitor changes with time according to the equation

where C is the value of the capacitor in farads.

Figure 6.1.4 shows a \(1.0\) microfarad capacitor being charged through a \(1.0\) kilohm resistor.

This circuit is a rough approximation of the output of one transistor connected to the input of another. (See Section 6.2.) The output of the first transistor has resistance, and the input to the second transistor has capacitance. The switching behavior of the second transistor depends upon the voltage across the (equivalent) capacitor, \(v_{BC}\text{.}\)

Assuming the voltage across the capacitor, \(v_{BC}\text{,}\) is \(0.0\) volts when the switch is first closed, current flows through the resistor and capacitor. The voltage across the resistor plus the voltage across the capacitor must be equal to the voltage available from the battery. That is,

If we assume that the voltage across the capacitor, \(v_{BC}\text{,}\) is \(0.0\) volts when the switch is first closed, the full voltage of the battery, \(2.5\) volts, will appear across the resistor. Thus, the initial current flow in the circuit will be

As the voltage across the capacitor increases, according to Equation (6.1.25), the voltage across the resistor, \(v_{AB}\text{,}\) decreases. This results in an exponentially decreasing build up of voltage across the capacitor. When it finally equals the voltage of the battery, the voltage across the resistor is \(0.0\) volts and current flow in the circuit becomes zero. The rate of the exponential decrease is given by the product \(RC\text{,}\) called the *time constant*.

Using the values of R and C in Figure 6.1.4 we get

Thus, assuming the capacitor in Figure 6.1.4 has \(0.0\) volts across it when the switch is closed, the voltage that develops over time is given by

This is shown in Figure 6.1.5.

At the time \(t = 1.0\) millisecond (one time constant), the voltage across the capacitor is

After 6 time constants of time have passed, the voltage across the capacitor has reached

At this time the voltage across the resistor is essentially \(0.0\) volts and current flow is very low.

*Inductors* are not used in logic circuits. In the typical PC, they are found as part of the CPU power supply circuitry. If you have access to the inside of a PC, you can probably see a small (about 1 cm. in diameter) donut-shaped device with wire wrapped around it on the motherboard near the CPU. This is an inductor used to smooth the power supplied to the CPU.

An inductor stores energy in the form of a magnetic field. It reacts slowly to current changes, requiring time for the magnetic field to build. The relationship between voltage at time \(t\) across an inductor and current flow through it is given by the equation

where L is the value of the inductor in henrys.

Figure 6.1.6 shows a \(1.0\) microhenry inductor connected in series with a \(1.0\) kilohm resistor.

When the switch is open no current flows through this circuit. Upon closing the switch, the inductor initially impedes the flow of current, taking time for a magnetic field to be built up in the inductor.

At this initial point no current is flowing through the resistor, so the voltage across it, \(v_{BC}\text{,}\) is \(0.0\) volts. The full voltage of the battery, \(2.5\) volts, appears across the inductor, \(v_{AB}\text{.}\) As current begins to flow through the inductor the voltage across the resistor, \(v_{BC}\text{,}\) grows. This results in an exponentially decreasing voltage across the inductor. When it finally reaches \(0.0\) volts, the voltage across the resistor is \(2.5\) volts and current flow in the circuit is \(2.5\) ma.

The rate of the exponential voltage decrease is given by the time constant \(L / R\text{.}\) Using the values of \(R\) and \(L\) in Figure 6.1.6 we get

When the switch is closed, the voltage that develops across the inductor over time is given by

This is shown in Figure 6.1.7.

Note that after about \(6\) nanoseconds (\(6\) time constants) the voltage across the inductor is essentially equal to \(0.0\) volts. At this time the full voltage of the battery is across the resistor and a steady current of \(2.5\) ma flows.

This circuit in Figure 6.1.6 illustrates how inductors are used in a CPU power supply. The battery in this circuit represents the computer power supply, and the resistor represents the load provided by the CPU. The voltage produced by a power supply includes noise, which consists of small, high-frequency fluctuations added to the DC level. As can be seen in Figure 6.1.7, the voltage supplied to the CPU, \(v_{BC}\text{,}\) changes little over short periods of time.