Logic Circuits Notes

Logic Circuits

  • Definition: Logic circuits consist of one or more input signals (variables) and output signals, where each can hold values of either 0 or 1.

  • Boolean Expression: The output can be expressed as a function of the inputs, such as:
    Q=A+BQ = A + B
    where signal values follow logical (Boolean) operations rather than numerical values.

  • Boolean Algebra: A mathematical structure used to handle operations and functions within logic circuits.

Basic Logic Operations

  • Types of Logic Operations: There are three basic operations in logic circuits: Inverse, AND, and OR operations.

    • Inverse (Complementing):
    • This operation inverts (complements) the signal.
    • Represented by:
      Y=XY = X'
  • AND Operation:

    • This takes two or more inputs, returning output 1 only when all inputs are 1s.
    • Pronunciation: "A and B". Note: the dot (.) representing AND operation does not imply multiplication, it can also be omitted.
    • Expression:
      Z=ABZ = AB
    • An AND gate is used for this, typically represented as:

    AND Gate Symbol

  • OR Operation:

    • This takes two or more inputs, returning output 1 when any input is 1.
    • Pronunciation: "A or B". The plus (+) for OR does not imply regular addition.
    • Expression:

    Z=A+BZ = A + B

    • An OR gate is used for this, typically represented as:

    OR Gate Symbol

Boolean Expressions and Logic Circuits

  • Any Boolean expression can be represented as a logic circuit and vice versa. Example:
    Q=AB+(B+C)BCQ = AB + (B + C)BC

  • Drawing Logic Circuits: To simplify circuit diagrams, inverters at the inputs/outputs of other gates can be represented as a circle at these points.

Truth Table

  • A truth table outlines the values of a Boolean expression for all possible combinations of input values (signals).

Example of Logic Circuit and Truth Table

  • Given the expression:
    Q=(A+B)(C+D)Q = (A + B)(C + D)
  • One can derive its corresponding logic circuit and truth table.

Other Gates

  • NOR Gate: An inverter placed at the output of an OR gate results in a NOR gate.

  • NAND Gate: An inverter placed at the output of an AND gate results in a NAND gate.

  • XOR Gate (Exclusive OR): The output is true when inputs differ.

    • Expression:
      AextXORB=A+BA ext{ XOR } B = A + B
  • XNOR Gate: An inverted XOR outputs true when the inputs are the same.

    • Expression:
      Y=AB+ABY = AB + A'B'