ITclub

العودة إلى Digital Engineering
محاضرة 2

Logic Gates and Boolean Algebra

شرح البوابات الأساسية (AND, OR, NOT, XOR) والمشتقة (NAND, NOR, XNOR) وقوانين الجبر البولياني.

ملخص المحاضرة

📜 Lecture 2: Basic Gates

This lecture defines the fundamental and inverted logic gates, covering their symbols, Boolean expressions, and truth tables.

Key Concepts

  • NOT Gate (Inverter)

    • Type: Unary (1 input).
    • Function: Inverts the input.
    • Expression: X = A' or X = A
    • Truth Table: 0 -> 1, 1 -> 0
  • AND Gate

    • Type: Binary (2 or more inputs).
    • Function: Output is 1 if and only if ALL inputs are 1.
    • Expression: X = A · B
    • Truth Table (2-input): 1 only for A=1, B=1.
    • Truth Table (3-input): 1 only for A=1, B=1, C=1.
  • OR Gate

    • Type: Binary (2 or more inputs).
    • Function: Output is 1 if EITHER or BOTH inputs are 1.
    • Expression: X = A + B
    • Truth Table (2-input): 0 only for A=0, B=0.
    • Truth Table (3-input): 0 only for A=0, B=0, C=0.
  • XOR Gate (Exclusive-OR)

    • Type: Binary (2 or more inputs).
    • Function: Output is 1 if and only if the inputs are DIFFERENT.
    • Expression: X = A ⊕ B
    • Truth Table (2-input): 1 for A=0, B=1 and A=1, B=0.
    • Truth Table (3-input): Output is 1 if there is an odd number of 1s at the input (i.e., for 001, 010, 100, 111).
  • Buffer

    • Function: Inverted NOT gate. The output is the same as the input (X = A). It is used to amplify or isolate signals.
  • NAND Gate (Not-AND)

    • Function: An AND gate followed by a NOT. Output is 0 only when all inputs are 1.
    • Expression: X = (A · B)'
  • NOR Gate (Not-OR)

    • Function: An OR gate followed by a NOT. Output is 1 only when all inputs are 0.
    • Expression: X = (A + B)'
  • XNOR Gate (Exclusive-NOR)

    • Function: An XOR gate followed by a NOT. Output is 1 if and only if the inputs are the SAME.
    • Expression: X = (A ⊕ B)'
  • Universal Gates:

    • A NAND gate with its inputs tied together (A connected to both) acts as a NOT gate.
    • This property makes NAND (and NOR) gates "universal," as they can be used to create any other gate.
  • Circuit Analysis Example:

    • The lecture concludes by analyzing the circuit X = (A NAND B) AND (A OR B).
    • It shows the steps to find the final truth table by first finding the intermediate outputs (X1 = (A·B)' and X2 = A+B) and then AND-ing them together.
    • The final truth table for X is 0, 1, 1, 0, which is the same as an XOR gate.