By the end of this chapter, you will be able to:
Mastering these skills will help you build and troubleshoot electronic systems with confidence, a key ability in many exciting technical careers.
Logic gates form the foundational building blocks of digital electronics, a critical area for ICT technicians working with computing and communication devices in Kenya. These gates process binary signals, enabling decision-making at the hardware level within circuits such as microprocessors, memory devices, and digital controllers. Mastery of logic gates is essential for troubleshooting and designing digital systems used in data centers, telecommunications infrastructure, and embedded ICT solutions. This chapter introduces identification and application of logic gates, followed by the development of practical logic circuits relevant to ICT technicians.
Identifying logic gates is a fundamental skill for ICT technicians who maintain and design digital systems. Understanding how different gates operate allows professionals to interpret circuit diagrams, test hardware, and develop efficient logic solutions. In the ICT sector, from training laboratories to server rooms and repair workshops, accurate recognition of logic gates supports system reliability and innovation.
To effectively work with logic gates, technicians must be conversant with key terminology that describes their function and behaviour. These terms provide a common language for interpreting digital circuits and troubleshooting devices such as motherboards, network cards and memory modules.
A logic gate is an electronic device that performs a logical operation on one or more binary inputs to produce a single binary output. It is the basic building block of digital circuits, converting input signals (0s and 1s) into desired output signals based on a defined logic function. Example: the circuit that decides whether a computer's power-good signal is released is built from logic gates.
Binary input refers to the two possible states of a digital signal: 0 (low voltage) or 1 (high voltage). Logic gates accept these binary inputs to process information. A push-button wired to a gate input, for instance, gives 1 when pressed and 0 when released.
A truth table lists all possible input combinations to a logic gate and the corresponding output for each combination. It is essential for understanding and predicting gate behaviour. A gate with n inputs has 2ⁿ rows, so a two-input gate has 4 rows and a three-input gate has 8 rows.
Logic levels define the voltage ranges that represent binary states in a digital system. In TTL circuits supplied with 5 V, a voltage near 0 V represents logic 0 and a voltage near 5 V represents logic 1. For standard TTL inputs, a voltage up to 0.8 V is read as low and a voltage of 2.0 V or more is read as high; voltages between these limits are undefined and must be avoided.
Boolean algebra is a mathematical framework that describes logical relationships and operations using variables that take the values true or false (1 or 0). In this topic it is used only to write the output expression of each gate, for example Y = A · B. Its rules for simplifying circuits are treated in the topic on simplification of logic circuits.
Logic gates are classified by the logical operation they perform. Each type has a unique symbol, truth table, and function, enabling ICT technicians to design and interpret digital systems precisely. In the notes below, A and B are the inputs, Y is the output, a dot (·) means AND, a plus sign (+) means OR, ⊕ means exclusive OR, and an overbar such as Ā means NOT A.
The AND gate outputs a 1 only if all its inputs are 1. Otherwise, the output is 0. This gate is used in circuits requiring all conditions to be true before an action occurs, such as enabling a signal only when multiple switches are on. Its symbol has a flat back and a rounded front, and its Boolean expression is Y = A · B.
Example: a server-room door lock is released only when the badge reader confirms a valid badge (A = 1) AND the keypad confirms the correct PIN (B = 1).
| A | B | Y = A · B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
An OR gate outputs a 1 if at least one of its inputs is 1. It produces 0 only when all inputs are 0. This gate is useful in systems where any one of several conditions can trigger an output, such as activating an alarm if any sensor detects an anomaly. Its symbol has a curved back and a pointed front, and its Boolean expression is Y = A + B.
Example: the alarm buzzer in a server room sounds when the smoke sensor (A) OR the over-temperature sensor (B) gives a high signal.
| A | B | Y = A + B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
The NOT gate, also called an inverter, outputs the opposite of its single input; if input is 1, output is 0, and vice versa. It is fundamental for signal inversion, often used in control systems to reverse logic states. Its symbol is a triangle with a small circle (bubble) at the output, and its Boolean expression is Y = Ā.
Example: a network switch port produces a high "link up" signal. Passing it through a NOT gate gives a high signal only when the link is down, which can drive a "fault" indicator LED.
| A | Y = Ā |
|---|---|
| 0 | 1 |
| 1 | 0 |
A NAND gate combines the AND function with inversion, outputting 0 only when all inputs are 1. Its symbol is the AND symbol with a bubble at the output, and its Boolean expression is Y = NOT (A · B). Its versatility makes it a universal gate, as any logic function can be implemented using just NAND gates, valuable in hardware optimisation. For example, joining both inputs of a NAND gate together gives a NOT gate.
Example: a fault flag stays at 0 while both power supply units of a rack server report healthy (A = 1, B = 1) and rises to 1 as soon as either unit fails.
| A | B | Y = NOT (A · B) |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
A NOR gate outputs 1 only when all inputs are 0, effectively combining OR and NOT functions. Its symbol is the OR symbol with a bubble at the output, and its Boolean expression is Y = NOT (A + B). It is used in systems where an output is desired only when none of the input conditions are met. Like the NAND gate, it is a universal gate.
Example: an "idle" lamp on a computer-lab control panel lights only when neither the keyboard-activity signal (A) nor the network-activity signal (B) is high.
| A | B | Y = NOT (A + B) |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
The XOR gate (exclusive OR) outputs 1 when an odd number of inputs are 1, commonly two inputs differing in state. It is critical in arithmetic circuits like adders and error detection schemes. Its symbol is the OR symbol with an extra curved line at the back, and its Boolean expression is Y = A ⊕ B, which equals Ā · B + A · B̄.
Example: in a data link, XOR compares a transmitted bit (A) with the bit received (B); an output of 1 flags a mismatch. The sum output of a half adder is also an XOR of the two bits being added.
| A | B | Y = A ⊕ B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
The XNOR gate (exclusive NOR) outputs 1 when inputs are equal, either both 0 or both 1. It is often used in equality comparators and digital logic verification. Its symbol is the XOR symbol with a bubble at the output, and its Boolean expression is Y = NOT (A ⊕ B).
Example: an address comparator in a memory module compares each bit of the incoming address (A) with the stored address bit (B); every XNOR output is 1 only when the two bits match.
| A | B | Y = NOT (A ⊕ B) |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
A side-by-side comparison helps a technician recognise a gate quickly from its truth table. The table below lists the two-input behaviour of each gate.
| Gate | Boolean expression | Output is 1 when |
|---|---|---|
| AND | A · B | both inputs are 1 |
| OR | A + B | at least one input is 1 |
| NOT | Ā | the input is 0 |
| NAND | NOT (A · B) | at least one input is 0 |
| NOR | NOT (A + B) | both inputs are 0 |
| XOR | A ⊕ B | the inputs are different |
| XNOR | NOT (A ⊕ B) | the inputs are the same |
In the workshop, gates are usually met as integrated circuits (ICs) in the 7400 TTL family, each holding several identical gates in one package. Knowing the part numbers lets a technician identify a gate on a trainer board or a repaired circuit. Check the manufacturer's data sheet for the pin layout before wiring, because the pin positions differ between ICs (the 7402 NOR, for example, has its outputs on different pins from the 7400 NAND).
| Name | Specification | Use |
|---|---|---|
| 7408 | Quad 2-input AND, 14-pin DIP, 5 V supply | Enabling a signal when two conditions are true |
| 7432 | Quad 2-input OR, 14-pin DIP, 5 V supply | Combining alarm or request signals |
| 7404 | Hex inverter (six NOT gates), 14-pin DIP, 5 V supply | Inverting a logic level |
| 7400 | Quad 2-input NAND, 14-pin DIP, 5 V supply | General logic and universal-gate circuits |
| 7402 | Quad 2-input NOR, 14-pin DIP, 5 V supply | General logic and universal-gate circuits |
| 7486 | Quad 2-input XOR, 14-pin DIP, 5 V supply | Adders, parity and comparison |
In these 14-pin packages the supply is normally on pin 14 and ground on pin 7. An XNOR function can be obtained from a dedicated XNOR IC or by following an XOR gate with an inverter.
When a gate on a trainer board has no marking, its type can be found by testing it and comparing the results with the truth tables above. The procedure below uses a 5 V logic trainer, switches for the inputs and an LED or logic probe for the output.
| Name | Specification | Use |
|---|---|---|
| Logic trainer | 5 V regulated supply, breadboard or socket | Powering and holding the IC under test |
| Input switches | Two toggle or DIP switches giving 0 or 1 | Setting inputs A and B |
| LED or logic probe | Indicates high or low at the output | Reading the output state |
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 concept of logic gates, beginning with the identification and definition of key terms related to digital electronics. It explored various types of logic gates including AND, OR, NOT, NAND, NOR, XOR, and XNOR, explaining their individual functions and logical behavior. The development of logic circuits was then discussed, focusing on how these gates are combined to perform complex logical operations. Methods for simplifying logic circuits were examined in detail, highlighting Boolean algebra, Karnaugh Maps, the Quine-McCluskey algorithm, and the use of software and CAD tools to optimize circuit design. Finally, the chapter demonstrated the practical application of logic gates within electronic circuits and emphasized the role of Boolean algebra in analyzing and designing these systems effectively. This comprehensive overview equips students with the foundational knowledge needed to apply logic gates in real-world electronic engineering tasks.
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.