Logic Gates

Logic gates are the basic building blocks in digital electronics.

  • These can have one or more inputs and produces only one output.
  • Logic gate's input and output are 1 bit i.e., 0(LOW) or 1(HIGH).
  • It performs logic operation according to its functionality and the logic associated with it.
  • Such logic gates are NOT gate, OR gate, AND gate, NOR gate, NAND gate, XOR gate, XNOR gate.

NOT gate:

  • NOT gate is also called as Inverter.
  • This gate takes only one input and produces one output which is complement of the input.
  • NOT gate is basically used to invert the input, hence it is called as Inverter.
  • Logic expression for NOT gate is,
  • \[Y=\bar{A}\]
  • Here A is the input and Y is the output which is complement of A.
  • Logic Symbol and Truth table for NOT gate is as follows,

  • When A=0, output Y becomes complement of 0 i.e., Y=1.
  • Similarly When A=1, Y becomes Y=0.

OR gate:

  • The OR gate can takes two or more inputs and produces only one output.
  • The OR gate output is 1(HIGH) when either of the inputs are 1(HIGH).
  • If the first input is 1(HIGH), then it won't checks the other inputs and directly produces the output 1(HIGH).
  • Logic expression for 2 input OR gate is,
  • \[Y=A+B\]
  • Here A and B are the inputs and Y is the output.
  • Logic symbol and truth table of 2 input OR gate is as follows,

  • Here, When either of A and B is 1(HIGH), the output Y becomes 1(HIGH).

NOR gate:

  • NOR gate is the complement of OR gate i.e.,
  • \[NOR=NOT(OR)\]
  • NOR gate is constructed using NOT gate and OR gate.
  • It can takes two or more inputs and produces only one output.
  • The NOR gate output is 0(LOW) when either of the inputs is 1(HIGH).
  • If the first input is 1(HIGH), then it won't checks the other inputs and directly produces the output 0(LOW).
  • NOR gate is also known as Universal gate because it can be used as other basic gates such as NOT, OR, AND etc.
  • Logic expression for 2 input NOR gate is,
  • \[Y=\overline{A+B}\]
  • Here A and B are the inputs and Y is the output.
  • Logic symbol and truth table for 2 input NOR gate is as follows,

  • Here, when either of A and B is 1(HIGH), the output Y becomes 0(LOW).

AND gate:

  • The AND gate can takes two or more inputs and produces only one output.
  • The AND gate output is 1(HIGH) when all the inputs are 1(HIGH).
  • If the first input is 0(LOW), then it won't checks the other inputs and directly produces the output 0(LOW).
  • Logic expression for 2 input AND gate is,
  • \[Y=A.B\]
  • Here A and B are the inputs and Y is the output.
  • Logic symbol and truth table for 2 input AND gate is as follows,

  • Here, when either of A and B is 0(LOW), the output Y becomes 0(LOW).

NAND gate:

  • NAND gate is the complement of AND gate i.e.,
  • \[NAND=NOT(AND)\]
  • NAND gate is constructed using NOT gate and AND gate.
  • It can takes two or more inputs and produces only one output.
  • The NAND gate output is 0(LOW) when all the inputs are 1(HIGH).
  • If the first input is 0(LOW), then it won't checks the other inputs and directly produces the output 1(HIGH).
  • NAND gate is also known as Universal gate because it can be used as other basic gates such as NOT, OR, AND etc.
  • Logic expression for 2 input NAND gate is,
  • \[Y=\overline{A.B}\]
  • Here A and B are the inputs and Y is the output.
  • Logic symbol and truth table for 2 input NAND gate is as follows,

  • Here, when either of A and B is 0(LOW), the output Y becomes 1(HIGH).

XOR gate:

  • Here XOR stands for Exclusive-OR.
  • The XOR gate can takes two or more inputs and produces only one output.
  • The XOR gate output is 1(HIGH) when odd number of 1's are taken as inputs.
  • Here, all the inputs will be checked no matter if first input is 0 or 1.
  • Logic expression for 2 input XOR gate is,
  • \[Y=A⊕B\]
  • Here A and B are the inputs and Y is the output.
  • Logic symbol and truth table for 2 input XOR gate is as follows,

  • Here, when only one of the A and B is 1(HIGH), the output Y becomes 1(HIGH).

XNOR gate:

  • Here XNOR stands for Exclusive-NOR.
  • XNOR gate is the complement of XOR gate i.e.,
  • \[XNOR=NOT(XOR)\]
  • XNOR gate is constructed using NOT gate and XOR gate.
  • The XNOR gate can takes two or more inputs and produces only one output.
  • The XNOR gate output is 0(LOW) when odd number of 1's are taken as inputs.
  • Here, all the inputs will be checked no matter first input is 0 or 1.
  • Logic expression for 2 input XNOR gate is,
  • \[Y=\overline{A⊕B}\]
  • Here A and B are the inputs and Y is the output.
  • Logic symbol and truth table for 2 input XNOR gate is as follows,

  • Here, when only one of the A and B is 1(HIGH), the output Y becomes 0(LOW).
Posted on by