What are logic gates? What is the operation of AND, OR, NOT, NAND, and NOR logic gates? Draw their symbols and truth tables.

Logic Gates:

Logic gates are basic building blocks of digital circuits that perform logical operations on one or more binary inputs to produce a single binary output. They are fundamental to digital electronics and are used in computing systems, controllers, and other electronic devices.

1. AND Gate:

The AND gate outputs a 1 (true) only if both inputs are 1; otherwise, the output is 0 (false).

  • Symbol:
    The symbol is a flat-ended shape with two inputs on the left and one output on the right.

  • Truth Table:

A (Input) B (Input) Output (A AND B)
0 0 0
0 1 0
1 0 0
1 1 1

2. OR Gate:

The OR gate outputs a 1 if at least one input is 1.

  • Symbol:
    The symbol is curved on the input side, with two inputs on the left and one output on the right.

  • Truth Table:

A (Input) B (Input) Output (A OR B)
0 0 0
0 1 1
1 0 1
1 1 1

3. NOT Gate:

The NOT gate is a unary gate (it has only one input) that inverts the input. If the input is 1, the output is 0, and vice versa.

  • Symbol:
    The symbol is a triangle with a small circle (representing inversion) at the output.

  • Truth Table:

A (Input) Output (NOT A)
0 1
1 0

4. NAND Gate:

The NAND gate is the opposite (negation) of the AND gate. It outputs 0 only if both inputs are 1; otherwise, it outputs 1.

  • Symbol:
    The NAND gate symbol is the same as the AND gate but with a small circle (negation) at the output.

  • Truth Table:

A (Input) B (Input) Output (A NAND B)
0 0 1
0 1 1
1 0 1
1 1 0

5. NOR Gate:

The NOR gate is the opposite (negation) of the OR gate. It outputs 1 only if both inputs are 0; otherwise, it outputs 0.

  • Symbol:
    The NOR gate symbol is the same as the OR gate but with a small circle (negation) at the output.

  • Truth Table:

A (Input) B (Input) Output (A NOR B)
0 0 1
0 1 0
1 0 0
1 1 0

Summary of Symbols:

  • AND:

    • Symbol:  ⦁
    • Truth Table: 1 when both inputs are 1.
  • OR:

    • Symbol: ⊕
    • Truth Table: 1 when at least one input is 1.
  • NOT:

    • Symbol: ⊖
    • Truth Table: Inverts the input.
  • NAND:

    • Symbol: ⦁ with a circle.
    • Truth Table: Negation of AND.
  • NOR:

    • Symbol: ⊕ with a circle.
    • Truth Table: Negation of OR.