Electronics Engineering  ·  Level 6
Digital Electronics
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:

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

Mastering these skills will help you build and troubleshoot digital systems with confidence, a key ability in many modern electronics and technology careers.

Logic gates are the foundational building blocks of digital electronic circuits, enabling the processing of binary signals essential to all modern electronic devices. Mastery of logic gates and Boolean algebra is critical for electronics engineers designing and troubleshooting digital systems such as microcontrollers, communication devices, and control systems used across Kenyan industries. This chapter focuses on the application of basic logic gates and Boolean algebra concepts, emphasizing practical problem-solving through worked examples relevant to engineering scenarios in Kenya.

3.1 Basic Logic Gates

Basic logic gates perform fundamental binary operations on one or more input signals to produce a single output. Understanding their operation and how to apply Boolean algebra to simplify logical expressions is essential for designing efficient digital circuits in sectors such as telecommunications, manufacturing automation, and embedded systems development.

3.1.1 AND Gate Operation and Calculations

The AND gate outputs a logic HIGH (1) only when all its inputs are HIGH; otherwise, the output is LOW (0). The Boolean expression for a two-input AND gate is Y = A · B. This operation is represented mathematically as:

$$ Y = A \times B $$

where \(A\) and \(B\) are inputs taking values 0 or 1, and \(Y\) is the output.

Worked Examples

Example 1: An automated irrigation controller activates a pump only when two sensors detect sufficient soil moisture and water availability. If sensor A output is 1 and sensor B output is 0, determine the pump activation signal.

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

$$ Y = A \times B $$

$$ Y = 1 \times 0 $$

$$ Y = 0 $$

Answer: Pump activation signal = 0 (Pump OFF)

Example 2: In a security system, two switches must be simultaneously ON to trigger an alarm. If \(A=1\) and \(B=1\), find the alarm signal.

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

$$ Y = A \times B $$

$$ Y = 1 \times 1 $$

$$ Y = 1 $$

Answer: Alarm signal = 1 (Alarm ON)

Example 3: A digital counter reset requires three conditions: \(A=1\), \(B=1\), and \(C=0\). Compute the three-input AND gate output.

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

$$ Y = A \times B \times C $$

$$ Y = 1 \times 1 \times 0 $$

$$ Y = 0 $$

Answer: Counter reset signal = 0 (No reset)

3.1.2 OR Gate Operation and Calculations

The OR gate outputs a logic HIGH (1) if at least one input is HIGH. The Boolean expression for a two-input OR gate is Y = A + B, where "+" denotes the logical OR operation:

$$ Y = A + B $$

Worked Examples

Example 1: A hospital alarm system activates if either the fire alarm sensor (\(A\)) or the gas leak sensor (\(B\)) detects danger. If \(A=0\), \(B=1\), determine if the alarm sounds.

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

$$ Y = A + B $$

$$ Y = 0 + 1 $$

$$ Y = 1 $$

Answer: Alarm signal = 1 (Alarm ON)

Example 2: In a retail store, a door sensor (\(A\)) or a motion sensor (\(B\)) can trigger the security camera. If both sensors are inactive (\(A=0\), \(B=0\)), find the output.

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

$$ Y = A + B $$

$$ Y = 0 + 0 $$

$$ Y = 0 $$

Answer: Security camera trigger = 0 (No activation)

Example 3: A factory conveyor belt stops if any of three emergency stop buttons (\(A\), \(B\), or \(C\)) is pressed. If \(A=0\), \(B=1\), \(C=0\), determine the stop signal.

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

$$ Y = A + B + C $$

$$ Y = 0 + 1 + 0 $$

$$ Y = 1 $$

Answer: Conveyor stop signal = 1 (Stop activated)

3.1.3 NOT Gate Operation and Calculations

The NOT gate, or inverter, outputs the complement of its input. If the input is HIGH (1), the output is LOW (0), and vice versa. The Boolean expression is:

$$ Y = \overline{A} $$

where \(\overline{A}\) denotes the logical NOT of \(A\).

Worked Examples

Example 1: A temperature alarm activates when a sensor output is LOW (0). If the sensor output \(A=1\), find the alarm signal.

Given: \(A=1\)

$$ Y = \overline{A} $$

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

Answer: Alarm signal = 0 (No alarm)

Example 2: A digital logic circuit requires the inverted signal of \(A=0\). Find the output.

Given: \(A=0\)

$$ Y = \overline{A} $$

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

Answer: Output = 1

Example 3: In a light control system, the NOT gate output activates a relay when the input \(A=1\). Determine the relay control signal.

Given: \(A=1\)

$$ Y = \overline{A} $$

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

Answer: Relay control = 0 (Relay OFF)

3.1.4 NAND and NOR Gates: Combined Operations and Calculations

NAND and NOR gates are universal gates used extensively in digital design. The NAND gate outputs LOW only when all inputs are HIGH; otherwise, it outputs HIGH. The NOR gate outputs HIGH only when all inputs are LOW; otherwise, it outputs LOW.

NAND gate Boolean expression for two inputs:

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

NOR gate Boolean expression for two inputs:

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

Worked Examples

Example 1 (NAND): A control system uses a NAND gate to activate a signal only when both inputs \(A=1\), \(B=1\) are not simultaneously HIGH. Find the output.

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

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

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

$$ Y = 0 $$

Answer: Output = 0

Example 2 (NAND): If \(A=0\), \(B=1\), calculate the NAND output.

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

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

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

$$ Y = 1 $$

Answer: Output = 1

Example 3 (NOR): A signaling circuit uses a NOR gate to output HIGH only when both inputs \(A=0\), \(B=0\). Find the output.

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

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

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

$$ Y = 1 $$

Answer: Output = 1

Example 4 (NOR): If \(A=1\), \(B=0\), determine the NOR output.

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

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

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

$$ Y = 0 $$

Answer: Output = 0

Example 5 (NAND with three inputs): In a manufacturing line, a NAND gate with inputs \(A=1\), \(B=1\), and \(C=0\) controls a safety lock. Calculate the output.

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

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

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

$$ Y = 1 $$

Answer: Safety lock control = 1 (Unlocked)

Practice Questions

  1. A digital alarm system uses an AND gate with inputs \(A=1\) and \(B=0\). Determine the output. (2 marks)
  2. Calculate the output of an OR gate with three inputs \(A=0\), \(B=1\), \(C=1\). (3 marks)
  3. Find the NOT gate output when the input is \(A=0\). (2 marks)
  4. For a NAND gate with inputs \(A=1\), \(B=1\), calculate the output. (2 marks)
  5. A NOR gate receives inputs \(A=0\), \(B=1\). Find the output. (2 marks)
  6. Determine the output of a three-input NAND gate with \(A=1\), \(B=0\), \(C=1\). (3 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, specifically NAND and NOR gates, are fundamental in digital electronics because they can be used to implement any Boolean function. In Kenyan electronics engineering contexts, understanding these gates is crucial for designing cost-effec…

🔒3.3 Special Purpose Gates

Special purpose logic gates extend the functionality of basic gates by performing specific logical operations often required in digital electronics design. These gates simplify complex logic expressions and are essential in designing efficient circuits such as…

🔒3.4 Laws of Boolean Algebra

Boolean algebra forms the mathematical foundation for digital electronics, enabling the simplification and manipulation of logic expressions. In Electronics Engineering, especially in Kenya’s growing tech industry, mastering these laws ensures efficient circui…

🔒3.5 Logic Expressions Simplification

Logic expressions simplification is a fundamental skill in digital electronics engineering, especially for designing efficient circuits with minimal components and reduced power consumption. In the Kenyan electronics industry, where cost-effectiveness and reli…

🔒3.6 K-Maps

Karnaugh Maps (K-Maps) provide a visual method for simplifying Boolean algebra expressions, crucial in designing efficient digital circuits in Electronics Engineering. In Kenya, professionals frequently apply K-Maps to optimize logic in embedded systems, commu…

Chapter Summary

This chapter introduced the fundamental basic logic gates such as AND, OR, and NOT, explaining their functions and truth tables. It then explored universal logic gates, NAND and NOR, highlighting their ability to implement any logical function. The discussion proceeded to special purpose gates like XOR and XNOR, which are essential for specific digital operations. The chapter covered the laws of Boolean algebra, providing the foundational rules used to manipulate and simplify logic expressions. Techniques for logic expressions simplification were demonstrated to reduce circuit complexity and improve efficiency. Finally, the chapter presented Karnaugh Maps (K-Maps) as a powerful graphical method for minimizing Boolean expressions, reinforcing the simplification process with practical problem-solving tools.

Self-Assessment

🔒 PDFDownload this self-assessment, with answers

Written Assessment

  1. Given the logic circuit with inputs \(A = 1\) and \(B = 0\), calculate the output \(Y\) of an AND gate. (1 mark)
  2. Calculate the output of a NAND gate when both inputs \(A\) and \(B\) are 1. (1 mark)
🔒18 more in this section.

Chapter Examination Questions

🔒 PDFDownload these examination questions, with worked answers

SECTION A (40 Marks) - Answer ALL Questions

  1. In designing a security access control system for a Nairobi bank, explain the output of a NAND gate when both inputs are at logic 1. (4 marks)
  2. Draw the truth table for a 2-input NOR gate and explain its output for all input combinations. (4 marks)
🔒18 more in this section.

Chapter Practical Activities

Practical 1: Construct and test AND, OR, and NOT gate circuits on a breadboard

Electronics Engineering · Level 6
Digital Electronics
PRACTICAL ASSESSMENT
TIME: 4 HOURS
⬇ PDFCandidate Instructions (Candidate Tool)

Type: Individual

INSTRUCTIONS TO CANDIDATE:
1.  You are required to perform the following task:
i.  Construct and test AND, OR, and NOT gate circuits on a breadboard using the provided ICs and verify their outputs with LEDs and a multimeter.
2.  You have been provided with the following resources for the practical task:
Tools & EquipmentMaterials
Pliers7408 AND gate IC
Side cutter7432 OR gate IC
Multimeter7404 NOT gate IC
Breadboard220Ω Resistors
5V DC power supply adapterLEDs (Red, Green)
Connecting wires assorted colours
Personal Protective Equipment (Dust coat/Overall)
⬇ PDFResources Required (Cutting List)
S/NItemQuantity
17408 AND gate IC1 Pc per Candidate
27432 OR gate IC1 Pc per Candidate
37404 NOT gate IC1 Pc per Candidate
4Breadboard1 Pc per Candidate
5Connecting wires assorted coloursAssorted per Candidate
65V DC power supply adapter1 Pc per Candidate
7LEDs (Red, Green)2 Pcs per Candidate
8220Ω Resistors4 Pcs per Candidate
9Multimeter1 Pc per Candidate
10Pliers1 Pair per Candidate
11Side cutter1 Pair per Candidate
12Personal Protective Equipment (Dust coat/Overall)1 Set per Candidate
⬇ PDFAssessor Guide
Items to be EvaluatedMarks AvailableMarks ObtainedComments
TASK 1: Construction and Testing of Logic Gate Circuits
Wore Personal Protective Equipment (Dust coat/Overall)
(Award 1 or 0)
1
Applied good housekeeping practice ensuring clean working area before starting
(Award 1 or 0)
1
Identified and selected correct ICs and components
(Award 1 mark for each correct IC identified)
2
Used correct tools for wiring and component placement
(Award 2 or 0)
2
Connected AND gate circuit correctly on the breadboard
(Award 3 or 0)
3
Connected OR gate circuit correctly on the breadboard
(Award 3 or 0)
3
Connected NOT gate circuit correctly on the breadboard
(Award 3 or 0)
3
Used correct resistor values to protect LEDs
(Award 2 or 0)
2
Verified output of each logic gate using LEDs and multimeter
(Award 1 mark for each gate correctly tested and verified)
5
Demonstrated correct wiring neatness and adherence to colour code
(Award 2 or 0)
2
Sub-Total24
PRODUCT CHECKLIST
AND, OR, and NOT gate circuits constructed with correct wiring and functional outputs
(Award 5 or 0)
5
Output verification matches expected logic operation for each gate (AND, OR, NOT)
(Award 5 or 0)
5
Circuit wiring is neat, components firmly fixed on breadboard, and correct resistor values used
(Award 4 or 0)
4
Breadboard layout matches the schematic diagram with correct pin connections
(Award 4 or 0)
4
Sub-Total18
GRAND TOTAL42
ASSESSMENT OUTCOME:   ☐ Competent    ☐ Not Yet Competent (competent if at least 50%)

Practical 2: Implementation of Universal Logic Gates to Replicate Basic Gates

Electronics Engineering · Level 6
Digital Electronics
PRACTICAL ASSESSMENT
TIME: 4 HOURS
⬇ PDFCandidate Instructions (Candidate Tool)

Type: Individual

INSTRUCTIONS TO CANDIDATE:
1.  You are required to perform the following task:
i.  Design and assemble digital logic circuits using NAND and NOR gates on a breadboard to replicate AND, OR, and NOT gates, with outputs indicated by LEDs and powered by 5V DC supply.
2.  You have been provided with the following resources for the practical task:
Tools & EquipmentMaterials
PliersNAND gate IC 7400
Side CutterNOR gate IC 7402
MultimeterBreadboard
Connecting wires
5V DC Power supply
LEDs
220 Ohm Resistors
Personal Protective Equipment (Dustcoat/Overall)
⬇ PDFResources Required (Cutting List)
S/NItemQuantity
1NAND gate IC 74001 Pc per Candidate
2NOR gate IC 74021 Pc per Candidate
3Breadboard1 Pc per Candidate
4Connecting wiresAssorted per Candidate
55V DC Power supply1 Pc per Candidate
6LEDs (Red, Green)3 Pcs per Candidate
7220 Ohm Resistors3 Pcs per Candidate
8Multimeter1 Pc per Candidate
9Pliers1 Pair per Candidate
10Side Cutter1 Pair per Candidate
11Personal Protective Equipment (Dustcoat/Overall)1 Set per Candidate
⬇ PDFAssessor Guide
Items to be EvaluatedMarks AvailableMarks ObtainedComments
TASK 1: Circuit Assembly and Testing
Wore Personal Protective Equipment (Dustcoat/Overall)
(Award 1 for correct PPE worn, 0 if not)
1
Applied good housekeeping practice by ensuring clean working area before starting
(Award 1 if area is clean and organized, 0 if cluttered)
1
Identified and used correct tools for circuit assembly (pliers, side cutter, multimeter)
(Award 1 mark each for correct use of pliers and side cutter)
2
Connected NAND and NOR gates on breadboard correctly to replicate AND gate function
(Award 3 marks for correct wiring and logic)
3
Connected NAND and NOR gates on breadboard correctly to replicate OR gate function
(Award 3 marks for correct wiring and logic)
3
Connected NAND and NOR gates on breadboard correctly to replicate NOT gate function
(Award 3 marks for correct wiring and logic)
3
Used 220 Ohm resistors and LEDs correctly on output lines
(Award 2 marks for correct resistor and LED placement)
2
Powered the circuit correctly with 5V DC supply
(Award 2 marks for correct power connection and polarity)
2
Performed continuity test on assembled circuits using multimeter
(Award 2 marks for successful continuity testing)
2
Demonstrated correct operation of replicated AND, OR, and NOT gates with LEDs
(Award 5 marks for correct logic outputs as per truth tables)
5
Sub-Total24
PRODUCT CHECKLIST
Circuit wiring matches the working schematic with correct connections and neat layout
(Award 5 marks for neat, correct wiring and component placement)
5
Output LEDs correctly indicate logic gate functions according to truth tables
(Award 6 marks for correct logic function demonstration)
6
Circuit operates reliably without loose connections or shorts
(Award 5 marks for reliable operation without faults)
5
Sub-Total16
GRAND TOTAL40
ASSESSMENT OUTCOME:   ☐ Competent    ☐ Not Yet Competent (competent if at least 50%)
🔒

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

Create a free account
🔒Assemble and Demonstrate Special Purpose Logic Gates XOR and XNORPractical 3
🔒Simplify Boolean expressions using Boolean algebra laws and verify resultsPractical 4
🔒Simplify and Implement Logic Expressions CircuitPractical 5
🔒Minimize Given Logic Functions Using Karnaugh MapsPractical 6
🔒Design and Build a 3-Variable Logic Circuit from K-Map Simplified ExpressionPractical 7
🔒Design and Construct Complex Logic Circuit Using Only NAND GatesPractical 8
🔒Experimental Verification of Boolean Algebra Laws Using Logic GatesPractical 9
🔒Develop and Verify Truth Tables for Logic Gate CircuitsPractical 10
Flashcards 20 cards Study deck ▾
Question
1

↻ Tap card to reveal answer
🔒

18 more in this section.

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

8 more in this section.

Create a free account
Am I competent?

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

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

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.