Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Last Updated: Mar 27, 2024

Logic Gates & Circuits

Leveraging ChatGPT - GenAI as a Microsoft Data Expert
Speaker
Prerita Agarwal
Data Specialist @
23 Jul, 2024 @ 01:30 PM

Introduction

In this blog, we will discuss about logic gates & circuits. 

Logic Gates

Logic gates are the basic unit used to build any digital system around us. It helps in making decisions by producing outputs for different combinations of given inputs. The inputs and outputs of logic gates can occur only in two levels: HIGH and LOW, MARK and SPACE, TRUE and FALSE, ON and OFF, or simply 1 and 0. A Boolean expression will represent the function of each logic gate. 

Classification of Logic Gates

Logic gates can be classified as: 

  • Basic Gates - NOT, AND, OR 
  • Universal Gate - NAND, NOR 
  • Special Purpose Gate - EX-OR, EX-NOR

A truth table helps in describing the logic circuit’s output based on the circuit’s input. 

To read about logic gates and circuits in detail click here.

Must Read, 8085 Microprocessor Pin Diagram

Types of Logic Gates

NOT Gate

  • Referred to as inversion or complementation
  • Single input variable 
  • Single output variable
  • Output is always opposite to the input.
  • Represented by the bar(―) or (‘).
  • In the below-given figure, A is the input, and Y is the output. The left side shows the circuit diagram, and the right side shows the truth table.

Credit: notesformsc

Algebraic expression: Y = NOT A.

AND Gate

  • Two or more input variable 
  • Single output variable
  • Represented by dot (.) or (Ʌ).
  • If at least any of the one input is low(0), then output is 0.
  • In the below-given figure, A and B are the input, and Y is the output. The right side shows the circuit diagram, and the left side shows the truth table.

           Credit: signoffsemi

Algebraic expression: Y = A.B

OR Gate

  • Two or more input variable 
  • Single output variable
  • Represented by dot (+) or (V).
  • If at least one input is high(1), then output is 1.
  • In the below-given figure, A and B are the input, and Y is the output. The left side shows the circuit diagram, and the right side shows the truth table.

Credit:electronicsclub

Algebraic expression: Y = A+B

NAND Gate

  • Two or more input variable 
  • Single output variable
  • Output is always opposite to the output obtained in the case of AND gate.
  • Represented by dot (.) followed by a bar (―) on top.
  • If at least any of the one input is low(0), then output is 1.
  • In the below-given figure, A and B are the input, and Y is the output. The right side shows the circuit diagram, and the left side shows the truth table.

Credit: signoffsemi

Algebraic expression: Y = NOT(A.B)

NOR Gate

  • Two or more input variable 
  • Single output variable
  • Output is always opposite to the output obtained in the case of the OR gate.
  • Represented by a plus (+) followed by (―) on top.
  • If at least one input is high(1), then output is 0.
  • In the below-given figure, A and B are the input, and Y is the output. The left side shows the circuit diagram, and the right side shows the truth table.

    Credit:electronicsclub

    Algebraic expression: Y = NOT(A+B)

EX-OR Gate

  • Two input variable 
  • Single output variable
  • Represented by a plus (+) encircled by a circle.
  • If only and only one input is high(1), then output is 1.
  • Used in parity generation and detection.
  • In the below-given figure, A and B are the input, and Y is the output. The left side shows the circuit diagram, and the right side shows the truth table.

Credit:maximintegrated

EX- NOR  Gate

  • Also called the gate of equivalence or coincidence logic.
  • This is an XOR gate followed by NOR gate.
  • Two input variable 
  • Single output variable
  • Represented by dot (.) encircled by a circle.
  • If only and only one input is high(1), then output is 0.
  • In the below-given figure, X and Y are the input, and Z is the output. The left side shows the circuit diagram, and the right side shows the truth table.
     

Credit:pinimg

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Applications of Logic Gates

  • Used in door bell, flash alarms.(NAND gates)
  • Used in transistor.
  • Used in traffic and street lights.
  • Used in microprocessor and microcontroller.
  • Used in inverter. (NOT gate)
  • Used in data transmission.(XNOR gate)

Conversions

Let us discuss on how we can construct some logic gates using the basic logic gates like AND, NOT, OR.

  • AND+NOT=NAND

Credit: circuit globe

A AND B = A.B

NOT(A.B) = A NAND B

  • OR+NOT=NOR

Credit: circuitglobe

A OR B = A+B

NOT(A+B) = A NOR B

  • AND+NOT+OR=XOR

You can also read 8051 Microcontroller Pin Diagram here.

Frequently Asked Questions

  1. Why are NAND and NOR gates called universal gates?
    NAND and NOR are called Universal Gates because they can perform all the basic operations of three basic Gates: AND, OR, and NOT. 
     
  2.  Why EX-OR gate is known as an odd number of 1’s detector in the input
    Practically three or more input Ex-OR gates does not exist. But when more than two variables are EX-ORed, two input EX-OR gates are cascaded where the output is assumed to be ‘1’ when the odd number of input variables is 1.
     
  3. What is a combinational logic circuit?
    A combinational circuit is a digital circuit consisting of an interconnection of logic gates, whose outputs at any instant of time are determined from the present combination of inputs only.

Conclusion

This article taught us about logic gates & circuits. We individually discussed each of the gates, their circuit diagram and the truth table.

We hope you could easily take away all critical and conceptual techniques by walking over the given examples. 

Recommended Reading - Canonical Cover In DBMS.

Now, we strongly recommend you to understand the other related concepts in boolean algebra and enhance your learning. You can get a wide range of topics similar to this on booleanalgebra

It's not the end. Learn and explore more.

Topics covered
1.
Introduction
1.1.
Logic Gates
1.2.
Classification of Logic Gates
2.
Types of Logic Gates
2.1.
NOT Gate
2.2.
AND Gate
2.3.
OR Gate
2.4.
NAND Gate
2.5.
NOR Gate
2.6.
EX-OR Gate
2.7.
EX- NOR  Gate
3.
Applications of Logic Gates
4.
Conversions
5.
Frequently Asked Questions
6.
Conclusion