In the digital world, every decision a computer makes is based on “Logic.” For Sri Lankan GCE O/L ICT students, Lesson 4: Digital Logic Gates is one of the most exciting yet challenging units. It forms the foundation of how processors work and is a guaranteed topic in both Paper I (MCQs) and Paper II (Structured/Essay).
This guide will walk you through the basic and combined logic gates, their symbols, truth tables, and Boolean expressions.
1. What are Logic Gates?
A logic gate is a physical device or a theoretical model that implements a Boolean function. It takes one or more binary inputs (0 or 1) and produces a single binary output.
- Logic 1: Represents “High,” “True,” or “ON.”
- Logic 0: Represents “Low,” “False,” or “OFF.”
2. The Basic Logic Gates
There are three fundamental logic gates that every student must memorize.
The NOT Gate (Inverter)
The NOT gate is the simplest gate. It has only one input and reverses it.
- Boolean Expression: $Y = \bar{A}$ (or NOT A)
- Logic: If the input is 1, the output is 0. If the input is 0, the output is 1.
The AND Gate
The AND gate requires all inputs to be 1 to produce a 1 as an output. Think of it like a series circuit.
- Boolean Expression: $Y = A \cdot B$
- Logic: Output is 1 only if Input A AND Input B are both 1.
The OR Gate
The OR gate produces a 1 if at least one of its inputs is 1. Think of it like a parallel circuit.
- Boolean Expression: $Y = A + B$
- Logic: Output is 1 if Input A OR Input B (or both) are 1.
3. The Combined (Universal) Gates
By combining the basic gates with a NOT gate, we create “Universal Gates.” These are highly important because they can be used to recreate any other gate.
The NAND Gate (NOT + AND)
The NAND gate is the opposite of the AND gate.
- Boolean Expression: $Y = \overline{A \cdot B}$
- Logic: Output is 0 only if both inputs are 1.
The NOR Gate (NOT + OR)
The NOR gate is the opposite of the OR gate.
- Boolean Expression: $Y = \overline{A + B}$
- Logic: Output is 1 only if both inputs are 0.
4. Understanding Truth Tables
A Truth Table is a mathematical table used to show the output of a logic gate for every possible combination of inputs.
| Input A | Input B | AND (A·B) | OR (A+B) | NAND (NOT AND) |
| 0 | 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 |
5. Learning with Interactive Logic Tools
Reading about logic is one thing, but seeing it in action is how you truly master it. At SchoolICT.net, we provide an interactive Logic Gate Simulator designed for the O/L syllabus.
With our learning tool, you can:
- Toggle Switches: Turn inputs (A and B) on and off to see how the output changes instantly.
- Visualize the Flow: Watch the “current” move through the gates to the output bulb.
- Build Logic Circuits: Practice connecting multiple gates to solve complex Boolean expressions.
6. Exam Tips for O/L Students
- Identify the “Bubble”: In logic diagrams, a small circle (bubble) at the output always signifies a NOT operation (like in NAND or NOR).
- Order of Operations: When solving complex Boolean expressions, follow the hierarchy: Brackets first, then NOT, then AND, and finally OR.
- Practice Drawing: In Paper II, you are often asked to draw a logic circuit for a given scenario (e.g., an alarm system). Use a ruler and draw the symbols clearly.
- The $2·n$ Rule: Remember that for $n$ inputs, there are $2·n$ possible rows in your truth table. For 2 inputs, there are 4 rows; for 3 inputs, there are 8 rows.






Leave a Reply