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.

  1. AND gate       

  2. OR gate

  3. NOT gate
    Derived gates

  4. NAND gate   

  5. NOR gate

  6. XOR(Exclusive OR) gate

  7. XNOR(Exclusive NOR) gate


  1. 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.

  1. Graphical Symbol of AND gate


  1. Boolean Expression of AND gate:

Z=X.Y


  1. Truth table of AND gate


Inputs

Output

X

Y

Z=X.Y

0

0

0

0

1

0

1

0

0

1

1

1


  1. Venn Diagram of AND gate:

       

  1. 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.

    1. Graphical Symbol of OR gate:

    2. Boolean Expression of OR gate:
      Z=X+Y

    3. Truth Table of OR gate:

Inputs

Output

X

Y

Z=X+Y

0

0

0

0

1

1

1

0

1

1

1

1


  1. Venn Diagram of OR gate:

  1. 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.

    1. Graphical Symbol of NOT gate:

    2. Boolean Expression of NOT gate:
      Z=X’

    3. Truth Table of NOT gate:

Input

Output

X

Z=X’

0

1

1

0


  1. Venn Diagram of NOT gate:

  1. 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.

    1. Graphical Symbol of NAND gate

    2. Boolean Expression of NAND gate
      Z=(X.Y)’




  1. Truth Table of NAND gate

Inputs

Output

X

Y

Z=(X.Y)’

0

0

1

0

1

1

1

0

1

1

1

0

  1. Venn Diagram of NAND gate

  1. 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.

    1. Graphical Symbol of NOR gate

    2. Boolean Expression of NOR gate
      Z=(X+Y)’

    3. Truth Table of NOR gate

Inputs

Output

X

Y

Z=(X+Y)’

0

0

1

0

1

0

1

0

0

1

1

0


  1. Venn Diagram of NOR gate

  1. 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.

    1. Graphical Symbol of XOR gate

    2. Boolean Expression of XOR gate
      Z=X’.Y+X.Y’   OR  Z=XꚚY

    3. Truth Table of XOR gate

Inputs

Output

X

Y

Z=XꚚY

0

0

0

0

1

1

1

0

1

1

1

0


  1. Venn Diagram of XOR gate


  1. 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.

    1. Graphical Symbol of XNOR gate

    2. Boolean Expression of XNOR gate
      Z=X.Y+X’.Y’   OR  Z=(XꚚY)’

    3. 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

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.

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...

Followers