Basic Logic Gates

What are Logic Gates?

A Logic gate is a kind of the basic building block of a digital circuit having two inputs and one output. The input and output relationship is based on a certain logic. These gates are implemented using electronic switches such as diodes, transistors. But, in practice, the basic logic gates are built using CMOS technology, MOSFET(Metal Oxide Semiconductor FET), FETS. Logic gates are used in microcontrollers, microprocessors, electronic and electrical project circuits, and embedded system applications. The basic logic gates are categorized into seven types as AND, OR, XOR, NAND, NOR, XNOR, and NOT.

These are the important digital devices, mainly based on the Boolean function. Logic gates are used to carry out the logical operations on single or multiple binary inputs and result in one binary output. In simple words, logic gates are the electronic circuits in a digital system.


Types of Basic Logic Gates

There are various basic logic gates used to perform operations in digital systems. The common ones are given below.

  • OR Gate

  • AND Gate

  • NOT Gate

  • XOR Gate

Also, these gates can be found in a combination of one or two. Therefore we get other gates like NAND, NOR, EXOR, and EXNOR Gates.


  • OR Gate

The OR gate output attains the state 1 if either one or more inputs attain the state 1.


The representation of an OR gate can be given by,

[Image will be Uploaded Soon]

Boolean expression of OR gate can be given by,

Y = A + B, 

which reads as Y equals A ‘OR’ B.

The truth table of the two-input OR basic Gate can be given as follows.


A

B

Y

0

0

0

0

1

1

1

0

1

1

1

1


  • AND Gate

In an AND gate, the output attains the state 1 if and only if all the inputs are in the state 1.

[Image will be Uploaded Soon]

Boolean expression of AND Gate can be given by,

Y = A . B

The truth table of the two-input AND basic Gate can be given as follows.


A

B

Y

0

0

0

0

1

0

1

0

0

1

1

1


  • NOT Gate

The output in a NOT Gate attains the state 1 if and only if the input does not attain the state 1.

[Image will be Uploaded Soon]

Boolean expression of a NOT gate is given below.

Y =

FAQs (Frequently Asked Questions)

1. Explain the NAND and NOR Gates, with their Respective Truth Tables?

NAND Gate


The NAND Gate is formed with the combination of ‘AND’ and ‘NOT’ Gate.

[Image will be Uploaded Soon]

The Boolean expression of NAND Gate is given as below:

Y′ = A ̄. B

   A     

  B  

Y′ = A ̄. B

   Y 

0

0

0

1

0

1

0

1

1

0

0

1

1

1

1

0


NOR Gate


NOR Gate can be formed by the combination of OR and NOT gates.

[Image will be Uploaded Soon]

Boolean expression of NOR Gate is given below.

Y′ = A ̄+ B

The truth table of a NOR gate can be given as below.

   A   

   B   

      Y′ = A ̄+ B     

    Y    

0

0

0

1

0

1

1

0

1

0

1

0

1

1

1

0

2. Explain the XOR and XNOR Gates?

XOR Gate


The XOR Gate forms with a combination of NOT, AND, and OR gates.

The logic gate gives results output (i.e., 1) if either input A or B but not both are high (i.e., 1) is known to be an XOR gate or the exclusive OR Gate. It can be noted that if both XOR gate inputs are high, the output is low (i.e., 0).

[Image will be Uploaded Soon]

Boolean expression of the XOR gate can be given by,

Y = A ⊕ B

The truth table of the XOR gate can be given as follows.


     A     

     B    

    Y    

0

0

0

0

1

1

1

0

1

1

1

0


Exclusive NOR Gate


The exclusive NOR gate is otherwise known as the XNOR gate. It is the combination of XOR and NOT gates.

[Image will be Uploaded Soon]

Boolean expression of an XNOR gate can be given by,

Y = A ⊙ = AB + AB