Logic Gates
Logic Gates
Logic gates are the building blocks of digital electronic circuits and play a crucial role in processing and manipulating binary information. These gates are the backbone of modern computing devices, from simple calculators to complex supercomputers.
Logic gates perform logical operations on one or more binary inputs and produce a single binary output based on predefined rules.
They are designed to follow Boolean algebra principles, which were developed by George Boole in the mid-19th century.
There are 6 main types of logic gate AND, OR, NOT, XOR, NAND,NOR.
AND Gate
Behavior: The AND gate produces a true (1) output only when all of its inputs are true (1).
Truth Table
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
AND Gate Demo
OR Gate
Behavior: The OR gate produces a true (1) output when at least one of its inputs is true (1).
Truth Table
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
OR Gate Demo

NOT Gate
Behavior: The NOT gate, also known as an inverter, produces the opposite of its input. It negates the input value.
Truth Table
| A | Output |
|---|---|
| 0 | 1 |
| 1 | 0 |
NOT Gate Demo
XOR Gate
Behavior
The XOR gate (exclusive OR) produces a true (1) output if 1 (and only one)input is true.
Truth Table
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
XOR Gate Demo
What is the output of a logical XOR gate when both inputs are 1?
NAND Gate
Behavior
The NAND gate is the opposite of the AND gate. It produces a false (0) output only when all of its inputs are true (1).
Truth Table
| A | B | Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NAND Gate Demo
NOR Gate
Behavior
The NOR gate is the opposite of the OR gate. It produces a false (0) output when at least one of its inputs is true (1).
Truth Table
| A | B | Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
NOR Gate Demo
When does a NOR gate produce an output of 0?
Complete! Ready to test your knowledge?
Introduction to Logic Gates
- Logic Gates
- AND Gate
- AND Gate Demo
- OR Gate
- OR Gate Demo
- NOT Gate
- NOT Gate Demo
- XOR Gate
- XOR Gate Demo
- NAND Gate
- NAND Gate Demo
- NOR Gate
- NOR Gate Demo




