Electricity and electronics: State and apply principles and components used in electronics

Unit 3: Digital electronics

Leigh Kleynhans

Unit 3 outcomes

By the end of this unit you will be able to:

  • Identify basic principles of digital electronics – logical gates.
  • Identify symbols and use of active circuit elements and identify components from circuit diagrams, namely:
    • LEDs
    • diodes
    • transistors
    • operational amplifiers.

What you should know

Before you start this unit, make sure you can:

Introduction

Circuits often do not only consist of a power source, conducting wires, resistors, capacitors, and inductors. In this unit you will be introduced to further circuit components, specifically those used in electronic or digital circuits.

What are logic gates?

Logic gates are the building blocks of . They are basically used to perform logical operations by acting as a switch between options. A logic gate is an electronic device that creates logical decisions depending on the various combinations of digital signals accessible on its inputs (sensors). A digital logic gate can have more than one input signal but has only one digital output signal.

A logic gate accepts the input and operates on a required condition. If a certain condition is true, it turns ‘ON’ (also referred to as HIGH) and goes ‘OFF’ (also referred to as LOW) when the condition is false.

The functioning of a logic gate is expressed using what is referred to as a truth table. It displays all possible combinations of the inputs and a column against each row shows the corresponding output value. Figure 1 shows an example of logic gate circuit which has three inputs A, B, C, and single output Y.

 

Figure 1: Example of logic gates using symbols

Types of logic gates

There are seven types of logic gates. They are:

  • NOT gate (inverter)
  • AND gate (multiplication)
  • OR gate (addition)
  • NAND gate
  • NOR gate
  • XOR gate
  • XNOR gate.

NOT gates (inverter)

The output of a NOT gate is ‘high’ if the input is ‘low’ and vice versa.

 

Figure 2: Symbol and truth table of a NOT gate

AND gates (multiplication)

The output of an AND gate is ‘high’ if both the inputs are high, and the output is ‘low’ if both or either of the inputs is ‘low’.

 

Figure 3: Symbol and truth table of an AND gate

OR gates (addition)

The output of an OR gate is ‘high’ if both the inputs are ‘high’ or one of the inputs is ‘high’. The output is ‘low’ if both the inputs are ‘low’.

 

Figure 4: Symbol and truth table of an OR gate

NAND gates

The output of a NAND gate is ‘high’ if both the inputs are ‘low’ and if either of the inputs is ‘low’. The output is ‘low’ if both the inputs are ‘high’.

 

Figure 5: Symbol and truth table of a NAND gate

NOR gates

The output of a NOR gate is ‘high’ if both the inputs are ‘low’. The output is ‘low’ if both the inputs are ‘high’ or either of the inputs is ‘high’.

 

Figure 6: Symbol and truth table of a NOR gate

XOR gates

The output of a XOR gate is ‘high’ if either of the inputs is ‘high’. The output is ‘low’ if both the inputs are ‘high’ or if both the inputs are ‘low’.

 

Figure 7: Symbol and truth table of a XOR gate

XNOR gates

The output of a XNOR gate is ‘high’ if both the inputs are ‘high’ or if both the inputs are ‘low’. The output is ‘low’ if either of the input is ‘low’.

 

Figure 8: Symbol and truth table of a XNOR gate

The working principle of logic gates

To understand the working principle of logic gates, let us consider the example of a street lighting system. Figure 9 shows the circuit diagram of a street lighting system which consists of logic gates (a NOT gate and an OR gate), a switch and a light sensor. The operational condition for the streetlights to function is as follows:

Switch: On = 1, Off = 0
Light sensor: Dark = 0, Bright = 1
Streetlight: On = 1, Off = 0

Based on this, we can prepare a truth table as shown in figure 9:

 

Figure 9: A circuit diagram of street lighting system and truth table

Applications of logic gates

There are a number of applications of logic gates.

  • They are used in circuits involving computation and processing.
  • They are also used in push button switches, e.g. a door bell.
  • They are used in the functioning of streetlights.
  • AND gates are used to enable/inhibit data transfer.
  • NAND gates are used in burglar alarms and buzzers.

Exercise 3.1

  1. What are logic gates?
  2. How many different logic gates are there? List them.
  3. Give three examples of where logic gates are used.

The full solutions are at the end of the unit.

Active circuit elements

The components you have been learning about so far — resistors, capacitors, and inductors — are called passive components. They do not change their behaviour and therefore always have the same response to changes in voltage or current. Active components are quite different. They respond to changes in input, and this allows them to be used as circuit components called diodes, transistors, and amplifiers, which are used in calculators and computers.

Diodes

A diode is an electronic device that allows current to flow in one direction only.

 

Figure 10: A diode circuit symbol

A diode consists of two doped semiconductors joined together so that the resistance is low when connected one way and very high the other way.

Look at the circuit diagrams in figure 11. In the circuit diagram on the left, the diode is forward biased, and current is permitted. The negative terminal of the battery is connected to the negative terminal of the diode. In the circuit diagram on the right, the diode is reverse biased and current flow is not allowed. The negative terminal of the battery is connected to the positive terminal of the diode.

 

Figure 11: Circuit diagrams for forward and reverse biased diode connections

Diodes are used for:

  • power conversion – to convert power to power.
  • demodulation of signals – to remove the negative component of an AC signal.
  • over-voltage protections – protection devices for sensitive electronic components.
  • current steering – to make sure current only flows in the proper direction.

The light-emitting diode (LED)

A light-emitting diode (LED) is a diode device that emits light when charge flows in the correct direction through it.

 

Figure 12: The symbol for a light-emitting diode

The colour depends on the semiconducting material used to construct the LED, and can be in the near-ultraviolet, visible, or infrared part of the .

The wavelength of the light emitted, and therefore its colour, depends on the materials forming the p-n junction. A normal diode, typically made of silicon or germanium, emits invisible far-infrared light (so it cannot be seen by the human eye), but the materials used for an LED can emit light corresponding to near-infrared, visible or near-ultraviolet frequencies.

LEDs have many uses, such as for:

  • thin, lightweight message displays, e.g. in public information signs (at airports and railway stations, among other places)
  • status indicators, e.g. on/off lights on professional instruments and consumers audio/video equipment
  • infrared LEDs in remote controls (for TVs, VCRs, etc.)
  • traffic signals; clusters of LEDs are used in replacing ordinary bulbs behind coloured glass
  • car indicator lights and bicycle lighting
  • calculator and measurement instrument displays (although now mostly replaced by )
  • indicator and displays in environments where night vision must be retained (these use red and yellow LEDs): aircraft cockpits, submarine and ship bridges, astronomy observatories, and in the field, e.g. night time animal watching and military field use
  • in photographic darkrooms, for providing lighting which does not lead to unwanted exposure of the film (these use red and yellow LEDs)
  • illumination, e.g. torches and backlighting for LCD screens
  • signalling/emergency beacons and strobes
  • movement sensors, e.g. in a computer mouse.

The typical working lifetime of LEDS is ten years, which is much longer than the lifetime of most other light sources. LEDs fail by dimming over time, rather than the abrupt burn-out of bulbs. LEDs give off less heat than incandescent light bulbs and are less fragile than lamps.

Because they are , LED lights have great power advantages over white lights in cases where a specific colour is required. Unlike the white lights, the LED does not need a filter that absorbs most of the emitted white light. LED lights only emit one colour of light and are available in a wide range of colours.

Transistors

The diode is the simplest semiconductor device, made up of a p-type semiconductor and an n-type semiconductor in contact. It can conduct in only one direction, but it cannot control the size of an electric current. Transistors are more complicated electronic components which can control the size of the electric current flowing through them.

A small current can be used to turn the transistor on and off. The transistor then controls a more complicated or powerful current through other components. When a transistor is used in this way it is said to be in switching mode as it is acting as a remotely controlled switch. Switching circuits can be used in a computer to process and store digital information. A computer would not work without the millions (or billions) of transistors in it.

 

Figure 13: The circuit symbol for a transistor

The transistor is considered by many to be one of the greatest discoveries or inventions in modern history. Key to the importance of the transistor in modern society is its ability to be produced in huge numbers using simple techniques, resulting in their low cost. Computer ‘chips’ consist of millions of transistors. The low cost has meant that the transistor has become an almost universal tool for non-mechanical tasks. Whereas a common appliance, say a refrigerator, would have used a mechanical device for control, today it is often less expensive to simply use a few million transistors and the appropriate computer program to carry out the same task. Today transistors have replaced almost all electromechanical devices, most simple feedback systems, and appear in huge numbers in everything from computers to cars.

The operational amplifier

The operational amplifier is a special kind of electronic component which is made from transistors and is used to change voltage. Operational amplifiers are usually called op-amps for short. They are used extensively in all kinds of audio equipment (amplifiers, mixers, etc.) and in instrumentation. They also have many other uses in other circuits, for example comparing voltages from sensors.

Figure 14: The circuit symbol for an operational amplifier

The operational amplifier has two input terminals and one output terminal. The voltage of the output terminal is proportional to the difference in voltage between the two input terminals. The output terminal is on the right (at the sharp point of the triangle). The two input terminals are drawn on the left. One input terminal (labelled with a + on diagrams) is called the non-inverting input. The other input terminal (labelled -) is called the inverting input. The labels + and – have nothing to do with the way in which the operational amplifier is connected to the power supply. Operational amplifiers must be connected to the power supply, but this is taken for granted when circuit diagrams are drawn, and these connections are not shown on circuit diagrams. Usually, when drawing electronic circuits, ‘0V’ is taken to mean the negative terminal of the power supply. This is not the case with op-amps. For an op-amp, ‘0V’ refers to the voltage midway between the + and – of the supply.

Exercise 3.2

  1. What is a diode?
  2. What is a diode made of?
  3. What is the term which means that a diode is connected the ‘wrong way’ and little current is flowing?
  4. What is an LED?
  5. List five applications of LEDs.
  6. What are transistors used for?
  7. What are operational amplifiers used for?

The full solutions are at the end of the unit.

Summary

In this unit you have learnt the following:

  • A logic gate is an electronic device that creates logical decisions depending on the various combinations of digital signals accessible on its inputs (sensors).
  • The functioning of a logic gate is in a truth table which displays all possible combination of the inputs and corresponding output value.
  • Logic gates are used in computers, push button switches, controlling streetlights, data transfer, burglar alarms and buzzers.
  • Active circuit components respond to changes in voltage and current. They include diodes, light emitting diodes, transistors, and operational amplifiers.
  • A diode is an electronic device that allows current to flow in one direction only.
  • Diodes are used to convert AC power to DC power, to remove the negative component of an AC signal, to protect sensitive electronic components and to make sure current only flows in the proper direction.
  • A light-emitting diode (LED) is a diode device that emits light when charge flows in the correct direction through it.
  • LEDs are used for signs, status indicators, remote controls, traffic lights, lighting, and movement sensors.
  • Transistors are electronic components which can control the size of the electric current flowing through them.
  • Transistors act as remote-controlled switches.
  • The operational amplifier is an electronic component which is made from transistors and is used to change voltage.
  • Operational amplifiers are used extensively in audio equipment (amplifiers, mixers etc.) and in instrumentation.

Unit 3: Assessment

Suggested time to complete: 30 minutes

  1. Write the number of the correct description for the logic gate next to the letter of its name:
    Logic gate Description
    1. NAND
    1. The output is ‘high’ if either of the inputs is ‘high’. The output is ‘low’ if both the inputs are ‘high’ or if both the inputs are ‘low’.
    1. NOT
    1. The output is ‘high’ if both the inputs are ‘high’, and the output is ‘low’ if both or either of the inputs is ‘low’.
    1. OR
    1. The output is ‘high’ if both the inputs are ‘high’ or if both the inputs are ‘low’. The output is ‘low’ if either of the input is ‘low’.
    1. AND
    1. The output is ‘high’ if both the inputs are ‘low’ and if either of the inputs is ‘low’. The output is ‘low’ if both the inputs are ‘high’.
    1. XOR
    1. The output is ‘high’ if both the inputs are ‘low’. The output is ‘low’ if both the inputs are ‘high’ or either of the inputs is ‘high’.
    1. XNOR
    1. The output is ‘high’ if both the inputs are ‘high’ or one of the inputs is ‘high’. The output is ‘low’ if both the inputs are ‘low’.
    1. NOR
    1. The output is ‘high’ if the input is ‘low’ and vice versa.
  2. State the difference between passive and active circuit components.
  3. Tabulate the active circuit elements you have learnt under the headings: name, symbol, use.
  4. Which of the light bulbs in the circuits below will light up? Explain.
  5. A LED is a diode that emits light, and for these special types of diodes there are many applications. The digital number display on Izaan’s calculator is produced by a system of LEDs. The circuit diagram for the LEDs for a single number 8 is given beneath.

    1. What switches must be opened to change this to a number 2?
    2. What number would be seen if all switches were closed but LED “c” is connected in reverse? Explain briefly.

The full solutions are at the end of the unit.

Unit 3: Solutions

Exercise 3.1

  1. A logic gate is an electronic device that creates logical decisions depending on the various combinations of digital signals accessible on its inputs.
  2. There are seven types of logic gates. They are:
    • NOT gate (inverter)
    • AND gate (multiplication)
    • OR gate (addition)
    • NAND gate
    • NOR gate
    • XOR gate
    • XNOR gate.
  3. Logic gates are used in computers, push button switches, controlling streetlights, data transfer, burglar alarms and buzzers.

Back to Exercise 3.1

Exercise 3.2

  1. A diode is an electronic device that allows current to flow in one direction only.
  2. Diodes consist of a p-type and an n-type semiconductor in a p-n junction.
  3. Reverse biased.
  4. Light emitting diode.
  5. signs
    status indicators
    remote controls
    traffic lights
    lighting
    movement sensors.
  6. Transistors are used as remote-controlled switches.
  7. Operational amplifiers are used in audio equipment such as amplifiers and mixers, and in instrumentation.

Back to Exercise 3.2

Unit 3: Assessment

  1. .
    1. 4
    2. 7
    3. 6
    4. 2
    5. 1
    6. 3
    7. 5
  2. Passive components do not change their behaviour and therefore always have the same response to changes in voltage or current. Active components respond to changes in voltage and current.
  3. Table:
    Name Circuit symbol Uses
    Diode
    • to convert AC power to DC power
    • to remove the negative component of an AC signal
    • to protect sensitive electronic components
    • to make sure current only flows in the proper direction.
    LED
    • signs
    • status indicators
    • remote controls
    • traffic lights
    • lighting
    • movement sensors
    Transistor
    • remote-controlled switches
    Operational amplifier
    • audio equipment
    • amplifiers
    • mixers
    • instrumentation
  4. B1 – the diode is connected in the forward biased direction, the cathode (positive) is connected to the positive terminal of the battery and the anode (negative) is connected to the negative terminal of the battery.
  5. .
    1. Switches b) and e)
    2. 9

Back to Unit 3: Assessment

Media Attributions

License

Share This Book