compter logic

Copyright and Acknowledgment

  • Copyright © 2015, 2011, 2007 Pearson Education, Inc. Prepared for MRU university

Computer Logic

  • Computer logic helps to compute faster.

Boolean Algebra

  • Developed by English Mathematician George Boole (1815 - 1864).
  • Described as an algebra of logic or an algebra of two values: True or False.
  • Binary System: Refers to a system that uses two values, such as:
    • Yes/No
    • False/True
    • ON/OFF
    • 0/1
  • In formal logic, values are defined as "true" and "false."
  • In digital circuits, values are represented as "on" (1) and "off" (0).

Circuit Example Using Battery, Light Bulb, and Switch

  • Simple circuit using a battery, a light bulb, and a switch:
    • Switch Closed: Light bulb is ON.
    • Switch Open: Light bulb is OFF.

Boolean Operators

  • Fundamental logical operations performed by logical operators:
    1. NOT (Negation): Inverts the state.
    2. AND (Conjunction): True if both operands are true.
    3. OR (Disjunction): True if at least one operand is true.
  • Other logical operators can be derived from these three fundamentals.

Logical Negation (NOT)

  • Represented by the symbol ().
  • Illustrated through a simple circuit with a switch and a lightbulb:
    • Switch P Closed: Lightbulb is OFF.
    • Switch P Open: Lightbulb is ON.
  • Truth table representation:
    • P | ~P
    • T | F
    • F | T

Logical AND (Conjunction)

  • Illustrated with two switches P and Q connected in series:
    • Light bulb's status depends on P and Q states.
    • Truth table:
      • P | Q | P ⋅ Q
      • T | T | T
      • T | F | F
      • F | T | F
      • F | F | F
  • Also represented as multiplication with a dot (P ⋅ Q).

Binary Truth Table for AND Operator

  • Logic illustrated as a binary truth table:
    • P | Q | Lightbulb
    • 1 | 1 | 1
    • 1 | 0 | 0
    • 0 | 1 | 0
    • 0 | 0 | 0

Logical OR (Disjunction)

  • Represented through parallel switches P and Q:
    • Truth table:
      • P | Q | P + Q
      • T | T | T
      • T | F | T
      • F | T | T
      • F | F | F
  • Mathematical addition connection: P + Q.

Complex Circuits with Multiple Switches

  • Example of a circuit with three switches P, Q, and R:
    • P | Q | R | Lightbulb
    • 1 | 1 | 1 | 1
    • 1 | 1 | 0 | 1
    • 1 | 0 | 1 | 1
    • 0 | 0 | 0 | 0

Additional Boolean Operators

  • NAND Operator: Truth table:

    • P | Q | Lightbulb
    • T | T | F
    • T | F | T
    • F | T | T
    • F | F | T
  • NOR Operator: Truth table:

    • P | Q | Lightbulb
    • T | T | F
    • T | F | F
    • F | T | F
    • F | F | T
  • XOR Operator (Exclusive OR): Truth table:

    • P | Q | Lightbulb
    • T | T | F
    • T | F | T
    • F | T | T
    • F | F | F

Graphical Symbols for Boolean Operators

  • Graphical representation assists in building larger circuits.

Boolean Functions

  • Combining the six Boolean operators allows for the creation of complex circuits or networks.
  • Boolean Functions describe relationships between inputs and outputs, facilitating mathematical operations.

Example of Boolean Functions

  • Circuit example:
    • Inputs A, B, C producing output X through a network of gates.

Binary Language

  • Binary System has been essential for computer technology over the last five decades.
  • Computers only understand binary digits: 1 and 0.

Writing Numbers in Binary System

  • Explanation of writing numbers in binary and its implications.

Base Concepts

  • Concepts of numeral representation in various bases:
    • Base 10
    • Base 5
    • Base 7
    • Base 3

Historical Context of Counting

  • Early human counting methods using bundling and digit systems.
  • Exploration of base systems utilizing camel counting as an example:
    • Base 10: 1 pack of ten camels, 3 single camels to form 13.

Counting in Multiple Bases

  • Explanation of numeral representation across different bases (N, where N represents base value).

Base 5, Base 7, and Base 3 Counting Samples

  • Base 5:
    • Example: 2 packs of five camels (5) + 3 single camels = 13 in decimal.

Conclusion on Base Representation

  • Validates equivalence among different bases:
    • Example: 13 (base 10) ≡ 16 (base 7) ≡ 23 (base 5) ≡ 111 (base 3).

Hindu-Arabic Numeration System (Base 10)

  • Base 10 numeration system defined by its positional-value structure with ten digits (0-9).
  • Expanded form of numbers illustrates the power of digits:
    • Example: 673 = (6 × 100) + (7 × 10) + (3 × 1).

Conversion from Base-N to Base-10

  • Generalized method for converting numbers from any base to base ten via expansion.
  • Example calculations for various bases illustrated.

Conversion from Base-10 to Other Bases

  • Using division by a new base to ascertain digit values, with examples.

Arithmetic in Computer Technology

  • Explanation of primary arithmetic operations in non-decimal bases including:
    • Addition
    • Subtraction
    • Multiplication

Logic Gates and Their Role in Computation

  • Important concept of logic gates as foundational elements of digital circuits, allowing decision-making based on digital signals.
  • Emphasis on half adders and full adders for binary arithmetic operations.

Logic Gates - Half Adders

  • A half adder allows for summation of two bits, using XOR and AND operations to derive outputs.

Logic Gates - Full Adders

  • Full adders are capable of handling more complex operations, including multi-bit additions through cascading.

Conclusion on Binary Computation

  • Final remarks on assembly, innovation, and progression of computer technology, highlighting the significance of understanding base systems and logic gates.