By the end of this chapter, you will be able to:
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.
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.
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.
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)
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.
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)
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.
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)
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} $$
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)
Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free accountThis 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.
Given the logic gate AND with inputs \(A = 1\) and \(B = 0\), calculate the output \(Y\). (1 mark)
For an OR gate with inputs \(A = 0\) and \(B = 0\), find the output \(Y\). (1 mark)
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Breadboard | AND gate IC 7408 |
| Jumper wires | OR gate IC 7432 |
| Digital multimeter | NOT gate IC 7404 |
| Logic probe or oscilloscope | Resistors 1kΩ |
| DC power supply 5V | Personal Protective Equipment (PPE) |
| S/N | Item | Quantity |
|---|---|---|
| 1 | AND gate IC 7408 | 1 Pc per Candidate |
| 2 | OR gate IC 7432 | 1 Pc per Candidate |
| 3 | NOT gate IC 7404 | 1 Pc per Candidate |
| 4 | Breadboard | 1 Pc per Candidate |
| 5 | Jumper wires | 10 Pcs per Candidate |
| 6 | Digital multimeter | 1 Pc per 3 Candidates |
| 7 | DC power supply 5V | 1 Pc per 3 Candidates |
| 8 | Logic probe or oscilloscope | 1 Pc per 3 Candidates |
| 9 | Resistors 1kΩ | 4 Pcs per Candidate |
| 10 | Personal Protective Equipment (PPE) | 1 Set per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| 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-Total | 20 | ||
| 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-Total | 15 | ||
| 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-Total | 23 | ||
| GRAND TOTAL | 58 | ||
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Digital multimeter | NAND gate IC (CD4011) |
| Soldering iron | NOR gate IC (CD4001) |
| Electronic toolkit | Breadboard |
| Logic probe or LED indicators | Jumper wires |
| 12V DC power supply |
| S/N | Item | Quantity |
|---|---|---|
| 1 | NAND gate IC (CD4011) | 1 Pc per Candidate |
| 2 | NOR gate IC (CD4001) | 1 Pc per Candidate |
| 3 | Breadboard | 1 Pc per Candidate |
| 4 | Jumper wires | 10 Pcs per Candidate |
| 5 | Digital multimeter | 1 Pc per Candidate |
| 6 | 12V DC power supply | 1 Pc per Candidate |
| 7 | Logic probe or LED indicators | 2 Pcs per Candidate |
| 8 | Personal Protective Equipment (Safety boots, gloves) | Appropriate per Candidate |
| 9 | Electronic toolkit (pliers, wire stripper, screwdriver) | 1 Set per Candidate |
| 10 | Soldering iron and solder wire | 1 Pc and enough wire per 3 Candidates |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| 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-Total | 10 | ||
| 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-Total | 10 | ||
| 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-Total | 10 | ||
| GRAND TOTAL | 30 | ||
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.