Logic Gate

What is a Logic Gate?

Definition

A logic gate is a device that performs a fundamental Boolean logic function such as NOT, AND, OR, NAND, NOR, XOR, etc. From binary inputs, a logic gate returns a binary output of 1 (true) or 0 (false).

Types of Logic Gates

  • NOT – A NOT gate only has one input, and the gate inverses the logic. The output is NOT the input. An input of logical 1 produces an output of logical 0, and an input of logical 0 produces an output of logical 1.
Input Output
0 1
1 0
NOT gate truth table.

Below is a list of other common logic gates and the function they perform on a two-input digital circuit.

  • AND – Output is true if input A AND input B are true. Outputs a logical 1 only if both inputs are logical 1. All other inputs produce an output of logical 0.

    A B AND
    0 0 0
    0 1 0
    1 0 0
    1 1 1
    AND gate truth table.
  • OR – Output is true if input A OR input B is true. Outputs a logical 1 if either input is logical 1, and only outputs a logical 0 if both inputs are logical 0.

    A B OR
    0 0 0
    0 1 1
    1 0 1
    1 1 1
    OR gate truth table.
  • NAND – Abbreviation for “NOT AND.” Performs the AND function, followed by the NOT function to produce the logical inverse of an AND gate. Outputs a logical 0 only if both inputs are logical 1. All other inputs produce an output of logical 1.

    A B NAND
    0 0 1
    0 1 1
    1 0 1
    1 1 0
    NAND gate truth table.
  • NOR – Abbreviation for “NOT OR.” Performs the OR function, followed by the NOT function to produce the logical inverse of an OR gate. Outputs a logical 0 if either input is logical 1, and only outputs a logical 1 if both inputs are logical 0.

    A B NOR
    0 0 1
    0 1 0
    1 0 0
    1 1 0
    NOR gate truth table.
  • XOR – Abbreviation for “Exclusively-OR.” Output is true if EXCLUSIVELY input A is true OR if EXCLUSIVELY input B is true. Outputs a logical 1 if the two input values differ, and outputs a logical 0 if the inputs are the same.

    A B XOR
    0 0 0
    0 1 1
    1 0 1
    1 1 0
    XOR gate truth table.

Keywords

Logic Gates, NOT, AND, OR, NAND, NOR, XOR
Find a term alphabetically: