Electrical Engineering  ·  Level 5
Digital Electronics I
Chapter 3: Apply Logic gates and Boolean algebra concepts
📚 6 Topics
⚑ What you will be able to do

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

  • accurately apply the principles of logic gates following digital system design specifications
  • correctly operate different types of logic gates based on digital system design needs
  • accurately use Boolean algebra concepts to simplify and analyze digital circuits
  • correctly apply logic circuit concepts to build and troubleshoot digital systems

These skills will help you design and work with digital electronics confidently, a key ability in many modern technology fields.

Logic gates and Boolean algebra form the foundation of digital electronics, enabling the design and analysis of complex electrical circuits used in control systems, communication devices, and computing equipment. In Kenya's electrical engineering sector, understanding these principles is essential for professionals working with programmable logic controllers, embedded systems, and digital instrumentation found in hospitals, banks, and industrial automation. This chapter focuses on applying logic gates and Boolean algebra concepts to solve practical electrical engineering problems, strengthening analytical skills required in digital circuit design.

3.1 Basic Logic Gates

Logic gates are the fundamental building blocks of digital circuits, performing basic logical functions on one or more binary inputs to produce a single binary output. Electrical engineers in Kenya utilize these gates in designing control panels for county government offices, security systems in retail businesses, and automation systems in agricultural farms. Mastery of the behavior and calculation methods involving AND, OR, NOT, NAND, NOR, XOR, and XNOR gates is critical for effective circuit design and troubleshooting.

3.1.1 AND Gate Calculations

The AND gate outputs a high signal (1) only when all its inputs are high. It is commonly used in safety interlock systems and multi-condition control circuits.

The output \( Y \) of a two-input AND gate with inputs \( A \) and \( B \) is given by:

$$ Y = A \cdot B $$

Worked Examples

Example 1: A control system uses an AND gate with inputs \( A = 1 \) and \( B = 0 \). Calculate the output.

Given: \( A = 1 \), \( B = 0 \)

$$ Y = A \cdot B $$

$$ Y = 1 \cdot 0 $$

$$ Y = 0 $$

Answer: \( Y = 0 \)

Example 2: In a security system, two sensors provide inputs \( A = 1 \) and \( B = 1 \) to an AND gate. Find the output.

Given: \( A = 1 \), \( B = 1 \)

$$ Y = A \cdot B $$

$$ Y = 1 \cdot 1 $$

$$ Y = 1 $$

Answer: \( Y = 1 \)

Example 3: A three-input AND gate receives inputs \( A = 1 \), \( B = 0 \), and \( C = 1 \). Find the output.

Given: \( A = 1 \), \( B = 0 \), \( C = 1 \)

$$ Y = A \cdot B \cdot C $$

$$ Y = 1 \cdot 0 \cdot 1 $$

$$ Y = 0 $$

Answer: \( Y = 0 \)

Example 4: An industrial automation circuit uses a four-input AND gate with inputs \( A=1 \), \( B=1 \), \( C=1 \), and \( D=1 \). Calculate the output.

Given: \( A=1 \), \( B=1 \), \( C=1 \), \( D=1 \)

$$ Y = A \cdot B \cdot C \cdot D $$

$$ Y = 1 \cdot 1 \cdot 1 \cdot 1 $$

$$ Y = 1 $$

Answer: \( Y = 1 \)

Example 5: In a building management system, a three-input AND gate has inputs \( A=1 \), \( B=1 \), and \( C=0 \). Determine the output.

Given: \( A=1 \), \( B=1 \), \( C=0 \)

$$ Y = A \cdot B \cdot C $$

$$ Y = 1 \cdot 1 \cdot 0 $$

$$ Y = 0 $$

Answer: \( Y = 0 \)

3.1.2 OR Gate Calculations

The OR gate outputs a high signal (1) if at least one input is high. It is widely used in alarm systems and redundant control circuits.

The output \( Y \) of a two-input OR gate with inputs \( A \) and \( B \) is:

$$ Y = A + B $$

Worked Examples

Example 1: A fire alarm system uses an OR gate with inputs \( A=0 \) and \( B=0 \). Calculate the output.

Given: \( A=0 \), \( B=0 \)

$$ Y = A + B $$

$$ Y = 0 + 0 $$

$$ Y = 0 $$

Answer: \( Y = 0 \)

Example 2: A backup generator control uses an OR gate with inputs \( A=1 \), \( B=0 \). Find the output.

Given: \( A=1 \), \( B=0 \)

$$ Y = A + B $$

$$ Y = 1 + 0 $$

$$ Y = 1 $$

Answer: \( Y = 1 \)

Example 3: In a water pumping system, a three-input OR gate has inputs \( A=0 \), \( B=1 \), \( C=0 \). Calculate the output.

Given: \( A=0 \), \( B=1 \), \( C=0 \)

$$ Y = A + B + C $$

$$ Y = 0 + 1 + 0 $$

$$ Y = 1 $$

Answer: \( Y = 1 \)

Example 4: A building lighting control uses an OR gate with four inputs \( A=0 \), \( B=0 \), \( C=0 \), \( D=1 \). Determine the output.

Given: \( A=0 \), \( B=0 \), \( C=0 \), \( D=1 \)

$$ Y = A + B + C + D $$

$$ Y = 0 + 0 + 0 + 1 $$

$$ Y = 1 $$

Answer: \( Y = 1 \)

Example 5: A security system uses a three-input OR gate with inputs \( A=0 \), \( B=0 \), \( C=0 \). Calculate the output.

Given: \( A=0 \), \( B=0 \), \( C=0 \)

$$ Y = A + B + C $$

$$ Y = 0 + 0 + 0 $$

$$ Y = 0 $$

Answer: \( Y = 0 \)

3.1.3 NOT Gate Calculations

The NOT gate produces an output that is the logical complement of the input, also known as an inverter. It is used in signal conditioning and logic level conversion.

The output \( Y \) for input \( A \) is:

$$ Y = \overline{A} $$

Worked Examples

Example 1: Calculate the output of a NOT gate with input \( A=0 \).

Given: \( A=0 \)

$$ Y = \overline{A} $$

$$ Y = \overline{0} $$

$$ Y = 1 $$

Answer: \( Y = 1 \)

Example 2: Find the output of a NOT gate when \( A=1 \).

Given: \( A=1 \)

$$ Y = \overline{A} $$

$$ Y = \overline{1} $$

$$ Y = 0 $$

Answer: \( Y = 0 \)

Example 3: A sensor output is \( A=0 \). Calculate the NOT gate output.

Given: \( A=0 \)

$$ Y = \overline{A} $$

$$ Y = \overline{0} $$

$$ Y = 1 $$

Answer: \( Y = 1 \)

Example 4: An inverter in a control circuit receives \( A=1 \). Determine the output.

Given: \( A=1 \)

$$ Y = \overline{A} $$

$$ Y = \overline{1} $$

$$ Y = 0 $$

Answer: \( Y = 0 \)

Example 5: A digital logic signal \( A=0 \) is fed into a NOT gate. Find the output.

Given: \( A=0 \)

$$ Y = \overline{A} $$

$$ Y = \overline{0} $$

$$ Y = 1 $$

Answer: \( Y = 1 \)

3.1.4 NAND Gate Calculations

The NAND gate outputs a low signal only when all its inputs are high; otherwise, the output is high. It is widely used in building universal logic circuits and memory devices.

The output \( Y \) of a two-input NAND gate with inputs \( A \) and \( B \) is:

$$ Y = \overline{A \cdot B} $$

Worked Examples

Example 1: Calculate the output of a NAND gate with inputs \( A=1 \), \( B=1 \).

Given: \( A=1 \), \( B=1 \)

$$ Y = \overline{A \cdot B} $$

$$ Y = \overline{1 \cdot 1} $$

$$ Y = \overline{1} $$

$$ Y = 0 $$

Answer: \( Y = 0 \)

Example 2: Find the output of a NAND gate with inputs \( A=1 \), \( B=0 \).

Given: \( A=1 \), \( B=0 \)

$$ Y = \overline{A \cdot B} $$

$$ Y = \overline{1 \cdot 0} $$

$$ Y = \overline{0} $$

$$ Y = 1 $$

Answer: \( Y = 1 \)

Example 3: A three-input NAND gate receives inputs \( A=1 \), \( B=1 \), \( C=0 \). Calculate the output.

Given: \( A=1 \), \( B=1 \), \( C=0 \)

$$ Y = \overline{A \cdot B \cdot C} $$

$$ Y = \overline{1 \cdot 1 \cdot 0} $$

$$ Y = \overline{0} $$

$$ Y = 1 $$

Answer: \( Y = 1 \)

Example 4: Determine the output of a four-input NAND gate with inputs \( A=1 \), \( B=1 \), \( C=1 \), \( D=1 \).

Given: \( A=1 \), \( B=1 \), \( C=1 \), \( D=1 \)

$$ Y = \overline{A \cdot B \cdot C \cdot D} $$

$$ Y = \overline{1 \cdot 1 \cdot 1 \cdot 1} $$

$$ Y = \overline{1} $$

$$ Y = 0 $$

Answer: \( Y = 0 \)

Example 5: A NAND gate in a control system has inputs \( A=0 \), \( B=0 \). Calculate the output.

Given: \( A=0 \), \( B=0 \)

$$ Y = \overline{A \cdot B} $$

$$ Y = \overline{0 \cdot 0} $$

$$ Y = \overline{0} $$

$$ Y = 1 $$

Answer: \( Y = 1 \)

Practice Questions

  1. Calculate the output of a three-input AND gate when \( A=1 \), \( B=1 \), and \( C=0 \). (3 marks)

  2. Determine the output of a four-input OR gate with inputs \( A=0 \), \( B=0 \), \( C=1 \), and \( D=0 \). (3 marks)

  3. Find the output of a NOT gate when the input is \( A=1 \). (2 marks)

  4. Calculate the output of a NAND gate with inputs \( A=1 \), \( B=0 \), and \( C=1 \). (3 marks)

  5. A two-input AND gate receives inputs \( A=0 \) and \( B=0 \). Find the output. (2 marks)

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
🔒3.2 Universal Logic Gates Operation

Universal logic gates are fundamental components in digital electronics because they can be used to construct any other type of logic gate or digital circuit. In electrical engineering practice in Kenya, understanding the operation of universal gates like NAND…

🔒3.3 Special Purpose Gates

Special purpose gates are integral in digital electronics for implementing specific logical operations that standard gates cannot efficiently perform alone. These gates simplify complex logic circuit design, improving reliability and reducing component count i…

🔒3.4 Laws of Boolean Algebra

Boolean algebra laws form the foundation for simplifying and analyzing digital circuits in electrical engineering. In Kenya’s electrical engineering sector, especially in designing control systems and logic-based automation, mastery of these laws enhances effi…

🔒3.5 Logic Expressions Simplification

Simplification of logic expressions is a fundamental task in digital electronics, aimed at reducing the complexity of circuits used in electrical engineering applications such as control systems, automation, and embedded devices. In the Kenyan electrical engin…

🔒3.6 K-Maps

Karnaugh Maps (K-Maps) are a graphical tool used in digital electronics to simplify Boolean algebra expressions. In electrical engineering practice in Kenya, especially in designing control systems and digital circuits, K-Maps help reduce logical expressions t…

Chapter Summary

This chapter introduced the fundamental basic logic gates, explaining their individual operations and truth tables. It then explored universal logic gates, highlighting how NAND and NOR gates can be used to implement any logical function. The study continued with special purpose gates such as XOR and XNOR, emphasizing their unique characteristics and applications. The chapter also covered the essential laws of Boolean algebra, which provide the theoretical foundation for manipulating and simplifying logical expressions. Techniques for logic expression simplification were demonstrated to reduce complex logic circuits into simpler forms. Finally, the chapter focused on Karnaugh Maps (K-Maps) as a practical tool for visually simplifying Boolean expressions, making circuit design more efficient. Together, these topics build a comprehensive understanding of logic gate operation and Boolean algebra application in digital electronics.

Self-Assessment

🔒 PDFDownload this self-assessment, with answers

Written Assessment

  1. A logic circuit uses three inputs \(A\), \(B\), and \(C\). Calculate the output \(Y\) of the AND gate when \(A=1\), \(B=0\), and \(C=1\). (2 marks)

  2. For a NOR gate with two inputs \(X\) and \(Y\), find the output when \(X=0\) and \(Y=1\). (2 marks)

🔒18 more in this section.

Chapter Examination Questions

🔒 PDFDownload these examination questions, with worked answers

SECTION A (40 Marks) - Answer ALL Questions

  1. In a digital control system used by Kenya Power and Lighting Company (KPLC), a circuit uses an AND gate with inputs A and B. If input A is high (logic 1) and input B is low (logic 0), what is the output of the AND gate? (4 marks)
  2. Draw the truth table for a NAND gate and explain how it differs from an AND gate. (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 15 questions Start quiz ▾
0%
0 / 2
🔒

13 more in this section.

Create a free account
Am I competent?

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

  • accurately apply the principles of logic gates following digital system design specifications
  • correctly operate different types of logic gates based on digital system design needs
  • accurately use Boolean algebra concepts to simplify and analyze digital circuits
  • correctly apply logic circuit concepts to build and troubleshoot digital systems

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.