Digital Logic and Boolean Algebra Study Notes

Introduction to Digital Logic and Basic Gates

Digital logic is a crucial topic in computer engineering, often associated with engineering majors and courses such as EGR 270, which focuses on fundamentals of computer engineering. This course explores how to take basic components like logic gates and understand their functionality within the broader context of computer operations rather than delving deeply into circuit design, which is typically the purview of electrical engineers.

Logic Gates

A gate is a small electronic device that implements Boolean operators to model physical components in digital circuits. Digital circuits consist of collections of gates that perform arithmetic and logical operations.

Types of Gates:


  1. AND Gate

    • Definition: Produces an output of 1 if both inputs are 1; otherwise, the output is 0.


    • Truth Table:

      Input A

      Input B

      Output (A AND B)


      0

      0

      0


      0

      1

      0


      1

      0

      0


      1

      1

      1

      • OR Gate

      • Definition: Produces an output of 1 if at least one input is 1.

      • Truth Table:

      Input A

      Input B

      Output (A OR B)


      ---------

      ---------

      ------------------


      0

      0

      0


      0

      1

      1


      1

      0

      1


      1

      1

      1

      • NOT Gate

      • Definition: Inverts the input. If input is 1, it outputs 0; if input is 0, it outputs 1.

      • Truth Table:

      Input

      Output (NOT A)


      -------

      -----------------


      0

      1


      1

      0

      Inclusive OR

      • Definition: Similar to the OR gate but explicitly states that it is possible for both inputs to be true simultaneously.

      • This operator is represented with a plus sign surrounded by a circle, indicating that for it to yield a true result, at least one input must be 1, but not both.

      NAND and NOR Gates
      • NAND Gate: This gate outputs 0 only when both inputs are 1, and otherwise outputs 1. Essentially, it's the negation of an AND gate.

      • NOR Gate: Outputs 1 when both inputs are 0, equivalent to the negation of an OR gate.

      Multiple Input Gates

      Multiple input gates such as AND and OR can handle more than two inputs while maintaining the same logical functions. The output remains consistent with the fundamental operations of AND and OR for additional inputs.

      Boolean Algebra and Circuit Design

      The construction of gates and their arrangement is linked to Boolean algebra, which provides the foundational mathematical framework.

      • Boolean functions can be implemented physically via circuits, which can be represented through truth tables, K-maps, or logical diagrams. For example, consider a Boolean function like x AND y AND NOT z can be diagrammed based on the order of operations dictated by Boolean logic.

      Order of Operations

      It's crucial to follow correct precedence when designing circuits:

      1. NOT operations are prioritized.

      2. AND operations follow.

      3. OR operations come last.

      Simplification of Boolean Functions

      When designing logical circuits, simplification is critical as it reduces the number of gates needed, thus saving on processing time, space, power, and potentially cost.

      • Absorption Law in Boolean algebra states that A OR (A AND B) simplifies to A, which demonstrates the importance of reducing terms.

      Truth Tables & Logic Diagrams

      To fully grasp logical functions, one must understand how to read and fill out truth tables, recognizing how inputs yield outputs in Boolean logic. Creating K-maps can also aid in visualizing logical operations and simplifications easily. Each truth table corresponds to an expression that can be further processed or simplified.

      Combinational Circuits

      Combinational circuits are networks of gates that combine inputs to produce outputs, and can have multiple outputs that reflect different functions. These circuits take inputs in real time, without considering past inputs, distinguishing them from sequential circuits.

      Example: Half Adder


      • Truth Table:

        X

        Y

        Sum

        Carry


        0

        0

        0

        0


        0

        1

        1

        0


        1

        0

        1

        0


        1

        1

        0

        1

        The Sum function can be realized using an XOR gate, while the Carry can be mapped with an AND gate, demonstrating how specific logical functions create structured outputs from combinations of basic operations.

        Full Adder

        A Full Adder extends the half adder by including a carry input, allowing it to process and sum multiple bit columns with a carry possibility from previous calculations.

        • It can be illustrated through a new truth table that relates its carry operations more complexly, ensuring detailed outputs based on all possible combinations of inputs.

Introduction to Digital Logic and Basic Gates

Digital logic is fundamental in computer engineering (e.g., EGR 270), focusing on how logic gates function within computer operations rather than deep circuit design.

Logic Gates

A gate is an electronic device that implements Boolean operators to model digital circuit components. Circuits combine gates for arithmetic and logical operations.

Types of Gates:
  1. AND Gate: Output is 1 only if both inputs are 1.

  2. OR Gate: Output is 1 if at least one input is 1.

  3. NOT Gate: Inverts the input (1 becomes 0, 0 becomes 1).

  4. NAND Gate: Outputs 0 only when both inputs are 1; otherwise, 1 (negation of AND).

  5. NOR Gate: Outputs 1 when both inputs are 0 (negation of OR).

Multiple Input Gates

These gates (e.g., AND, OR) can handle more than two inputs, maintaining their fundamental logical functions.

Boolean Algebra and Circuit Design

Boolean algebra provides the mathematical framework for gate construction and arrangement. Boolean functions can be implemented via circuits, represented by truth tables, K-maps, or logical diagrams.

Order of Operations

Circuit design prioritizes operations: 1. NOT, 2. AND, 3. OR.

Simplification of Boolean Functions

Simplifying Boolean functions (e.g., using Absorption Law: A+(AB)=AA + (A \cdot B) = A) reduces the number of gates, saving processing time, space, power, and cost.

Truth Tables & Logic Diagrams

Understanding truth tables is crucial for Boolean logic input/output. K-maps aid in visualizing and simplifying logical operations.

Combinational Circuits

These gate networks combine inputs to produce outputs in real-time, without considering past inputs. They can have multiple outputs.

Example: Half Adder

Adds two single binary digits (XX and YY), producing a Sum and a Carry. The Sum can be realized with an XOR gate, and the Carry with an AND gate.

Full Adder

Extends the Half Adder by including a carry input, enabling the processing of multiple bit columns with carry possibilities from previous calculations.