• Foundation
  • About 15 min
  • 5 practice questions

Semiconductors, the p-n junction and logic gates for beginners

Learn how doping makes n-type and p-type semiconductors, how a diode conducts in one direction and how simple logic gates combine signals.

If something looks wrong, please tell us.

Semiconductors are the materials behind every phone, computer and LED lamp. In this lesson we begin with the idea of conducting and insulating materials, and then see how a small amount of impurity creates the p-n junction and how junctions are used to make circuits that decide.

Conductors, insulators and semiconductors

Metals conduct well because they have many free electrons. Insulators have almost none. Semiconductors such as silicon and germanium are in between. A pure (intrinsic) semiconductor conducts a little, and unlike metals, its conductivity rises as the temperature rises, since more electrons are freed. When an electron leaves its place, it leaves a gap called a hole, which acts like a positive charge carrier.

Doping: n-type and p-type

  • n-type: add a small amount of a pentavalent atom (phosphorus, arsenic). Each atom has one extra electron. The majority carriers are electrons.
  • p-type: add a small amount of a trivalent atom (boron, aluminium). Each atom leaves a hole. The majority carriers are holes.
  • Both kinds are electrically neutral overall.

The p-n junction and the diode

When a p-type and an n-type piece are joined, electrons and holes near the boundary combine and leave a thin depletion layer with almost no free carriers and an internal electric field, called the barrier. A p-n junction is a diode. In forward bias (p side to the positive terminal), the barrier is reduced and the current flows easily once the applied voltage passes about 0.7 V for silicon. In reverse bias (p side to the negative terminal), the barrier grows and almost no current flows. So a diode conducts in one direction only. A diode in series with an AC source and a resistor cuts out one half of each cycle and acts as a rectifier. A light-emitting diode (LED) gives out light when forward-biased, and a solar cell is a junction that produces a voltage when light falls on it.

Logic gates

Digital circuits work with two levels, 0 (low) and 1 (high). A logic gate gives an output according to a rule. The NOT gate has one input and inverts it. The AND gate gives 1 only if both inputs are 1. The OR gate gives 1 if at least one input is 1.

Truth tables
ABANDORNOT A
00001
01011
10010
11110

Worked example 1: type of semiconductor

Silicon doped with arsenic: arsenic has five electrons in its outer shell, four of which bond with silicon, leaving one free electron per atom. The result is an n-type semiconductor. If silicon is doped with boron (three outer electrons), each atom leaves a hole and the result is p-type.

Worked example 2: a diode in a circuit

The numbers are for practice, and the diode is taken as ideal. A 5 V cell is connected in series with an ideal diode and a 100 Ω resistor. If the diode is forward-biased, I = V/R = 5/100 = 0.05 A. If the cell is turned round so that the diode is reverse-biased, no current flows (I ≈ 0), and the whole 5 V appears across the diode.

Worked example 3: combining gates

A circuit gives output Y = (A AND B) OR (NOT C). For A = 1, B = 0, C = 1: A AND B = 0 and NOT C = 0, so Y = 0 OR 0 = 0. For A = 1, B = 1, C = 0: A AND B = 1 and NOT C = 1, so Y = 1 OR 1 = 1. Work from the inside out and write each step.

n-type: pentavalent impurity, electrons carry the current. p-type: trivalent impurity, holes carry it. Diode conducts only in forward bias.

— Rules to remember

Key takeaways

Doping controls the kind of carrier. A p-n junction lets current pass one way only. Logic gates follow truth tables, and complicated circuits are worked out gate by gate.

Check your understanding

  1. 1. A semiconductor doped with a trivalent impurity is:

    1. n-type
    2. p-type
    3. an insulator
    4. a metal
    Show answer

    Answer: B. A trivalent impurity creates holes, so the semiconductor is p-type.

  2. 2. The conductivity of a pure semiconductor, as its temperature rises:

    1. increases
    2. decreases
    3. stays constant
    4. becomes zero
    Show answer

    Answer: A. More electrons are freed from their bonds at a higher temperature, so conductivity increases.

  3. 3. A diode is said to be forward-biased when its p side is connected to:

    1. the negative terminal of the battery
    2. no terminal at all
    3. the earth only
    4. the positive terminal of the battery
    Show answer

    Answer: D. For forward bias, the p side goes to the positive terminal and the n side to the negative.

  4. 4. The output of an AND gate is 1 when:

    1. both inputs are 0
    2. at least one input is 1
    3. both inputs are 1
    4. only one input is 1
    Show answer

    Answer: C. An AND gate gives 1 only when all its inputs are 1.

  5. 5. For Y = (A AND B) OR (NOT C), with A = 0, B = 1 and C = 0, the output Y is:

    1. 1
    2. 0
    3. undefined
    4. equal to C
    Show answer

    Answer: A. A AND B = 0, NOT C = 1, so Y = 0 OR 1 = 1.

Privacy · Terms · Refunds · Delivery