By the end of this chapter, you will be able to:
Mastering these skills will help you build and troubleshoot digital systems confidently, a crucial ability in today’s technology-driven world.
Logic gates and Boolean algebra form the foundation of digital electronics, essential in designing and analyzing electrical circuits used in control systems, communication devices, and computing equipment. In Kenya's electrical engineering sector, proficiency in these concepts enables professionals to develop efficient digital systems for automation, data processing, and embedded control applications. This chapter focuses on applying logic gates and Boolean algebra to solve practical problems and optimize digital circuit design.
Basic logic gates are the fundamental building blocks of digital circuits. Each gate performs a specific logical operation on one or more binary inputs to produce a single binary output. Understanding these gates and their truth tables is critical for creating and simplifying complex digital systems used in electrical engineering projects across industries such as manufacturing automation and telecommunication.
The AND gate outputs a high signal (1) only when all its inputs are high. Its operation is denoted by the Boolean expression \( Y = A \cdot B \), where \(A\) and \(B\) are inputs and \(Y\) is the output.
$$ Y = A \cdot B $$
Example 1: In a control panel, two switches \(A\) and \(B\) control a motor. Determine the output \(Y\) when both switches are ON.
Given: \(A = 1\), \(B = 1\)
$$ Y = A \cdot B $$
$$ Y = 1 \cdot 1 $$
$$ Y = 1 $$
Answer: 1 (Motor ON)
Example 2: Calculate the output when switch \(A = 0\) and \(B = 1\).
Given: \(A = 0\), \(B = 1\)
$$ Y = A \cdot B $$
$$ Y = 0 \cdot 1 $$
$$ Y = 0 $$
Answer: 0 (Motor OFF)
Example 3: For a security system, two sensors \(A\) and \(B\) must both detect an intruder to trigger an alarm. Find the output if \(A=1\) and \(B=0\).
Given: \(A=1\), \(B=0\)
$$ Y = A \cdot B $$
$$ Y = 1 \cdot 0 $$
$$ Y = 0 $$
Answer: 0 (Alarm NOT triggered)
The OR gate outputs a high signal (1) if at least one input is high. Its Boolean expression is \( Y = A + B \), where \(+\) denotes logical OR.
$$ Y = A + B $$
Example 1: In a lighting system, two sensors \(A\) and \(B\) detect motion. The light turns ON if either sensor is triggered. Find \(Y\) when \(A=0\), \(B=1\).
Given: \(A=0\), \(B=1\)
$$ Y = A + B $$
$$ Y = 0 + 1 $$
$$ Y = 1 $$
Answer: 1 (Light ON)
Example 2: Calculate the output if both sensors are inactive \(A=0\), \(B=0\).
Given: \(A=0\), \(B=0\)
$$ Y = A + B $$
$$ Y = 0 + 0 $$
$$ Y = 0 $$
Answer: 0 (Light OFF)
Example 3: For a fire alarm system, two detectors \(A\) and \(B\) are installed. The alarm triggers if any detector senses smoke. Find \(Y\) when \(A=1\), \(B=1\).
Given: \(A=1\), \(B=1\)
$$ Y = A + B $$
$$ Y = 1 + 1 $$
$$ Y = 1 $$
Answer: 1 (Alarm ON)
The NOT gate, or inverter, outputs the opposite of the input signal. Its Boolean expression is \( Y = \overline{A} \).
$$ Y = \overline{A} $$
Example 1: In a relay control circuit, an input \(A=1\) is inverted to control a normally closed contact. Find \(Y\).
Given: \(A=1\)
$$ Y = \overline{A} $$
$$ Y = \overline{1} = 0 $$
Answer: 0 (Contact open)
Example 2: Calculate output \(Y\) when \(A=0\).
Given: \(A=0\)
$$ Y = \overline{A} $$
$$ Y = \overline{0} = 1 $$
Answer: 1 (Contact closed)
Example 3: For a temperature alarm, the sensor output \(A=1\) indicates normal temperature. The alarm should activate when temperature is abnormal (NOT \(A\)). Find \(Y\).
Given: \(A=1\)
$$ Y = \overline{A} $$
$$ Y = \overline{1} = 0 $$
Answer: 0 (Alarm OFF)
The NAND gate outputs low only when all inputs are high; otherwise, it outputs high. Its Boolean expression is \( Y = \overline{A \cdot B} \).
$$ Y = \overline{A \cdot B} $$
Example 1: For a motor starter circuit, two interlocks \(A\) and \(B\) must be ON to stop the motor. Find \(Y\) when \(A=1\), \(B=1\).
Given: \(A=1\), \(B=1\)
$$ Y = \overline{A \cdot B} $$
$$ Y = \overline{1 \cdot 1} $$
$$ Y = \overline{1} = 0 $$
Answer: 0 (Motor stop signal active)
Example 2: Calculate \(Y\) if \(A=0\), \(B=1\).
Given: \(A=0\), \(B=1\)
$$ Y = \overline{A \cdot B} $$
$$ Y = \overline{0 \cdot 1} $$
$$ Y = \overline{0} = 1 $$
Answer: 1 (Motor stop signal inactive)
Example 3: In a safety interlock, sensors \(A\) and \(B\) are connected to a NAND gate. Find output when \(A=0\), \(B=0\).
Given: \(A=0\), \(B=0\)
$$ Y = \overline{A \cdot B} $$
$$ Y = \overline{0 \cdot 0} $$
$$ Y = \overline{0} = 1 $$
Answer: 1 (Safety enabled)
For an industrial control system, two sensors \(A\) and \(B\) are connected to an AND gate controlling a valve. Calculate the output \(Y\) for the input combinations: (a) \(A=1\), \(B=0\), (b) \(A=1\), \(B=1\), (c) \(A=0\), \(B=0\). (3 marks)
A lighting control uses an OR gate with inputs \(A\) and \(B\). Determine the output for the input sets: (a) \(A=0\), \(B=1\), (b) \(A=1\), \(B=1\), (c) \(A=0\), \(B=0\). (3 marks)
In a relay circuit, a NOT gate inverts input \(A\). Find output \(Y\) when \(A=1\) and \(A=0\). (2 marks)
For a safety system, two sensors \(A\) and \(B\) are connected to a NAND gate. Calculate output \(Y\) for: (a) \(A=1\), \(B=1\), (b) \(A=0\), \(B=1\), (c) \(A=0\), \(B=0\). (3 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, including AND, OR, and NOT gates, explaining their operations and truth tables. It then explored the concept of universal logic gates, specifically NAND and NOR gates, which can be used to implement any logic function. The discussion continued with special purpose gates such as XOR and XNOR, highlighting their unique functions in digital circuits. The chapter covered the laws of Boolean algebra, presenting the essential rules for manipulating and simplifying Boolean expressions. Following this, methods for logic expressions simplification were explained, demonstrating how to reduce complex expressions to simpler forms. Finally, the chapter introduced Karnaugh Maps (K-Maps) as a graphical technique for minimizing Boolean functions efficiently, reinforcing the simplification process for practical circuit design. Together, these topics provide a comprehensive foundation for understanding and applying digital logic in electronics.
Given two binary inputs \(A = 1\) and \(B = 0\), calculate the output of an AND gate. (1 mark)
For inputs \(A = 1\), \(B = 1\), and \(C = 0\), find the output of a three-input OR gate. (1 mark)
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Breadboard | IC 7408 |
| Digital Multimeter | IC 7432 |
| Wire Stripper and Cutter | IC 7404 |
| PPE (Safety boots, Overall) | 5V DC Power Supply |
| Jumper Wires | |
| Push Button Switches | |
| 470 Ω Resistors | |
| LEDs |
| S/N | Item | Quantity |
|---|---|---|
| 1 | Breadboard | 1 Pc per Candidate |
| 2 | IC 7408 (Quad 2-input AND gate) | 1 Pc per Candidate |
| 3 | IC 7432 (Quad 2-input OR gate) | 1 Pc per Candidate |
| 4 | IC 7404 (Hex Inverter NOT gate) | 1 Pc per Candidate |
| 5 | 5V DC Power Supply | 1 Pc per 5 Candidates |
| 6 | Digital Multimeter | 1 Pc per 5 Candidates |
| 7 | Jumper Wires | Enough per Candidate |
| 8 | Push Button Switches | 4 Pcs per Candidate |
| 9 | 470 Ω Resistors | 6 Pcs per Candidate |
| 10 | LEDs (Light Emitting Diodes) | 6 Pcs per Candidate |
| 11 | PPE (Safety boots, Overall) | 1 Set per Candidate |
| 12 | Wire Stripper and Cutter | 1 Pc per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| TASK 1: Safety and Preparation | |||
| Wore PPE including safety boots and overalls (Award 2 marks if PPE worn correctly; else 0) | 2 | ||
| Ensured clean and well-lit working environment (Award 2 marks for clean, ventilated, and well-lit area) | 2 | ||
| Assembled all tools and materials before starting (Award 2 marks if all tools/materials ready) | 2 | ||
| Identified and verified all components and ICs (Award 2 marks each for correctly identifying IC 7408 and IC 7432; 2 marks for IC 7404) | 4 | ||
| Sub-Total | 10 | ||
| TASK 2: Circuit Assembly | |||
| Mounted ICs on the breadboard correctly (Award 1 mark each for proper placement of IC 7408, IC 7432, IC 7404) | 3 | ||
| Connected push button switches as inputs with correct wiring (Award 1 mark each for correct wiring of switches to inputs) | 3 | ||
| Connected LEDs with 470 Ω resistors as outputs (Award 1 mark each for proper LED and resistor connections) | 4 | ||
| Connected 5V power supply with correct polarity (Award 2 marks for correct power connections) | 2 | ||
| Used jumper wires neatly and economically (Award 3 marks for neat, short, and economic wiring) | 3 | ||
| Checked all connections before powering (Award 2 marks for thorough inspection) | 2 | ||
| Sub-Total | 17 | ||
| TASK 3: Testing and Verification | |||
| Powered the circuit and tested AND gate operation with all input combinations (Award 1 mark for each correct AND gate input/output test) | 4 | ||
| Tested OR gate operation with all input combinations (Award 1 mark for each correct OR gate input/output test) | 4 | ||
| Tested NOT gate operation with input high and low (Award 2 marks for correct NOT gate operation) | 2 | ||
| Measured output voltages at test points with multimeter (Award 3 marks for correct voltage measurement and recording) | 3 | ||
| Demonstrated correct logic levels on LEDs as per gate operation (Award 1 mark each for correct LED indications for AND, OR, NOT) | 4 | ||
| Sub-Total | 17 | ||
| PRODUCT CHECKLIST | |||
| Circuit assembled matches schematic with correct component placement and connections (Award 5 marks if circuit matches schematic exactly) | 5 | ||
| Circuit dimensions approximately 170mm x 55mm as per breadboard layout (Award 3 marks if circuit fits within specified dimensions) | 3 | ||
| All logic gates tested and verified to operate correctly (Award 5 marks if AND, OR, NOT gates operate as expected) | 5 | ||
| Wiring is neat, secure, and economic (Award 5 marks for neatness and economy of wiring) | 5 | ||
| Sub-Total | 18 | ||
| GRAND TOTAL | 62 | ||
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| 3V DC Power Supply | Copper Strip Board |
| Digital Multimeter | NAND Gate IC 7400 |
| Soldering Iron | NOR Gate IC 7402 |
| Wire Cutter/Stripper | 1 kΩ Resistor |
| Jumper Wires | Solder Wire |
| PPE (Safety Boots, Overall) |
| S/N | Item | Quantity |
|---|---|---|
| 1 | 3V DC Power Supply | 1 Pc per 5 Candidates |
| 2 | Digital Multimeter | 1 Pc per 5 Candidates |
| 3 | Copper Strip Board | 1 Pc per Candidate |
| 4 | Soldering Iron | 1 Pc per 5 Candidates |
| 5 | Solder Wire | 1 Pc per 5 Candidates |
| 6 | NAND Gate IC 7400 | 1 Pc per Candidate |
| 7 | NOR Gate IC 7402 | 1 Pc per Candidate |
| 8 | Jumper Wires | Enough per Candidate |
| 9 | Wire Cutter/Stripper | 1 Pc per 5 Candidates |
| 10 | 1 kΩ Resistor | 1 Pc per Candidate |
| 11 | PPE (Safety Boots, Overall) | 1 Set per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| TASK 1: Safety and Preparation | |||
| Wore prescribed PPE (safety boots and overall) (Award 2 marks for correct PPE use, 0 if not) | 2 | ||
| Ensured work area is clean, well lit, and ventilated (Award 2 marks for good environmental safety practices) | 2 | ||
| Assembled all required tools, components, and materials (Award 2 marks for complete assembly before starting work) | 2 | ||
| Sub-Total | 6 | ||
| TASK 2: Circuit Assembly and Soldering | |||
| Identified and prepared all components for mounting (NAND and NOR ICs, resistor, jumper wires) (Award 1 mark each for identification and preparation of 4 components) | 4 | ||
| Mounted components correctly on the 100mm x 75mm copper strip board (Award 1 mark for each of the 6 mounted components) | 6 | ||
| Soldered all 14 required joints neatly and securely (Award 0.5 marks per well-soldered joint, total 14 joints) | 7 | ||
| Used copper strip board economically with minimal waste (Award 5 marks for efficient layout and minimal copper wastage) | 5 | ||
| Sub-Total | 22 | ||
| TASK 3: Testing and Verification | |||
| Measured voltage at test points to confirm ~3V supply (Award 3 marks for correct voltage measurement at power rails) | 3 | ||
| Tested logic outputs for AND, OR, and NOT functions using NAND and NOR gates (Award 5 marks for correct logic function outputs as per truth tables) | 5 | ||
| Sub-Total | 8 | ||
| TASK 4: Finishing and Presentation | |||
| Maintained neatness and organized wiring on the copper strip board (Award 5 marks for neat and tidy wiring, properly trimmed leads) | 5 | ||
| Sub-Total | 5 | ||
| PRODUCT CHECKLIST | |||
| Circuit functions correctly as AND, OR, and NOT using only NAND and NOR gates (Award 10 marks for full functional correctness as per test results) | 10 | ||
| Circuit layout matches the 100mm x 75mm copper strip board dimensions (Award 5 marks for correct and efficient use of copper strip board size) | 5 | ||
| Sub-Total | 15 | ||
| GRAND TOTAL | 56 | ||
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.