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
The output of an AND gate is 0 if ___________.
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
What is the output of an OR gate if both inputs are false?
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
What is the truth table for the NOT gate?
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 an 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
The output of a NAND gate is 0 if ___________.
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
A NOR gate produces the output as 0 only if ___________