Logic Gates
# Define logic gate.
Ans:
An electronic circuit which generates only one output signal from one or more input signals is called a logic gate. The manipulation of binary information is done by using a logic gate. It is the basic building block of computers and other digital devices.
There are three basic logic gates.
AND gate
OR gate
NOT gate
Derived gatesNAND gate
NOR gate
XOR(Exclusive OR) gate
XNOR(Exclusive NOR) gate
AND gate:
It is an electronic circuit used to perform logical multiplication (or AND operation). It is denoted by dot operator (.) . It accepts two or more inputs and generates only one output. It generates one or true or ON output if all the inputs are 1 or true or ON otherwise, it generates 0 or False or OFF output.
Graphical Symbol of AND gate
Boolean Expression of AND gate:
Z=X.Y
Truth table of AND gate
Inputs | Output | |
X | Y | Z=X.Y |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
Venn Diagram of AND gate:
OR gate:
It is an electronic circuit used to perform logical addition (or OR operation), and for that, it uses plus operator(+). It also accepts two or more inputs and generates only one output. It generates 1 or true or ON output if at least any one of input is true otherwise; it generates 0 or false or OFF output.Graphical Symbol of OR gate:
Boolean Expression of OR gate:
Z=X+YTruth Table of OR gate:
Inputs | Output | |
X | Y | Z=X+Y |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
Venn Diagram of OR gate:
NOT gate:
It is an electronic circuit used to perform logical complement (or NOT operation), and for that, it uses a prime or bar operator (’ or __). It accepts only one input and generates only one output. It generates 1 or true or ON output if the input is false otherwise; it generates 0 or false or OFF output. So, it is also known as Inverter.Graphical Symbol of NOT gate:
Boolean Expression of NOT gate:
Z=X’Truth Table of NOT gate:
Input | Output |
X | Z=X’ |
0 | 1 |
1 | 0 |
Venn Diagram of NOT gate:
NAND gate:
It is an electronic circuit used to perform complement of logical multiplication (or complement of AND operation). It uses dot operator (.) and prime operator(’). It is the integration of NOT gate and AND gate that means NOT+AND=NAND. It also accepts two or more inputs and generates only one output. It generates 1 or true or ON output if at least any one of the input is false otherwise; it generates 0 or false or OFF output.Graphical Symbol of NAND gate
Boolean Expression of NAND gate
Z=(X.Y)’
Truth Table of NAND gate
Inputs | Output | |
X | Y | Z=(X.Y)’ |
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Venn Diagram of NAND gate
NOR gate:
It is an electronic circuit used to perform complement of logical addition(or complement of OR operation). It uses plus operator(+) and prime (’). It is the integration of NOT gate and OR gate that means NOT+OR=NOR. It also accepts two or more inputs and generates only one output. It generates 1 or true or ON output if all the inputs are false otherwise; it generates 0 or false or OFF output.Graphical Symbol of NOR gate
Boolean Expression of NOR gate
Z=(X+Y)’Truth Table of NOR gate
Inputs | Output | |
X | Y | Z=(X+Y)’ |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
Venn Diagram of NOR gate
XOR (Exclusive OR) gate:
It is an electronic circuit used to perform logical “either / or” operation. It also accepts two or more inputs and generates only one output. It generates 1 or true or ON output if the number of 1 or true or ON input is odd otherwise, it generates 0 or false or OFF output. So, it is also known as an even parity generator.Graphical Symbol of XOR gate
Boolean Expression of XOR gate
Z=X’.Y+X.Y’ OR Z=XꚚYTruth Table of XOR gate
Inputs | Output | |
X | Y | Z=XꚚY |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Venn Diagram of XOR gate
XNOR(Exclusive NOR) gate:
It is an electronic circuit used to perform logical complement of Exclusive-OR operation. It also accepts two or more inputs and generates only one output. It generates 1 or true or ON output if the number of 1 or true or ON input is even otherwise; it generates 0 or false or OFF output. Therefore, it is also known as an odd parity generator.Graphical Symbol of XNOR gate
Boolean Expression of XNOR gate
Z=X.Y+X’.Y’ OR Z=(XꚚY)’Truth Table of XNOR gate
Inputs | Output | |
X | Y | Z=(XꚚY)’ |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
Netra Koirala
Computer Science Educator
Passionate computer science educator and author. Provides free study notes, practical guides, and tutorials for Class 9, 10, 11, 12, and B.Sc CSIT students in Nepal. Years of teaching experience in computer science fundamentals.
LinkedIn ProfileRelated Posts
Loading related posts…
Computer Science notes, tutorials, MCQs, and educational resources for Nepal students. Covering Class 9, SEE preparation, Class 11, Class 12, SLC, programming, DBMS, networking, HTML, JavaScript, PHP, OOP and more.
Featured Post
Grade 10 Computer Science: Specification Grid & Model Questions
Specification Grid & Model Questions of Computer Science | Grade 10 📚 Examination Resource Specification Grid & M...