Look at the charger of your phone. Inside that small white box, 230 V of alternating current from the wall becomes a steady 5 V that always pushes the same way, and the phone counts the charge going in, switches the screen’s pixels and plays music, all with the same kind of part: a sandwich of two slightly different kinds of silicon. One sandwich lets current through one way only. Billions of them, switching on and off, can do arithmetic.
This unit is about the simplest of these devices. A p–n junction diode passes current one way and blocks it the other; a Zener diode holds a voltage steady; a few diodes together turn a.c. into d.c.; and diodes and transistors make logic gates, the switches that decide 1 or 0 in every computer.
22.1 Formation of p–n junction
Have you ever wondered what happens when two kinds of silicon meet?
A crystal of silicon can be doped to make it one of two kinds (Grade 11, Unit 25). In p-type silicon (doped with a trivalent element such as boron), the current is carried mostly by holes, missing electrons that behave like positive charges: holes are its majority carriers. In n-type silicon (doped with a pentavalent element such as phosphorus), the majority carriers are free electrons. Both kinds are electrically neutral: each free electron has left behind a positive donor ion, each hole a negative acceptor ion.
When a p-type and an n-type region are made in one single crystal, side by side, the boundary between them is a p–n junction. The whole device is called a junction diode, or simply a junction. (It can’t be made by pressing two separate pieces together: the surfaces would never touch closely enough. The two regions are made by doping different parts of one crystal.)
Diffusion. Just after the junction forms, there are very many holes on the p side and very few on the n side, and very many free electrons on the n side and very few on the p side. Like ink spreading in water, carriers spread from where there are many to where there are few: holes diffuse from the p side into the n side, and electrons from the n side into the p side. When an electron meets a hole, it falls into it and the two vanish: they recombine.
The depletion layer. So a thin region on each side of the junction is left with almost no free carriers. It is called the depletion layer (it has been depleted, emptied, of carriers). It is very thin, between about 0.01 µm and 1 µm, the thinner the more heavily the silicon is doped.
The potential barrier. The depletion layer isn’t neutral. The n side of it has lost electrons and is left with its fixed positive donor ions; the p side has lost holes and is left with its fixed negative acceptor ions. So the p side of the junction becomes slightly negative and the n side slightly positive. These charges make an electric field across the depletion layer, pointing from the n side to the p side. It pushes electrons back towards the n side and holes back towards the p side, so it opposes any more diffusion. Soon the two balance and diffusion stops.
The potential difference across the depletion layer that this field makes is the potential barrier (or barrier potential). It works like a small built-in voltage that a carrier must climb to cross. It is about 0.15–0.3 V for germanium and about 0.7 V for silicon, the exact value depending on how heavily the semiconductor is doped (and on its temperature).
In the depletion layer of a p–n junction:
Pick an answer to see why.
The electric field across the depletion layer points:
Pick an answer to see why.
22.2 Biasing of p–n junction
What happens when a battery is joined across the junction?
Applying a potential difference across a p–n junction to make it work is called biasing it. There are two ways round:
- i.forward biasing
- ii.reverse biasing
1. Forward bias
When the p side is connected to the positive terminal of a battery and the n side to the negative terminal, the junction is forward biased.
The battery’s positive terminal pushes the holes in the p side towards the junction, and its negative terminal pushes the electrons in the n side towards it. The battery’s voltage works against the barrier: the depletion layer becomes thinner and the barrier lower. Once the applied voltage is more than the barrier potential (0.7 V for silicon), the majority carriers, holes from the p side and electrons from the n side, cross the junction in large numbers. The current they carry is the forward current, and it grows quickly as the forward voltage is raised. A forward-biased diode has a low resistance.
2. Reverse bias
When the p side is connected to the negative terminal and the n side to the positive terminal, the junction is reverse biased.
Now the battery pulls the holes away from the junction towards its negative terminal, and the electrons away towards its positive terminal. The depletion layer becomes wider and the barrier higher, adding to the battery’s voltage. The majority carriers can’t cross, and the diode’s resistance is very high. A very small current still flows, carried by the few minority carriers (the few electrons on the p side and holes on the n side, made by heat), which the barrier’s field sweeps across. It is the reverse current, typically a few microamperes or less.
Notice that the barrier opposes the forward current (the majority carriers must climb it) but helps the reverse current (its field carries the minority carriers across).
The symbol of a diode
A junction diode is drawn as a triangle against a bar (Figure 22.3). The triangle is the p side (the anode) and the bar the n side (the cathode). The triangle points the way conventional current (and holes) flows when the diode is forward biased; the electrons flow the other way. On a real diode, a band painted round one end marks the cathode.
Which way round must a silicon diode be connected for it to conduct?
Pick an answer to see why.
22.3 Characteristics of a junction diode
How does the current through a diode change as the voltage across it is raised?
The graph of the current through a junction diode against the potential difference across it is called its characteristic (or I–V characteristic). It is plotted in two parts, forward and reverse, because the currents are so different: milliamperes forward, microamperes reverse.
Forward characteristics
The forward characteristic is the graph of the current against the forward bias voltage. The circuit is in Figure 22.4: a battery feeds a rheostat used as a potential divider, so the voltage across the diode can be raised from zero a little at a time; a voltmeter reads the voltage across the diode, and a milliammeter in series the current.
As the forward voltage is raised from zero, almost no current flows at first, because the carriers can’t yet get over the potential barrier. When the voltage reaches about the barrier, the knee voltage (about 0.7 V for silicon, 0.3 V for germanium at room temperature), the current begins to rise, and beyond the knee it rises very steeply (in fact exponentially: each extra 0.06 V multiplies it by about ten), so that a few tenths of a volt more give hundreds of milliamperes. In this part the diode’s resistance is low. If the forward voltage is pushed further, the current becomes so large that it heats the junction, and the diode is burnt out: that is why a diode in a circuit always has a resistance in series to limit its current.
Reverse characteristics
The reverse characteristic is the graph of the current against the reverse bias voltage. The circuit is the same with the diode turned round (p side to the negative terminal), and with a microammeter in place of the milliammeter, since the reverse current is so small; the voltmeter needs a much larger range (Figure 22.6). The diode’s resistance now is very high, about 10⁵ Ω or more.
As the reverse voltage is raised, the reverse current, carried by minority carriers, is small and hardly changes: there are only so many minority carriers, and all of them are already being swept across. This nearly constant current is the reverse saturation current. But at a certain large reverse voltage the current suddenly rises sharply. This is breakdown, and the voltage at which it happens is the reverse breakdown voltage (about 25 V in Figure 22.5; tens to hundreds of volts for ordinary diodes).
What happens at breakdown? In the very strong field of the wide depletion layer, the few minority carriers crossing it are accelerated so hard that they knock electrons out of the covalent bonds of the silicon atoms they hit. Those freed electrons are accelerated in turn and knock out more: the number of carriers grows like an avalanche, and so does the current (avalanche breakdown). In a heavily doped junction, with a very thin depletion layer, the field is so strong that it pulls electrons straight out of their bonds (Zener breakdown). Unless something limits the current, the large current at breakdown heats the junction and destroys an ordinary diode.
A silicon diode is reverse biased at 5 V. Raising the reverse voltage to 10 V (still well below breakdown):
Pick an answer to see why.
22.4 Zener diode
Can the breakdown that ruins an ordinary diode be put to good use?
A Zener diode is a specially made diode, heavily doped, designed to work in the breakdown region. Forward biased, it conducts like any diode. Reverse biased, it conducts too, once the reverse voltage exceeds a definite value, its Zener breakdown voltage , and above that the voltage across it stays almost constant however much the current changes. Zener diodes are made with breakdown voltages from about 2 V to a few hundred volts (3.3 V, 5.1 V and 12 V are common).
This is what a Zener diode is used for: keeping a voltage steady, voltage regulation. An electronic circuit that turns a varying d.c. input into a steady d.c. output is called a voltage regulator. In the simplest one (Figure 22.8), the Zener diode is connected reverse biased across the load, with a resistor R in series with the supply. If the input rises, more current flows through R and the Zener, the extra voltage drops across R, and the voltage across the Zener and the load stays at . If the input falls (but stays above ), the Zener takes less current, and again the output stays at .
The symbol of a Zener diode (Figure 22.3) is a diode’s with the bar (the n side) bent at its ends, like a flattened letter Z.
Applications of diodes
Diodes are used:
- a.as rectifiers, to turn a.c. into d.c. (Section 22.5);
- b.as switches in logic circuits in computers (Section 22.7);
- c.as Zener diodes, in voltage regulation;
and in many other ways: as light-emitting diodes (LEDs), which give out light when forward biased, as photodiodes and solar cells, which make a current when light falls on the junction, and to protect circuits from a battery put in the wrong way round.
22.5 Junction diode as rectifier
How does a phone charger turn the a.c. from the wall into d.c.?
An electronic device that converts a.c. power into d.c. power is called a rectifier, and the process is rectification.
Principle. A junction diode has a low resistance when forward biased and a very high resistance when reverse biased. An alternating e.m.f. reverses its direction every half cycle, so its two halves bias a diode in opposite directions: if the first half cycle biases it forward, the next biases it in reverse. A diode in an a.c. circuit therefore conducts only during alternate half cycles, those that bias it forward. Its current flows one way only.
Half-wave rectifier
The simplest rectifier is a single diode in series with the load resistance , fed from the secondary of a transformer (Figure 22.9). During the half cycle that makes the diode’s anode positive, the diode conducts and the current flows through ; during the other half, the diode is reverse biased and no current flows. The output is a series of half-waves, all in the same direction, with gaps between them: half-wave rectification. Half of the input’s energy is simply not used.
Full-wave rectifier with two diodes (center-tap)
A full-wave rectifier uses both halves of the a.c. One way needs a transformer whose secondary has a connection at its middle, a center tap (Figure 22.10). Its two ends, S₁ and S₂, go through diodes D₁ and D₂ to the same end of the load; the center tap goes to the other end.
During one half cycle, S₁ is positive with respect to the center tap and S₂ negative: D₁ is forward biased and conducts, D₂ is reverse biased. During the next half cycle, S₂ is positive: D₂ conducts and D₁ is off. Either way, the current flows through the load in the same direction. Each diode works for half of each cycle, and the load gets a current in both halves. The drawback: the transformer needs a center tap, and each half of its secondary gives only half the voltage.
Full-wave bridge rectifier
The usual full-wave rectifier, in almost every charger, uses four diodes D₁, D₂, D₃ and D₄ arranged like a Wheatstone bridge (Figure 22.11). Two opposite corners, A and C, are connected to the ends S₁ and S₂ of the transformer’s secondary; the other two corners, B and D, to the load resistance . The transformer’s primary P is connected to the a.c. mains.
When the a.c. is applied to the primary, at some instant the positive half of the cycle makes A positive and C negative. Diodes D₁ and D₃ are forward biased and conduct, and the current flows along S₁ → A → D₁ → B → → D → D₃ → C → S₂. Meanwhile D₂ and D₄ are reverse biased and don’t conduct.
During the next half cycle, A is negative and C positive. Now D₂ and D₄ conduct, and the current flows along S₂ → C → D₂ → B → → D → D₄ → A → S₁, while D₁ and D₃ are off.
In both halves the current flows through from B to D, in the same direction. So a d.c. output appears across in both halves of the cycle: full-wave rectification (Figure 22.12), with no center tap needed.
Pulsating d.c. and smoothing
The output of a rectifier flows one way only, but it isn’t steady: it rises from zero to a peak and falls back to zero 100 times a second (for 50 Hz mains, full wave). Such a current is called pulsating d.c. To smooth it, a large capacitor (a filter capacitor) is connected across the load. It charges up to the peak voltage during each hump, and between humps, when the rectifier’s output falls, it keeps the voltage up by discharging slowly through the load. What remains is a nearly steady voltage with a small ripple. A voltage regulator, such as a Zener diode, then removes the ripple altogether.
22.6 Logic gate
How can electricity make a decision?
A digital circuit that either lets a signal through or stops it is called a gate. It lets the signal through only when certain logical conditions are satisfied, so such circuits are called logic gates. In a logic gate every input and output is either a high voltage (1, for example 5 V) or a low one (0, near 0 V). Simple gates can be built from diodes (and resistors), but a gate that turns a 1 into a 0 needs a transistor, and the gates inside a computer are built entirely of transistors, billions of them on one chip.
Logic gates are the building blocks of digital systems such as computers, mobile phones and calculators. Each gate follows a definite logical relationship between its input and output voltages.
The basic logic gates are of three types:
- the OR gate
- the AND gate
- the NOT gate
Each is drawn with its own symbol, and what it does is given either by a truth table or by a Boolean expression.
22.7 Truth table and Boolean expression
Truth table
A truth table is a table showing all the possible combinations of the inputs of a logic gate (or circuit) and the output for each. It is also called a table of combinations. With two inputs there are 2 × 2 = 4 combinations; with three, 8; with n inputs, . For example, the OR function:
| A | B | A or B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Boolean algebra
George Boole, an English mathematician (1815–1864), invented an algebra of logical statements, which can only be true or false. Its variables are called Boolean variables: true is written 1 and false 0. These 1 and 0 are not numbers to be added in the ordinary way; they are names for the two values. In electronic circuits, 1 and 0 stand for the two states of a circuit: on and off, a high voltage and a low one.
In Boolean algebra:
- the addition sign (+) means OR: A + B is read “A or B”;
- the multiplication sign (· or ×) means AND: A·B is read “A and B”;
- a bar over a variable means NOT: is read “not A”.
So in Boolean algebra 1 + 1 = 1 (true or true is true), which is why the symbols must not be confused with arithmetic.
The OR gate (Y = A + B)
An OR gate is a logic gate whose output is 1 if any one or more of its inputs is 1.
Figure 22.16 shows a two-input OR gate made of two ideal diodes D₁ and D₂: A and B are the inputs, Y the output, and R the load resistor between Y and earth (0 V). Each input is either 0 V (0) or, say, 5 V (1).
- Case I: A = 0, B = 0. Neither diode has a voltage to drive it, so no current flows through R, and the output is 0 V: Y = 0.
- Case II: A = 1, B = 0. D₁ is forward biased and conducts, D₂ doesn’t. Current flows from A through D₁ and R to earth, and Y is at the input’s voltage: Y = 1.
- Case III: A = 0, B = 1. D₂ conducts and D₁ doesn’t: Y = 1.
- Case IV: A = 1, B = 1. Both diodes conduct: Y = 1.
Summarized as a truth table:
| A | B | Y = A + B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
The AND gate (Y = A · B)
In an AND gate, the output is 1 only when every input is 1; a single 0 at any input makes it 0.
A two-input AND gate can also be made of two ideal diodes, turned the other way round (Figure 22.17): the output Y is joined through the resistor R to the + terminal of a 1 V (or 5 V) supply, and each diode’s anode is at Y, its cathode at an input. Each input is either 0 V (0) or the supply’s voltage (1).
- Case I: A = 0, B = 0. Both diodes are forward biased: current flows from the supply through R and both diodes into the inputs at 0 V. Y is held at 0 V: Y = 0.
- Case II: A = 1, B = 0. D₂ conducts and holds Y at B’s 0 V: Y = 0.
- Case III: A = 0, B = 1. D₁ conducts and holds Y at 0 V: Y = 0.
- Case IV: A = 1, B = 1. Both inputs are at the supply’s voltage, so neither diode is forward biased. No current flows through R, so there is no voltage drop across it, and Y is at the supply’s voltage: Y = 1.
| A | B | Y = A · B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
In the diode OR gate, A = 1 and B = 0. Which diodes conduct?
Pick an answer to see why.
The NOT gate (Y = )
A NOT gate has one input and one output, and it inverts its input: if the input is 1 the output is 0, and if the input is 0 the output is 1. It is also called an inverter.
A NOT gate can’t be made of diodes and resistors alone: diodes can only pass on a voltage, never turn a low one into a high one. It needs a transistor used as a switch (Figure 22.18). The input A is joined through a resistor R₁ to the transistor’s base; its collector is joined through R₂ to the supply +V and is the output Y; its emitter is earthed.
- When A = 0, no current flows into the base, so the transistor is off (like an open switch). No current flows through R₂, so there is no drop across it, and Y is at +V: Y = 1.
- When A = 1, a current flows into the base and the transistor is fully on (like a closed switch from collector to emitter). The output is joined almost directly to earth: Y = 0.
The NOR gate (Y = )
An OR gate followed by a NOT gate is a NOR gate (NOT-OR). The NOT gate inverts the OR gate’s output (Figure 22.19), so its output is 1 only when both inputs are 0. Its symbol is the OR symbol with a small circle (the sign of NOT) at its output.
- Case I: A = 0, B = 0: A + B = 0, so .
- Case II: A = 0, B = 1: A + B = 1, so Y = 0.
- Case III: A = 1, B = 0: A + B = 1, so Y = 0.
- Case IV: A = 1, B = 1: A + B = 1, so Y = 0.
| A | B | Y = |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
So a NOR gate gives a high output (1) only when both inputs are low (0).
The NAND gate (Y = )
An AND gate followed by a NOT gate is a NAND gate (NOT-AND): a transistor NOT circuit placed after the diode AND circuit. Its symbol is the AND symbol with a small circle at its output (Figure 22.20).
- Case I: A = 0, B = 0: A·B = 0, so .
- Case II: A = 0, B = 1: A·B = 0, so Y = 1.
- Case III: A = 1, B = 0: A·B = 0, so Y = 1.
- Case IV: A = 1, B = 1: A·B = 1, so Y = 0.
| A | B | Y = |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
So a NAND gate gives a high output (1) when either or both inputs are low (0), and 0 only when both are 1.
The output of a two-input gate is 0 only when both inputs are 1. The gate is:
Pick an answer to see why.
NAND gate as a universal gate
The NAND gate is called a universal gate: NAND gates alone, used over and over, can make every other gate, and so any logic circuit at all.
- NOT from NAND: join both inputs of one NAND gate together. With both inputs equal to A, .
- AND from NAND: a NAND gate followed by a NAND used as a NOT: . Two gates.
- OR from NAND: invert each input with a NAND used as a NOT, then feed both into a NAND: (by De Morgan’s law). Three gates.
In the same way, the NOR gate is a universal gate too:
- NOT from NOR: both inputs joined: .
- OR from NOR: a NOR followed by a NOR used as a NOT: .
- AND from NOR: invert each input with a NOR, then feed both into a NOR: .
Exercise
Choose the correct option
- The barrier potential difference is the potential difference across:
Pick an answer to see why.
- The current through a p–n junction is negligible when the junction is:
Pick an answer to see why.
- A reverse-biased p–n junction has:
Pick an answer to see why.
- Which device is used to convert a.c. into d.c.?
Pick an answer to see why.
- A Zener diode can be used as a:
Pick an answer to see why.
- All logic gates can be made by repeated use of:
Pick an answer to see why.
- What is the minimum number of NAND gates needed to make a NOT gate?
Pick an answer to see why.
- Which gate does the logic circuit above give?
Pick an answer to see why.
- Which gate does the logic circuit above give?
Pick an answer to see why.
- Boolean algebra is essentially based on:
Pick an answer to see why.
Answer these questions
- a.Explain the formation of the potential barrier and the depletion layer in a p–n junction.
- b.Explain the forward and reverse characteristics of a p–n junction diode.
Hint
Answer
- a.What is a junction diode? Explain a full-wave rectifier using two diodes.
- b.What will happen if one of the diodes is damaged?
- c.The output of a full-wave rectifier is pulsating d.c. Which device can be used to get a constant output voltage? Draw its symbol and its characteristic.
Hint
Answer
- a.What are logic gates? Give the truth table of a two-input NAND gate, with its symbol.
- b.Explain why the NAND gate is called a universal gate.
Answer
- a.Draw a circuit diagram to realize an AND gate from NOR gates, with its truth table.
- b.Which gate will you get if you connect a NOT gate at the output of the circuit of part a?
- c.Show, using a truth table, that the circuit given below acts as an OR gate.
Hint
Answer
Printable PDFs
- The unit as a book (A5) 33 pages Answers as an A4 booklet, 9 sheets
- Study notes 3 pages
- Worksheet 4 pages Answer key
- Harder practice questions 2 pages Answer key
Quiz yourself: Electricity and Magnetism, Grades 5–12 →
Practice every question in the book, and keep track of the ones you miss →
A companion to your textbook, not a replacement for it: study from the book your school uses, and where the two differ, follow your teacher. Found a mistake? Please tell us.
