Information Communication Technology  ·  Level 5
Basic Electronics
Chapter 5: Apply logic gates
📚 4 Topics
⚑ What you will be able to do

By the end of this chapter, you will be able to:

  • Identify different logic gates confidently by understanding the basic principles of Digital Electronics.
  • Develop logic circuits correctly by following standard procedures step-by-step.
  • Simplify complex logic circuits accurately to make them easier to understand and use.
  • Apply logic gates effectively in electronic circuits while following Digital Electronics principles.

Mastering these skills will help you build and troubleshoot electronic systems with confidence, a key ability in many exciting technical careers.

Logic gates form the foundational building blocks of digital electronics, a critical area for ICT technicians working with computing and communication devices in Kenya. These gates process binary signals, enabling decision-making at the hardware level within circuits such as microprocessors, memory devices, and digital controllers. Mastery of logic gates is essential for troubleshooting and designing digital systems used in data centers, telecommunications infrastructure, and embedded ICT solutions. This chapter introduces identification and application of logic gates, followed by the development of practical logic circuits relevant to ICT technicians.

5.1 Identification of Logic Gates

Identifying logic gates is a fundamental skill for ICT technicians who maintain and design digital systems. Understanding how different gates operate allows professionals to interpret circuit diagrams, test hardware, and develop efficient logic solutions. In the ICT sector, from training laboratories to server rooms and repair workshops, accurate recognition of logic gates supports system reliability and innovation.

5.1.1 Definition of terms

To effectively work with logic gates, technicians must be conversant with key terminology that describes their function and behaviour. These terms provide a common language for interpreting digital circuits and troubleshooting devices such as motherboards, network cards and memory modules.

Logic gate

A logic gate is an electronic device that performs a logical operation on one or more binary inputs to produce a single binary output. It is the basic building block of digital circuits, converting input signals (0s and 1s) into desired output signals based on a defined logic function. Example: the circuit that decides whether a computer's power-good signal is released is built from logic gates.

Binary input

Binary input refers to the two possible states of a digital signal: 0 (low voltage) or 1 (high voltage). Logic gates accept these binary inputs to process information. A push-button wired to a gate input, for instance, gives 1 when pressed and 0 when released.

Truth table

A truth table lists all possible input combinations to a logic gate and the corresponding output for each combination. It is essential for understanding and predicting gate behaviour. A gate with n inputs has 2ⁿ rows, so a two-input gate has 4 rows and a three-input gate has 8 rows.

Logic levels

Logic levels define the voltage ranges that represent binary states in a digital system. In TTL circuits supplied with 5 V, a voltage near 0 V represents logic 0 and a voltage near 5 V represents logic 1. For standard TTL inputs, a voltage up to 0.8 V is read as low and a voltage of 2.0 V or more is read as high; voltages between these limits are undefined and must be avoided.

Boolean algebra

Boolean algebra is a mathematical framework that describes logical relationships and operations using variables that take the values true or false (1 or 0). In this topic it is used only to write the output expression of each gate, for example Y = A · B. Its rules for simplifying circuits are treated in the topic on simplification of logic circuits.

5.1.2 Types of Logic Gates

Logic gates are classified by the logical operation they perform. Each type has a unique symbol, truth table, and function, enabling ICT technicians to design and interpret digital systems precisely. In the notes below, A and B are the inputs, Y is the output, a dot (·) means AND, a plus sign (+) means OR, ⊕ means exclusive OR, and an overbar such as Ā means NOT A.

5.1.2.1 AND Gate

The AND gate outputs a 1 only if all its inputs are 1. Otherwise, the output is 0. This gate is used in circuits requiring all conditions to be true before an action occurs, such as enabling a signal only when multiple switches are on. Its symbol has a flat back and a rounded front, and its Boolean expression is Y = A · B.

Example: a server-room door lock is released only when the badge reader confirms a valid badge (A = 1) AND the keypad confirms the correct PIN (B = 1).

A B Y = A · B
0 0 0
0 1 0
1 0 0
1 1 1

5.1.2.2 OR Gate

An OR gate outputs a 1 if at least one of its inputs is 1. It produces 0 only when all inputs are 0. This gate is useful in systems where any one of several conditions can trigger an output, such as activating an alarm if any sensor detects an anomaly. Its symbol has a curved back and a pointed front, and its Boolean expression is Y = A + B.

Example: the alarm buzzer in a server room sounds when the smoke sensor (A) OR the over-temperature sensor (B) gives a high signal.

A B Y = A + B
0 0 0
0 1 1
1 0 1
1 1 1

5.1.2.3 NOT Gate

The NOT gate, also called an inverter, outputs the opposite of its single input; if input is 1, output is 0, and vice versa. It is fundamental for signal inversion, often used in control systems to reverse logic states. Its symbol is a triangle with a small circle (bubble) at the output, and its Boolean expression is Y = Ā.

Example: a network switch port produces a high "link up" signal. Passing it through a NOT gate gives a high signal only when the link is down, which can drive a "fault" indicator LED.

A Y = Ā
0 1
1 0

5.1.2.4 NAND Gate

A NAND gate combines the AND function with inversion, outputting 0 only when all inputs are 1. Its symbol is the AND symbol with a bubble at the output, and its Boolean expression is Y = NOT (A · B). Its versatility makes it a universal gate, as any logic function can be implemented using just NAND gates, valuable in hardware optimisation. For example, joining both inputs of a NAND gate together gives a NOT gate.

Example: a fault flag stays at 0 while both power supply units of a rack server report healthy (A = 1, B = 1) and rises to 1 as soon as either unit fails.

A B Y = NOT (A · B)
0 0 1
0 1 1
1 0 1
1 1 0

5.1.2.5 NOR Gate

A NOR gate outputs 1 only when all inputs are 0, effectively combining OR and NOT functions. Its symbol is the OR symbol with a bubble at the output, and its Boolean expression is Y = NOT (A + B). It is used in systems where an output is desired only when none of the input conditions are met. Like the NAND gate, it is a universal gate.

Example: an "idle" lamp on a computer-lab control panel lights only when neither the keyboard-activity signal (A) nor the network-activity signal (B) is high.

A B Y = NOT (A + B)
0 0 1
0 1 0
1 0 0
1 1 0

5.1.2.6 XOR Gate

The XOR gate (exclusive OR) outputs 1 when an odd number of inputs are 1, commonly two inputs differing in state. It is critical in arithmetic circuits like adders and error detection schemes. Its symbol is the OR symbol with an extra curved line at the back, and its Boolean expression is Y = A ⊕ B, which equals Ā · B + A · B̄.

Example: in a data link, XOR compares a transmitted bit (A) with the bit received (B); an output of 1 flags a mismatch. The sum output of a half adder is also an XOR of the two bits being added.

A B Y = A ⊕ B
0 0 0
0 1 1
1 0 1
1 1 0

5.1.2.7 XNOR Gate

The XNOR gate (exclusive NOR) outputs 1 when inputs are equal, either both 0 or both 1. It is often used in equality comparators and digital logic verification. Its symbol is the XOR symbol with a bubble at the output, and its Boolean expression is Y = NOT (A ⊕ B).

Example: an address comparator in a memory module compares each bit of the incoming address (A) with the stored address bit (B); every XNOR output is 1 only when the two bits match.

A B Y = NOT (A ⊕ B)
0 0 1
0 1 0
1 0 0
1 1 1

Comparison of the seven gates

A side-by-side comparison helps a technician recognise a gate quickly from its truth table. The table below lists the two-input behaviour of each gate.

Gate Boolean expression Output is 1 when
AND A · B both inputs are 1
OR A + B at least one input is 1
NOT Ā the input is 0
NAND NOT (A · B) at least one input is 0
NOR NOT (A + B) both inputs are 0
XOR A ⊕ B the inputs are different
XNOR NOT (A ⊕ B) the inputs are the same

Standard gate integrated circuits

In the workshop, gates are usually met as integrated circuits (ICs) in the 7400 TTL family, each holding several identical gates in one package. Knowing the part numbers lets a technician identify a gate on a trainer board or a repaired circuit. Check the manufacturer's data sheet for the pin layout before wiring, because the pin positions differ between ICs (the 7402 NOR, for example, has its outputs on different pins from the 7400 NAND).

Name Specification Use
7408 Quad 2-input AND, 14-pin DIP, 5 V supply Enabling a signal when two conditions are true
7432 Quad 2-input OR, 14-pin DIP, 5 V supply Combining alarm or request signals
7404 Hex inverter (six NOT gates), 14-pin DIP, 5 V supply Inverting a logic level
7400 Quad 2-input NAND, 14-pin DIP, 5 V supply General logic and universal-gate circuits
7402 Quad 2-input NOR, 14-pin DIP, 5 V supply General logic and universal-gate circuits
7486 Quad 2-input XOR, 14-pin DIP, 5 V supply Adders, parity and comparison

In these 14-pin packages the supply is normally on pin 14 and ground on pin 7. An XNOR function can be obtained from a dedicated XNOR IC or by following an XOR gate with an inverter.

Identifying an unknown gate by testing

When a gate on a trainer board has no marking, its type can be found by testing it and comparing the results with the truth tables above. The procedure below uses a 5 V logic trainer, switches for the inputs and an LED or logic probe for the output.

Name Specification Use
Logic trainer 5 V regulated supply, breadboard or socket Powering and holding the IC under test
Input switches Two toggle or DIP switches giving 0 or 1 Setting inputs A and B
LED or logic probe Indicates high or low at the output Reading the output state
  1. Switch off the supply and confirm the gate's power and ground pins are correctly connected, so that the IC is not damaged.
  2. Connect the two input pins to two input switches (A and B) and the output pin to an LED or logic probe.
  3. Switch on the supply and set A = 0 and B = 0. Record the output.
  4. Set A = 0 and B = 1. Record the output.
  5. Set A = 1 and B = 0. Record the output.
  6. Set A = 1 and B = 1. Record the output.
  7. Write the four outputs in order as a truth table and compare it with the tables for AND, OR, NAND, NOR, XOR and XNOR. For example, outputs 1, 0, 0, 0 identify a NOR gate.
  8. If the gate has only one input, test it with 0 and 1 only; an output that is always opposite to the input identifies a NOT gate.
The rest of this chapter
🔒

Create a free account to open more of this chapter.

Free: practical guides, quick cards, workplace scenarios and more.

Create a free account
🔒5.2 Development of Logic Circuits

Developing logic circuits involves combining individual gates to perform complex digital functions. ICT technicians in Kenya design such circuits for applications ranging from access control systems in hotels to automated teller machines in banks. Logic circui…

🔒5.3 Simplification of Logic Circuits

In the design and troubleshooting of digital systems, particularly in ICT hardware such as routers, microcontrollers and embedded devices, simplifying logic circuits is essential. Simplification reduces the number of gates and interconnections, which lowers pr…

🔒5.4 Application of logic gates in electronic circuits

Logic gates are the fundamental building blocks of digital electronic circuits, enabling ICT technicians to create complex control and data processing systems. Boolean algebra provides the mathematical framework to analyze and design these circuits efficiently…

Chapter Summary

This chapter introduced the fundamental concept of logic gates, beginning with the identification and definition of key terms related to digital electronics. It explored various types of logic gates including AND, OR, NOT, NAND, NOR, XOR, and XNOR, explaining their individual functions and logical behavior. The development of logic circuits was then discussed, focusing on how these gates are combined to perform complex logical operations. Methods for simplifying logic circuits were examined in detail, highlighting Boolean algebra, Karnaugh Maps, the Quine-McCluskey algorithm, and the use of software and CAD tools to optimize circuit design. Finally, the chapter demonstrated the practical application of logic gates within electronic circuits and emphasized the role of Boolean algebra in analyzing and designing these systems effectively. This comprehensive overview equips students with the foundational knowledge needed to apply logic gates in real-world electronic engineering tasks.

Self-Assessment

🔒 PDFDownload this self-assessment, with answers

A. Written Assessment

  1. Define a logic gate and explain its role in digital circuits. (3 marks)
  2. Identify the output of an AND gate when both inputs are 1. (1 mark)
🔒20 more in this section.

Chapter Examination Questions

🔒 PDFDownload these examination questions, with worked answers

SECTION A (40 Marks) - Answer ALL Questions

  1. Define a logic gate and explain its relevance in designing ICT hardware systems such as those used in Safaricom data centers. (4 marks)
  2. Identify and describe the function of the AND gate in digital circuits. (4 marks)
🔒18 more in this section.
Flashcards 20 cards Study deck ▾
Question
1

↻ Tap card to reveal answer
🔒

18 more in this section.

Create a free account
Test Yourself 16 questions Start quiz ▾
0%
0 / 2
🔒

14 more in this section.

Create a free account
Am I competent?

At the start of this chapter we promised you would be able to:

  • Identify different logic gates confidently by understanding the basic principles of Digital Electronics.
  • Develop logic circuits correctly by following standard procedures step-by-step.
  • Simplify complex logic circuits accurately to make them easier to understand and use.
  • Apply logic gates effectively in electronic circuits while following Digital Electronics principles.

Tick each one you can genuinely do.

So, are you there yet?

You're competent when you can confidently do 50% or more of what this chapter promised.

Sign in to record how you're doing.