Boolean Algebra - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

Boolean Algebra

Description:

A (B C) = (AB) (AC) A (BC) = (A B) (A C) Exercise: using truth tables prove ... Exercise: Solving a Truth Table. Solution is, X = AB A'B = (A AND B) ... – PowerPoint PPT presentation

Number of Views:162
Avg rating:3.0/5.0
Slides: 28
Provided by: WillFit6
Category:
Tags: algebra | boolean

less

Transcript and Presenter's Notes

Title: Boolean Algebra


1
Boolean Algebra
2
Logical Statements
  • A proposition that may or may not be true
  • Today is Friday
  • Today is Sunday
  • It is raining

3
Compound Statements
  • More complicated expressions can be built from
    simpler ones
  • Today is Friday AND it is raining.
  • Today is Sunday OR it is NOT raining
  • Today is Friday OR today is NOT Friday
  • (This is a tautology)
  • Today is Friday AND today is NOT Friday
  • (This is a contradiction)
  • The expression as a whole is either true or false.

4
Things can get a little tricky
  • Are these two statements equivalent?
  • It is not nighttime and it is Friday OR it is
    raining and it is Friday.
  • It is not nighttime or it is raining and Friday
    AND it is Friday.

5
Boolean Algebra
  • Boolean Algebra allows us to formalize this sort
    of reasoning.
  • Boolean variables may take one of only two
    possible values TRUE or FALSE.
  • (or, equivalently, 1 or 0)
  • Algebraic operators - /
  • Logical operators - AND, OR, NOT, XOR

6
Logical Operators
  • A AND B is True when both A and B are true.
  • A OR B is always True unless both A and B are
    false.
  • NOT A changes the value from True to False or
    False to True.
  • XOR either a or b but not both

7
Writing AND, OR, NOT
  • A AND B A B AB
  • A OR B A v B AB
  • NOT A A A
  • TRUE T 1
  • FALSE F 0

8
Exercise
  • AB AB
  • A AND B OR A AND NOT B
  • (A B)(B)
  • NOT (A OR B) AND B

9
Boolean Algebra
  • The in Boolean Algebra means equivalent
  • Two statements are equivalent if they have the
    same truth table. (More in a second)
  • For example,
  • True True,
  • A A,

10
Truth Tables
  • Provide an exhaustive approach to describing when
    some statement is true (or false)

11
Truth Table
12
Truth Table
13
Truth Table
14
Truth Table
15
Example
  • Write the truth table for A(A B) AB
  • Fill in the following columns
  • A, B, A, B, A B, AB, A (A B), whole
    expression.

16
A (A B) AB
17
Exercise
  • Write the truth table for (A A) B

18
Solution to (A A) B
19
Boolean Algebra - Identities
  • A True True
  • A False A
  • A A A
  • A B B A
  • (commutative)
  • A AND True A
  • A AND False False
  • A AND A A
  • AB BA
  • (commutative)

20
Associative and Distributive Identities
  • A(BC) (AB)C
  • A (B C) (A B) C
  • A (B C) (AB)(AC)
  • A (BC) (A B) (A C)
  • Exercise using truth tables prove -
  • A(A B) A

21
Solution A AND (A OR B) A

22
Using Identities
  • A (BC) (A B)(A C)
  • A(B C) (AB) (AC)
  • A(A B) A
  • A A A
  • Exercise - using identities prove
  • A (AB) A
  • A (AB) (A A)(A B)
  • A (A B) A

23
Identities with NOT
  • (A) A
  • A A True
  • AA False

24
DeMorgans Laws
  • (A B) AB
  • (AB) A B
  • Exercise - Simplify the following with identities
  • (AB)

25
Solving a Truth Table
26
Exercise Solving a Truth Table
27
Exercise Solving a Truth Table
Write a Comment
User Comments (0)
About PowerShow.com