By the end of this chapter, you will be able to:
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.
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.
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.
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)
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 $$
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)
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\).
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)
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} $$
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)
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 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.
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Pliers | 7408 AND gate IC |
| Side cutter | 7432 OR gate IC |
| Multimeter | 7404 NOT gate IC |
| Breadboard | 220Ω Resistors |
| 5V DC power supply adapter | LEDs (Red, Green) |
| Connecting wires assorted colours | |
| Personal Protective Equipment (Dust coat/Overall) |
| S/N | Item | Quantity |
|---|---|---|
| 1 | 7408 AND gate IC | 1 Pc per Candidate |
| 2 | 7432 OR gate IC | 1 Pc per Candidate |
| 3 | 7404 NOT gate IC | 1 Pc per Candidate |
| 4 | Breadboard | 1 Pc per Candidate |
| 5 | Connecting wires assorted colours | Assorted per Candidate |
| 6 | 5V DC power supply adapter | 1 Pc per Candidate |
| 7 | LEDs (Red, Green) | 2 Pcs per Candidate |
| 8 | 220Ω Resistors | 4 Pcs per Candidate |
| 9 | Multimeter | 1 Pc per Candidate |
| 10 | Pliers | 1 Pair per Candidate |
| 11 | Side cutter | 1 Pair per Candidate |
| 12 | Personal Protective Equipment (Dust coat/Overall) | 1 Set per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| 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-Total | 24 | ||
| 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-Total | 18 | ||
| GRAND TOTAL | 42 | ||
Type: Individual
| Tools & Equipment | Materials |
|---|---|
| Pliers | NAND gate IC 7400 |
| Side Cutter | NOR gate IC 7402 |
| Multimeter | Breadboard |
| Connecting wires | |
| 5V DC Power supply | |
| LEDs | |
| 220 Ohm Resistors | |
| Personal Protective Equipment (Dustcoat/Overall) |
| S/N | Item | Quantity |
|---|---|---|
| 1 | NAND gate IC 7400 | 1 Pc per Candidate |
| 2 | NOR gate IC 7402 | 1 Pc per Candidate |
| 3 | Breadboard | 1 Pc per Candidate |
| 4 | Connecting wires | Assorted per Candidate |
| 5 | 5V DC Power supply | 1 Pc per Candidate |
| 6 | LEDs (Red, Green) | 3 Pcs per Candidate |
| 7 | 220 Ohm Resistors | 3 Pcs per Candidate |
| 8 | Multimeter | 1 Pc per Candidate |
| 9 | Pliers | 1 Pair per Candidate |
| 10 | Side Cutter | 1 Pair per Candidate |
| 11 | Personal Protective Equipment (Dustcoat/Overall) | 1 Set per Candidate |
| Items to be Evaluated | Marks Available | Marks Obtained | Comments |
|---|---|---|---|
| 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-Total | 24 | ||
| 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-Total | 16 | ||
| GRAND TOTAL | 40 | ||
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.