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

  • Identify and use office internet services correctly by following office procedures.
  • Choose the right internet access applications to support your daily tasks.
  • Perform accurate internet searches to find information needed for your job.
  • Download digital content safely and correctly according to workplace rules.
  • Identify important digital content and back it up securely to prevent data loss.
  • Consistently send messages using the proper internal communication protocols.
  • Understand and respond to internal messages promptly and appropriately.
  • Update and process documentation and drawings accurately to meet ship requirements.

Mastering these skills will help you work efficiently and communicate clearly in a real trade environment, making you a valuable team member.

Logic gates and Boolean algebra form the foundation of digital electronics, which is essential for designing and understanding circuits used in various electronics engineering applications in Kenya. From microcontrollers in automated irrigation systems to digital control in hospital equipment, mastering these concepts enables engineers to create efficient, reliable electronic systems. This chapter focuses on applying logic gates and Boolean algebra principles to solve real-world engineering problems, enhancing practical skills critical for professional success.

3.1 Basic logic gates

Basic logic gates are the building blocks of digital circuits used in electronics engineering. These gates perform fundamental logical operations on one or more binary inputs to produce a single binary output. Understanding these gates is crucial for designing complex digital systems such as counters, multiplexers, and control units commonly used in Kenyan industries like healthcare devices, banking ATMs, and automated manufacturing lines.

3.1.1 AND gate operation and calculation

The AND gate outputs a binary 1 only when all its inputs are 1; otherwise, it outputs 0. This gate is symbolized by a D-shaped figure with two or more inputs and one output. Its operation can be expressed mathematically as:

$$ Y = A \cdot B $$

where \(A\) and \(B\) are inputs and \(Y\) is the output.

Worked Examples

Example 1: In a security system, two sensors \(A\) and \(B\) must both detect motion (logic 1) to trigger an alarm. If \(A = 1\) and \(B = 0\), find the output.

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

$$ Y = A \cdot B $$

$$ Y = 1 \cdot 0 $$

$$ Y = 0 $$

Answer: 0 (alarm not triggered)

Example 2: A water pump controller requires both pressure sensor \(A\) and temperature sensor \(B\) to be active (1) to start. If \(A = 1\) and \(B = 1\), find the output.

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

$$ Y = A \cdot B $$

$$ Y = 1 \cdot 1 $$

$$ Y = 1 $$

Answer: 1 (pump starts)

Example 3: In an automated gate system, three inputs \(A\), \(B\), and \(C\) represent authorized card swipe, fingerprint scan, and facial recognition respectively. The gate opens only if all are true. Calculate output when \(A = 1\), \(B = 0\), and \(C = 1\).

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

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

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

$$ Y = 0 $$

Answer: 0 (gate remains closed)

Example 4: For a three-phase motor control, three interlocks \(A\), \(B\), and \(C\) must be active to energize the motor. If \(A = 1\), \(B = 1\), and \(C = 1\), find the output.

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

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

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

$$ Y = 1 $$

Answer: 1 (motor energized)

Example 5: In a farm irrigation system, two sensors \(A\) (soil moisture) and \(B\) (rain detector) control the pump. The pump runs only if soil is dry (\(A = 1\)) and no rain is detected (\(B = 1\)). Calculate output for \(A = 1\), \(B = 0\).

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

$$ Y = A \cdot B $$

$$ Y = 1 \cdot 0 $$

$$ Y = 0 $$

Answer: 0 (pump off)

3.1.2 OR gate operation and calculation

The OR gate outputs a binary 1 if at least one of its inputs is 1; it outputs 0 only when all inputs are 0. It is represented by a curved shape with two or more inputs and one output. The mathematical expression for two inputs is:

$$ Y = A + B $$

where \(A\) and \(B\) are inputs and \(Y\) is the output.

Worked Examples

Example 1: An alarm system activates if either sensor \(A\) or sensor \(B\) detects intrusion. Find output when \(A = 0\), \(B = 0\).

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

$$ Y = A + B $$

$$ Y = 0 + 0 $$

$$ Y = 0 $$

Answer: 0 (alarm off)

Example 2: A hospital generator starts if either main power \(A\) or backup power \(B\) is available. Calculate output when \(A = 0\), \(B = 1\).

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

$$ Y = A + B $$

$$ Y = 0 + 1 $$

$$ Y = 1 $$

Answer: 1 (generator starts)

Example 3: In a bank's security system, either door sensor \(A\) or window sensor \(B\) triggers the alarm. Calculate output when \(A = 1\), \(B = 0\).

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

$$ Y = A + B $$

$$ Y = 1 + 0 $$

$$ Y = 1 $$

Answer: 1 (alarm triggered)

Example 4: For a retail store lighting control, lights switch on if either motion sensor \(A\) or manual switch \(B\) is active. Find output when \(A = 0\), \(B = 1\).

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

$$ Y = A + B $$

$$ Y = 0 + 1 $$

$$ Y = 1 $$

Answer: 1 (lights on)

Example 5: In a SACCO office, the air conditioning runs if either temperature sensor \(A\) or humidity sensor \(B\) detects high levels. Calculate output when \(A = 1\), \(B = 1\).

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

$$ Y = A + B $$

$$ Y = 1 + 1 $$

$$ Y = 1 $$

Answer: 1 (AC runs)

3.1.3 NOT gate operation and calculation

The NOT gate, or inverter, outputs the opposite of its single input: output is 1 when input is 0, and output is 0 when input is 1. It is represented by a triangle with a small circle at the output. Its operation is expressed as:

$$ Y = \overline{A} $$

where \(A\) is the input and \(Y\) is the output.

Worked Examples

Example 1: A temperature sensor output \(A = 0\) means low temperature. Find inverter output.

Given: \(A = 0\)

$$ Y = \overline{A} $$

$$ Y = \overline{0} $$

$$ Y = 1 $$

Answer: 1 (high output)

Example 2: In a traffic light control, a signal \(A = 1\) means green light. Find output after inverter.

Given: \(A = 1\)

$$ Y = \overline{A} $$

$$ Y = \overline{1} $$

$$ Y = 0 $$

Answer: 0 (red light)

Example 3: In a hospital alarm system, if sensor \(A = 0\) means no fire, inverter output triggers siren. Calculate output.

Given: \(A = 0\)

$$ Y = \overline{A} $$

$$ Y = \overline{0} $$

$$ Y = 1 $$

Answer: 1 (siren on)

Example 4: A pump control input \(A = 1\) means pump running. Find output from inverter for safety shutdown.

Given: \(A = 1\)

$$ Y = \overline{A} $$

$$ Y = \overline{1} $$

$$ Y = 0 $$

Answer: 0 (no shutdown)

Example 5: In a solar panel system, sensor \(A = 0\) indicates no sunlight. Calculate inverter output to activate battery backup.

Given: \(A = 0\)

$$ Y = \overline{A} $$

$$ Y = \overline{0} $$

$$ Y = 1 $$

Answer: 1 (battery backup on)

3.1.4 NAND and NOR gates operation and calculations

NAND and NOR gates are combinations of basic gates with inversion. The NAND gate outputs 0 only when all inputs are 1; otherwise, it outputs 1. The NOR gate outputs 1 only when all inputs are 0; otherwise, it outputs 0. These gates are universal and used extensively in digital circuit design.

NAND gate formula:

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

NOR gate formula:

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

Worked Examples

Example 1 (NAND): In a security system, two sensors \(A=1\), \(B=1\) are active. Find NAND output.

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

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

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

$$ Y = \overline{1} $$

$$ Y = 0 $$

Answer: 0 (alarm off)

Example 2 (NAND): For a machine interlock, \(A=0\), \(B=1\), find output.

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

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

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

$$ Y = \overline{0} $$

$$ Y = 1 $$

Answer: 1 (machine allowed)

Example 3 (NOR): In a lighting system, sensors \(A=0\), \(B=0\) detect no movement. Find NOR output.

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

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

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

$$ Y = \overline{0} $$

$$ Y = 1 $$

Answer: 1 (lights off)

Example 4 (NOR): For a fire alarm, sensors \(A=1\), \(B=0\). Calculate NOR output.

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

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

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

$$ Y = \overline{1} $$

$$ Y = 0 $$

Answer: 0 (alarm on)

Example 5 (NAND): In a water pump system, sensors \(A=1\), \(B=0\), find NAND output.

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

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

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

$$ Y = \overline{0} $$

$$ Y = 1 $$

Answer: 1 (pump allowed)

Practice Questions

  1. Calculate the output of an AND gate with three inputs \(A=1\), \(B=1\), \(C=0\). (3 marks)
  2. For an OR gate, determine the output when inputs are \(A=0\), \(B=1\), \(C=1\). (3 marks)
  3. Find the output of a NOT gate when input \(A=0\). (2 marks)
  4. Calculate the output of a NAND gate with inputs \(A=1\), \(B=1\). (2 marks)
  5. For a NOR gate, find the output when inputs are \(A=0\), \(B=1\). (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 building blocks in digital electronics because they can be used to implement any Boolean function. In the Kenyan electronics engineering context, understanding universal gates is essential for designing cost-effective and…

🔒3.3 Special purpose gates

Special purpose gates are logic gates designed to perform specific logical functions that are not covered by basic gates like AND, OR, and NOT. In Electronics Engineering, especially in Kenya’s growing tech industries and institutions, these gates are essentia…

🔒3.4 Laws of Boolean Algebra

In Electronics Engineering, particularly in digital circuit design, the laws of Boolean algebra are fundamental tools used to simplify logic expressions and optimize digital circuits. Mastery of these laws allows engineers in Kenya to design efficient, cost-ef…

🔒3.5 Logic expressions simplification

Logic expression simplification is a fundamental skill in digital electronics engineering, crucial for designing efficient circuits with fewer components and lower power consumption. In the Kenyan electronics industry, whether developing embedded systems for a…

🔒3.6 K-MAPS

Karnaugh Maps (K-Maps) are essential tools in digital electronics engineering for simplifying Boolean algebra expressions, which reduces circuit complexity and improves efficiency. In the Kenyan electronics industry, where cost-effective and reliable digital d…

Chapter Summary

This chapter explored the fundamental building blocks of digital electronics by first examining basic logic gates such as AND, OR, and NOT, which form the foundation of digital circuits. It then covered universal logic gates, including NAND and NOR, highlighting their ability to implement any logical function. Special purpose gates like XOR and XNOR were introduced for their unique roles in specific applications. The chapter proceeded to explain the laws of Boolean algebra, providing the theoretical basis for manipulating logical expressions. Using these laws, techniques for simplifying logic expressions were demonstrated to optimize circuit design. Finally, Karnaugh Maps (K-Maps) were presented as a visual tool for minimizing Boolean functions efficiently, enhancing understanding and practical circuit implementation. This comprehensive approach equips students with the skills to analyze, simplify, and design digital logic circuits effectively.

Self-Assessment

🔒 PDFDownload this self-assessment, with answers

Written Assessment

  1. Given the logic gate AND with inputs \(A = 1\) and \(B = 0\), calculate the output \(Y\). (1 mark)

  2. For an OR gate with inputs \(A = 0\) and \(B = 0\), find the output \(Y\). (1 mark)

🔒8 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 circuit used for a bank's security system, identify the output of a NAND gate when both inputs are at logic 1. (4 marks)
  2. Draw the truth table for a NOR gate and explain its operation in a SACCO membership verification system. (4 marks)
🔒18 more in this section.

Chapter Practical Activities

Practical 1: Construct and test basic logic gate circuits using digital ICs

Electronics Engineering · Level 5
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.  Assemble and test AND, OR, and NOT gate circuits on a breadboard using 7408, 7432, and 7404 ICs, powered at 5V, verifying logic functions.
2.  You have been provided with the following resources for the practical task:
Tools & EquipmentMaterials
BreadboardAND gate IC 7408
Jumper wiresOR gate IC 7432
Digital multimeterNOT gate IC 7404
Logic probe or oscilloscopeResistors 1kΩ
DC power supply 5VPersonal Protective Equipment (PPE)
⬇ PDFResources Required (Cutting List)
S/NItemQuantity
1AND gate IC 74081 Pc per Candidate
2OR gate IC 74321 Pc per Candidate
3NOT gate IC 74041 Pc per Candidate
4Breadboard1 Pc per Candidate
5Jumper wires10 Pcs per Candidate
6Digital multimeter1 Pc per 3 Candidates
7DC power supply 5V1 Pc per 3 Candidates
8Logic probe or oscilloscope1 Pc per 3 Candidates
9Resistors 1kΩ4 Pcs per Candidate
10Personal Protective Equipment (PPE)1 Set per Candidate
⬇ PDFAssessor Guide
Items to be EvaluatedMarks AvailableMarks ObtainedComments
TASK 1: Assembly of basic logic gate circuits
Wore Personal Protective Equipment (PPE) correctly
(Award 1 or 0)
1
Ensured clean and organized working area before starting
(Award 1 or 0)
1
Identified and arranged all components correctly
(Award 2 or 0)
2
Mounted AND gate IC 7408 correctly on the breadboard
(Award 2 or 0)
2
Mounted OR gate IC 7432 correctly on the breadboard
(Award 2 or 0)
2
Mounted NOT gate IC 7404 correctly on the breadboard
(Award 2 or 0)
2
Connected input switches and output indicators using jumper wires correctly
(Award 3 or 0)
3
Used correct resistor values (1kΩ) for input protection or pull-down
(Award 2 or 0)
2
Powered the circuit with correct 5V DC supply
(Award 2 or 0)
2
Used digital multimeter or logic probe to verify input and output voltages
(Award 3 or 0)
3
Sub-Total20
TASK 2: Testing and verification of logic gate operation
Performed truth table tests for AND gate and recorded results
(Award 3 or 0)
3
Performed truth table tests for OR gate and recorded results
(Award 3 or 0)
3
Performed truth table tests for NOT gate and recorded results
(Award 3 or 0)
3
Interpreted test results correctly to confirm logic gate functions
(Award 3 or 0)
3
Compiled and presented a brief test report
(Award 3 or 0)
3
Sub-Total15
PRODUCT CHECKLIST
Correct assembly of AND gate circuit functioning as per truth table (4 inputs combinations)
(Award 5 or 0)
5
Correct assembly of OR gate circuit functioning as per truth table (4 inputs combinations)
(Award 5 or 0)
5
Correct assembly of NOT gate circuit functioning as per truth table (2 input states)
(Award 5 or 0)
5
Breadboard wiring neatness, firm connections and correct polarity
(Award 5 or 0)
5
Voltage supply stable at 5V ±0.1V during testing
(Award 3 or 0)
3
Sub-Total23
GRAND TOTAL58
ASSESSMENT OUTCOME:   ☐ Competent    ☐ Not Yet Competent (competent if at least 50%)

Practical 2: Implement Universal Logic Gate Circuits Using NAND and NOR Gates

Electronics Engineering · Level 5
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.  Build and test universal logic gate circuits using NAND and NOR gates to replicate AND, OR, and NOT functions on a 150mm x 100mm breadboard.
2.  You have been provided with the following resources for the practical task:
Tools & EquipmentMaterials
Digital multimeterNAND gate IC (CD4011)
Soldering ironNOR gate IC (CD4001)
Electronic toolkitBreadboard
Logic probe or LED indicatorsJumper wires
12V DC power supply
⬇ PDFResources Required (Cutting List)
S/NItemQuantity
1NAND gate IC (CD4011)1 Pc per Candidate
2NOR gate IC (CD4001)1 Pc per Candidate
3Breadboard1 Pc per Candidate
4Jumper wires10 Pcs per Candidate
5Digital multimeter1 Pc per Candidate
612V DC power supply1 Pc per Candidate
7Logic probe or LED indicators2 Pcs per Candidate
8Personal Protective Equipment (Safety boots, gloves)Appropriate per Candidate
9Electronic toolkit (pliers, wire stripper, screwdriver)1 Set per Candidate
10Soldering iron and solder wire1 Pc and enough wire per 3 Candidates
⬇ PDFAssessor Guide
Items to be EvaluatedMarks AvailableMarks ObtainedComments
TASK 1: Circuit Assembly and Wiring
Wore Personal Protective Equipment (Safety boots, gloves)
(Award 1 or 0)
1
Observed good housekeeping: clean and organized working area
(Award 1 or 0)
1
Identified and arranged components correctly on the breadboard
(Award 1 mark each for NAND and NOR gate ICs correctly placed)
2
Wired the NAND and NOR gates circuits according to the schematic
(Award 1 mark each for AND, OR, NOT function wiring using universal gates)
3
Used jumper wires neatly and ensured proper connections
(Award 2 or 0)
2
Connected the 12V DC power supply correctly with polarity
(Award 1 or 0)
1
Sub-Total10
TASK 2: Testing and Verification
Performed continuity test on all wiring using multimeter
(Award 2 or 0)
2
Tested each logic function (AND, OR, NOT) using logic probe or LED indicators
(Award 1.33 marks each for correct function operation)
4
Measured voltage at input and output points to verify logic levels
(Award 2 or 0)
2
Demonstrated universality by replicating basic logic functions using NAND and NOR gates
(Award 2 or 0)
2
Sub-Total10
PRODUCT CHECKLIST
Circuit layout matches the schematic with components correctly placed and wired
(Award 3 or 0)
3
All logic functions (AND, OR, NOT) operate correctly as per truth tables
(Award 5 or 0)
5
Circuit mounted neatly on 150mm x 100mm breadboard with no loose connections
(Award 2 or 0)
2
Sub-Total10
GRAND TOTAL30
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 test special purpose logic gates circuitPractical 3
🔒Simplify and verify Boolean expressions using Boolean algebra lawsPractical 4
🔒Simplification of Logic Expressions Using Karnaugh MapsPractical 5
🔒Design and construct a logic gate circuit from a simplified Boolean expressionPractical 6
🔒Construct and Test Universal Gate Conversion CircuitsPractical 7
🔒Verification of Boolean Algebra Laws Using Logic GatesPractical 8
🔒Design and Test Logic Circuits Using K-Map SimplificationsPractical 9
🔒Diagnose and Repair Faulty Logic Gate Circuit on BreadboardPractical 10
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:

  • Identify and use office internet services correctly by following office procedures.
  • Choose the right internet access applications to support your daily tasks.
  • Perform accurate internet searches to find information needed for your job.
  • Download digital content safely and correctly according to workplace rules.
  • Identify important digital content and back it up securely to prevent data loss.
  • Consistently send messages using the proper internal communication protocols.
  • Understand and respond to internal messages promptly and appropriately.
  • Update and process documentation and drawings accurately to meet ship 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.