Courses
Courses for Kids
Free study material
Offline Centres
More

What are Logic Gates?

ffImage
Last updated date: 02nd Dec 2023
Total views: 23.1k
Views today: 0.22k
hightlight icon
highlight icon
highlight icon
share icon
copy icon

Introduction

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 Updated soon)

 

(Image will be Updated 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 state 1 if and only if all the inputs are in state 1.

 

(Image will be Updated soon)

 

(Image will be Updated 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 state 1 if and only if the input does not attain state 1.

 

Basic Logic Gates

Logic Gates 

Logic gates are the basic components of any digital system. Logic gates are the electrical circuit with only one output and one or more inputs. A specific logic governs the relationship between the input and the output. AND gate, OR gate, NOT gate, and so on are examples of logic gates.

 

A logic gate is an idealistic model of computing or a practical electronic device that implements a Boolean function, which is a logical operation that creates a single binary output from one or more binary inputs.

 

Types of Logic Gates

AND Gate:

It has one output and n inputs (n >= 2).

 

(Image will be Updated soon)

 

This is the Logic Diagram of AND Gate. The AND gate has a round output and a flat input.

 

Truth Table- 

A

B

AB

0

0

0

0

1

0

1

0

0

 

OR Gate:

If one or more inputs reach state 1, the OR gate output will reach state 1.

 

Logic Diagram of OR Gate. The input side of the OR gate is curved, whereas the output side is sharply pointed.

 

(Image will be Updated soon)

 

Truth Table-

A

B

A+B

0

0

0

0

1

1

1

0

1

 

NOT Gate:

If and only if the input does not reach state 1, the output of a NOT Gate reaches state 1. Logic Diagram of NOT Gate. A forward arrow with a little circle at the output is the NOT gate. The output is negating the input, as indicated by the circular component of the symbol. 

 

 (Image will be Updated soon)

 

Truth Table-

Input

Output

A

B

0

1

1

0

 

Combined Logic:

A combined logic system, also known as combinatorial logic, is created by connecting many gates together. We can utilize truth tables to match logical outputs for multiple input conditions while designing a combined logic system. The conditions in the table are used to create Boolean expressions. The phrase can then be simply converted into a logic gate diagram.

 

NAND Gate:

It's a digital circuit with two or more inputs that creates an output that's the logical AND of all those inputs inverted. Logic NAND Gates use digital circuits to provide the desired logical function and are given a symbol that resembles a normal AND gate with a circle, sometimes referred to as an "inversion bubble," at its output to represent the NOT gate symbol with the logical operation of the NAND gate. The NAND function, like the AND function, can have any number of independent inputs, and commercially available NAND Gate ICs come in typical 2, 3, or 4 input configurations. If more inputs are needed, the typical NAND gates can be cascaded to produce more.

 

Logic Diagram of NAND gate-

 

(Image will be Updated soon)

 

Truth Table-

A

B

-AB

0

0

1

0

1

1

1

0

1

1

1

0

 

NOR Gate:

It's a digital circuit with two or more inputs that creates an output that's the logical OR of all those inputs inverted. Logic NOR Gates are available using digital circuits to generate the appropriate logical function and are given a symbol resembling a normal OR gate with a circle, commonly referred to as an "inversion bubble," at its output to indicate the NOT gate symbol with the logical operation of the NOR gate. The NOR function, like the OR function, can have any number of separate inputs, and commercially available NOR Gate ICs come in 2, 3, or 4 input configurations. If more inputs are needed, the typical NOR gates can be cascaded to produce more.

 

Logic Diagram of NOR Gate-

 

(Image will be Updated soon)

 

Truth Table- 

A

B

A+B (bar)

0

0

1

0

1

0

1

0

0

1

1

0

 

XOR Gate:

The Exclusive-OR gate is known as the XOR gate. This gate is a unique sort of gate that can be found in a variety of computational circuits. There are two special gates, Ex-OR and Ex-NOR, in addition to the AND, OR, NOT, NAND, and NOR gates. These gates aren't basic gates in and of themselves; they're made up of other logic gates. Their Boolean output function is powerful enough to be termed a full logic gate. The hybrid gates are the XOR and XNOR gates.

 

Truth Table-

A

B

Y

0

0

0

0

1

1

1

0

1

1

1

0

FAQs on What are Logic Gates?

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

3. Why do we need the Logic Gates?

Burglar alarms and buzzers both use NAND Gates. They are mostly employed in calculation and processing circuits. They're also found in push-button controls. Consider the example of a doorbell. They are required for the proper operation of street lights. The data transfer function is enabled or inhibited using AND Gates. TTL(Transistor-Transistor Logic) and CMOS circuitry also employ them. Boolean Algebra is used to execute logical operations, making circuit design more cost-effective and straightforward. It's easy to tell the difference between logic '1' and logic '0.'.