Information Communication Technology  ·  Level 6
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 using the 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 following Digital Electronics principles.

Mastering these skills will help you design and troubleshoot real electronic devices with confidence and precision.

Logic gates form the cornerstone of digital electronics, enabling ICT technicians to design and troubleshoot circuits that process binary information. In Kenya's dynamic ICT sector, mastery of logic gates equips technicians to develop reliable hardware components for systems such as network routers, data storage devices, and embedded controllers. This chapter explores the identification and classification of logic gates, followed by the practical development of logic circuits essential for creating functional digital systems.

5.1 Identification of Logic Gates

Understanding and identifying logic gates is fundamental for ICT technicians tasked with building or repairing digital devices. In Kenya's ICT workshops and service centres, technicians frequently encounter integrated circuits containing various logic gates that perform critical decision-making functions. Accurate identification of these gates and their corresponding symbols ensures proper circuit design and fault diagnosis.

5.1.1 Definition of terms

The terminology related to logic gates can be intricate, and clarifying these terms enhances comprehension and communication among professionals in ICT environments. The terms below are used throughout this chapter whenever gates are described, drawn or tested.

Logic Gate

A logic gate is an electronic device or circuit that operates on one or more binary inputs to produce a single binary output based on a logical function. Logic gates underpin digital computing by implementing Boolean algebra operations, enabling devices to perform tasks such as decision-making and data manipulation.

Boolean Algebra

Boolean algebra is a branch of algebra whose variables take only two values, true (1) and false (0), and whose basic operations are AND, OR and NOT.

Truth Table

A truth table is a tabular representation that lists all possible input combinations to a logic gate and the corresponding output for each combination. It is a vital tool for understanding and verifying logic gate behaviour. A gate with n inputs has 2ⁿ rows, so a 2-input gate has 4 rows and a 3-input gate has 8 rows.

Input and Output

Inputs are the binary signals (0 or 1) fed into a logic gate, while the output is the resulting binary signal after the gate processes the inputs according to its function. In ICT devices, inputs often come from sensors, switches, or other circuits, while outputs drive further processing or control elements.

Logic Levels

Logic levels are the two voltage ranges that a digital circuit treats as 0 and 1. A voltage close to 0 V is read as LOW (logic 0), and a voltage close to the supply voltage, for example 5 V in many 74-series circuits, is read as HIGH (logic 1). Technicians measure these levels with a multimeter or logic probe when testing a gate.

Boolean Expression

A Boolean expression is an algebraic statement of what a gate or circuit does, written with the variables A, B, C and an output such as X or Y. A dot or joined letters means AND, a plus sign means OR, and the word NOT or a bar over a single letter means NOT. For example, X = A · B reads "X equals A AND B".

Logic Symbol

A logic symbol is the standard drawn shape that represents a gate on a circuit diagram. Each gate has its own shape, and a small circle (bubble) on the output or input shows inversion. Recognising these shapes allows a technician to read a diagram without any text labels.

Integrated Circuit (IC)

An integrated circuit is a compact electronic circuit comprised of multiple logic gates and other components fabricated on a semiconductor chip. ICT technicians often work with ICs such as the 7400 series, which contain various logic gates packaged for ease of use in digital systems. A typical 14-pin IC in this series holds four 2-input gates that share one power pin and one ground pin.

5.1.2 Types of logic gates

Logic gates differ by the logical operation they perform, each with distinct symbols, truth tables, and applications. Kenyan ICT technicians must recognise these gates to interpret circuit diagrams and build functional digital devices. The seven gates in this section are AND, OR, NOT, NAND, NOR, XOR and XNOR. The table below compares them; the NOT gate has one input and the others are shown with two inputs.

Gate Number of inputs Output is 1 when
AND 2 All inputs are 1
OR 2 At least one input is 1
NOT 1 The input is 0
NAND 2 At least one input is 0
NOR 2 All inputs are 0
XOR 2 The inputs are different
XNOR 2 The inputs are the same

5.1.2.1 AND Gate

The AND gate outputs 1 only when all its inputs are 1; otherwise, it outputs 0. It performs a logical multiplication, useful in systems where multiple conditions must be met, such as enabling a device only when several sensors report active status.

Example: a bank's strongroom door controller opens the lock only when the manager's key signal (A) and the second custodian's key signal (B) are both present. If either key is missing, the output stays at 0 and the door stays locked.

  • Boolean expression: X = A · B (also written X = AB).
  • Symbol: a flat-backed, D-shaped gate with two inputs on the left and one output on the right.
  • Typical IC: 7408 (quad 2-input AND).
A B X = A · B
0 0 0
0 1 0
1 0 0
1 1 1

5.1.2.2 OR Gate

The OR gate outputs 1 if at least one input is 1, and 0 only when all inputs are 0. It represents logical addition, commonly applied in alarm systems where any triggered sensor activates an alert.

Example: in a hotel, the fire alarm panel receives signals from smoke detectors on each floor. An OR gate sounds the main alarm if the detector on floor 1 (A) or floor 2 (B) is triggered, so one detection is enough.

  • Boolean expression: X = A + B.
  • Symbol: a gate with a curved back and a pointed front, two inputs on the left and one output on the right.
  • Typical IC: 7432 (quad 2-input OR).
A B X = 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) has a single input and outputs the opposite logic level: it outputs 1 when input is 0, and 0 when input is 1. It is essential for signal inversion, such as generating complementary control signals in microcontroller circuits.

Example: on a poultry farm, a light sensor gives 1 in daylight and 0 at night. Passing that signal through a NOT gate gives 1 at night, which can switch on the lamps that keep the chicks warm through a transistor or relay driver, because the gate output alone cannot supply enough current for the lamps.

  • Boolean expression: X = Ā (read "A bar" or "NOT A"). It can also be written X = A'.
  • Symbol: a triangle pointing right with a small circle (bubble) at its tip.
  • Typical IC: 7404 (hex inverter, six gates in one chip).
A X = Ā
0 1
1 0

5.1.2.4 NAND Gate

The NAND gate is the negation of the AND gate; it outputs 0 only when all inputs are 1, and 1 otherwise. NAND gates are called universal gates because any logical function can be constructed using only NAND gates, which makes them useful when a design must use only one type of chip. NOR gates share this property.

Example: a county government office's server-room cooling controller keeps a warning signal at 1 unless the temperature-normal signal (A) and the fan-running signal (B) are both 1. Only when both are 1 does the output fall to 0 and clear the warning.

  • Boolean expression: X = NOT (A · B), meaning AND followed by NOT.
  • Symbol: the AND gate shape with a bubble on the output.
  • Typical IC: 7400 (quad 2-input NAND). Joining both inputs of a NAND gate together turns it into a NOT gate, which is the first step in building other gates from NAND alone.
A B X = NOT (A · B)
0 0 1
0 1 1
1 0 1
1 1 0

5.1.2.5 NOR Gate

The NOR gate outputs 1 only when all inputs are 0, otherwise it outputs 0. It is the negation of the OR gate and is used where an output must be active only when every input is inactive, such as an idle or "free" indicator.

Example: a SACCO's cash-counter lamp shows "Counter free" (output 1) only when the customer-present sensor (A) and the transaction-in-progress signal (B) are both 0. If either is 1, the lamp goes off.

  • Boolean expression: X = NOT (A + B), meaning OR followed by NOT.
  • Symbol: the OR gate shape with a bubble on the output.
  • Typical IC: 7402 (quad 2-input NOR). Its pinout differs from the 7400, 7408 and 7432: in each gate the output comes before the two inputs (outputs on pins 1, 4, 10 and 13), so always check the data sheet before wiring.
A B X = 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 its inputs are 1; for a two-input gate this means exactly one input is 1. It is widely used in arithmetic circuits, such as adders, where it performs binary addition without carry.

Example: a school corridor light is fitted with two switches, one at each end. An XOR gate turns the lamp on when the two switches are in different positions and off when they are in the same position, so flipping either switch changes the lamp state.

  • Boolean expression: X = A ⊕ B = (NOT A) · B + A · (NOT B).
  • Symbol: the OR gate shape with an extra curved line across the input side.
  • Typical IC: 7486 (quad 2-input XOR).
A B X = 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, effectively the complement of the XOR gate. It is used in equality detection circuits and error checking applications.

Example: a hospital's patient-record terminal compares each stored bit of a patient number with the bit typed in at the reception desk. An XNOR gate gives 1 for every bit that matches, and the record is accepted only when all the bit comparisons give 1.

  • Boolean expression: X = NOT (A ⊕ B) = A · B + (NOT A) · (NOT B).
  • Symbol: the XOR gate shape with a bubble on the output.
  • Typical IC: 74266 (quad 2-input XNOR with open-collector outputs) in the TTL family, or CD4077 in the CMOS family. An XNOR can also be made by following a 7486 XOR gate with a 7404 inverter.
A B X = NOT (A ⊕ B)
0 0 1
0 1 0
1 0 0
1 1 1

5.1.3 Identifying Gates on an Integrated Circuit

Identifying a gate in practice means combining what you see on the diagram, the markings on the chip and the behaviour you measure. A technician who can do all three can diagnose a faulty board quickly, for example in a school computer lab where a control board has stopped responding. The following steps give a reliable method.

  1. Read the chip marking. Look for the part number printed on top of the IC, such as 7408 or 7432, and note any letters showing the logic family (for example LS or HC). The number tells you which gate type the chip holds.
  2. Find pin 1. Locate the notch or dot on the package. With the notch at the top and the chip viewed from above, pin 1 is at the top left and pins are numbered anticlockwise.
  3. Obtain the data sheet. Look up the part number to see the pinout, the number of gates in the package and the supply voltage required.
  4. Identify the power pins. On most 14-pin chips of this series, pin 14 is the positive supply and pin 7 is ground. Confirm this on the data sheet before applying power.
  5. Match the symbol on the diagram. Compare the drawn shape with the standard symbols in section 5.1.2, looking closely at the output end and the input side to tell OR from NOR and XOR from XNOR.
  6. Apply test inputs. Connect the inputs to 0 V or the supply voltage in turn, covering every row of the truth table.
  7. Check the output. Measure the output with a multimeter or logic probe and compare it with the expected truth table. A mismatch on any row points to a faulty gate or a wiring error.
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

Building practical logic circuits from basic gates is an essential skill for ICT technicians engaged in hardware development and maintenance. Understanding how to combine gates to implement desired logical functions enables the design of complex digital system…

🔒5.3 Simplification of Logic Circuits

In the practice of ICT technicians, especially those working in hardware servicing and embedded system design, simplifying logic circuits is crucial for reducing the size, cost and power consumption of electronic devices. A simplified circuit uses fewer gates…

🔒5.4 Application of logic gates in electronic circuits

Logic gates form the foundation of digital electronics, enabling ICT technicians to build circuits that perform computation, control, and data processing. In Kenya’s ICT environment, applications range from simple control systems in automated kiosks to complex…

Chapter Summary

This chapter introduced the fundamental concept of logic gates, starting with clear definitions of key terms essential for understanding digital electronics. It explored the various types of logic gates including AND, OR, NOT, NAND, NOR, XOR, and XNOR, detailing their distinct functions and significance in circuit design. The development of logic circuits was examined, highlighting how these gates are combined to perform complex logical operations. Simplification techniques for logic circuits were discussed extensively, covering methods such as Boolean algebra, Karnaugh maps, the Quine-McCluskey algorithm, and the use of software and CAD tools to optimize circuit efficiency. Finally, the chapter addressed practical applications of logic gates in electronic circuits, emphasizing their role in creating reliable and efficient digital systems. Through this comprehensive coverage, students gain the knowledge needed to identify, develop, simplify, and apply logic gates effectively in various electronic contexts.

Self-Assessment

🔒 PDFDownload this self-assessment, with answers

A. Written Assessment

  1. What is the primary function of a NOT gate in a logic circuit? (2 marks)
  2. Identify the logic gate that outputs true only when all inputs are true. (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 an AND gate and describe its output behavior when both inputs are high, relating your answer to a Kenyan network router’s decision logic. (4 marks)
  2. Explain the difference between a NAND gate and an AND gate in terms of output and logic operation. (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 19 questions Start quiz ▾
0%
0 / 2
🔒

17 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 using the 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 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.