By the end of this chapter, you will be able to:
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.
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.
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 $$
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 \)
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 $$
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 \)
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} $$
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 \)
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} $$
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 \)
Calculate the output of a three-input AND gate when \( A=1 \), \( B=1 \), and \( C=0 \). (3 marks)
Determine the output of a four-input OR gate with inputs \( A=0 \), \( B=0 \), \( C=1 \), and \( D=0 \). (3 marks)
Find the output of a NOT gate when the input is \( A=1 \). (2 marks)
Calculate the output of a NAND gate with inputs \( A=1 \), \( B=0 \), and \( C=1 \). (3 marks)
A two-input AND gate receives inputs \( A=0 \) and \( B=0 \). Find the output. (2 marks)
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis 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.
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)
For a NOR gate with two inputs \(X\) and \(Y\), find the output when \(X=0\) and \(Y=1\). (2 marks)
At the start of this chapter we promised you would be able to:
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.