86
C S omputer cience F oundations Copyright c 2002–2018 UMaine School of Computing and Information Science – 1 / 28 COS 140: Foundations of Computer Science Boolean Algebra Fall 2018

Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 1 / 28

COS 140: Foundations of Computer Science

Boolean Algebra

Fall 2018

Page 2: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Homework and announcements!

Introduction

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 2 / 28

• Reading: Chapter 5

• Homework: exercises 1–6

◦ Exercise 7 for extra credit

◦ Due: 1 week + 1 class from today (i.e., 9/21)

• Don’t forget – recitation this week!

• Slides: online now

Page 3: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Problem

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 3 / 28

• Computers compute digital logic functions

• Need some way to describe those functions

• For some ordinary mathematical functions, algebra works well

• But the functions we want aren’t numeric, but give true/false (1/0)

values

• What can we use?

Page 4: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Boolean algebra

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 4 / 28

• Boolean algebra is analogous to “regular” algebra, but for

true/false values

• Well-known, well-developed mathematical foundation for digital

logic.

• Provides a formalism for specifying the functions that we wish to

have performed.

• Provides a mechanism for proving circuits are equivalent.

• Named for George Boole, a 19th-century mathematician.

Page 5: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Operators

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 5 / 28

Boolean operators correspond to gates and have same truth tables

as corresponding gate.

Page 6: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Operators

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 5 / 28

Boolean operators correspond to gates and have same truth tables

as corresponding gate.

• NOT: NOT A, ¬A, A, A′

Page 7: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Operators

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 5 / 28

Boolean operators correspond to gates and have same truth tables

as corresponding gate.

• NOT: NOT A, ¬A, A, A′

• AND: A AND B, A ·B, AB, A ∧B

Page 8: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Operators

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 5 / 28

Boolean operators correspond to gates and have same truth tables

as corresponding gate.

• NOT: NOT A, ¬A, A, A′

• AND: A AND B, A ·B, AB, A ∧B

• OR: A OR B, A+B, A ∨B

Page 9: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Operators

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 5 / 28

Boolean operators correspond to gates and have same truth tables

as corresponding gate.

• NOT: NOT A, ¬A, A, A′

• AND: A AND B, A ·B, AB, A ∧B

• OR: A OR B, A+B, A ∨B

• NAND: A NAND B, A|B, A ↑ B, AB

Page 10: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Operators

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 5 / 28

Boolean operators correspond to gates and have same truth tables

as corresponding gate.

• NOT: NOT A, ¬A, A, A′

• AND: A AND B, A ·B, AB, A ∧B

• OR: A OR B, A+B, A ∨B

• NAND: A NAND B, A|B, A ↑ B, AB

• NOR: A NOR B, A ↓ B, (A+B)

Page 11: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Operators

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 5 / 28

Boolean operators correspond to gates and have same truth tables

as corresponding gate.

• NOT: NOT A, ¬A, A, A′

• AND: A AND B, A ·B, AB, A ∧B

• OR: A OR B, A+B, A ∨B

• NAND: A NAND B, A|B, A ↑ B, AB

• NOR: A NOR B, A ↓ B, (A+B)• XOR: A XOR B, A⊕B

Page 12: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Boolean Algebra Expressions

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 6 / 28

• What is an expression?

• Value of an expression ⇐ depends on the values of the variables

• Evaluate expression: assign values to variables, performing the

operations

• Can create an expression for a function by determining when the

function should be 1, then writing an expression that is 1 in only

those cases.

Page 13: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Boolean Algebra Expressions

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 6 / 28

• What is an expression?

• Value of an expression ⇐ depends on the values of the variables

• Evaluate expression: assign values to variables, performing the

operations

• Can create an expression for a function by determining when the

function should be 1, then writing an expression that is 1 in only

those cases.

Example: Create a 3-variable expression that equals 1 when all of

the inputs are 1, or when one, and only one, input is 0.

Page 14: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Boolean Algebra Expressions

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 6 / 28

• What is an expression?

• Value of an expression ⇐ depends on the values of the variables

• Evaluate expression: assign values to variables, performing the

operations

• Can create an expression for a function by determining when the

function should be 1, then writing an expression that is 1 in only

those cases.

Example: Create a 3-variable expression that equals 1 when all of

the inputs are 1, or when one, and only one, input is 0.

ABC + ABC + ABC + ABC

Page 15: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Operator Precedence for Boolean Algebra

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 7 / 28

Page 16: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Operator Precedence for Boolean Algebra

Introduction

• Problem

• Boolean algebra

• Operators

• Expressions

• Precedence

Proofs

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 7 / 28

• Subexpressions inside of parentheses, beginning with innermost

parentheses.

• NOT

• AND

• OR

• Evaluate A NAND B as NOT(A ∧B) and A NOR B as

NOT(A ∨B)

• Evaluate subexpressions of equal precedence from left to right.

Page 17: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Proofs of Equivalence

Introduction

Proofs

• Equivalence

• Proof by Truth Table

• Algebraic substitution

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 8 / 28

• Two ways: truth tables and algebraic substitution

• Truth table method: if truth table for expression A same as for

expression B, then A ≡ B

• Algebraic substitution method:

◦ Use laws of Boolean algebra to transform one expression into

the other

◦ Proofs have to be convincing to others

◦ Have to provide enough detail to show how one step follows

from another

◦ Have to provide justification for each step

Page 18: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Proof by Truth Table

Introduction

Proofs

• Equivalence

• Proof by Truth Table

• Algebraic substitution

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 9 / 28

Best to have column for each input and results of each operator

Page 19: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Proof by Truth Table

Introduction

Proofs

• Equivalence

• Proof by Truth Table

• Algebraic substitution

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 9 / 28

Best to have column for each input and results of each operator

Prove that A⊕B is equivalent to (AB) + (AB)

Page 20: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Proof by Truth Table

Introduction

Proofs

• Equivalence

• Proof by Truth Table

• Algebraic substitution

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 9 / 28

Best to have column for each input and results of each operator

Prove that A⊕B is equivalent to (AB) + (AB)

A B A⊕B A B AB AB (AB) + (AB)

0 0 0 1 1 0 0 0

0 1 1 1 0 1 0 1

1 0 1 0 1 0 1 1

1 1 0 0 0 0 0 0

Page 21: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Proof by Algebraic Substitution

Introduction

Proofs

• Equivalence

• Proof by Truth Table

• Algebraic substitution

Laws

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 10 / 28

• If you are trying to prove that expression 1 is equivalent to

expression 2:

◦ Start with one of the expressions, let’s say 1.

◦ Change it into another expression (say 1′) using an identity

postulate (law).

◦ Continue the process with 1′ until you arrive at 2.

• You must justify every change to the current expression by listing

the identity postulate used.

• Some identity postulates: double negation law, identity law, null

law, idempotent law, and inverse law

Page 22: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Double Negation Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 11 / 28

• A = A

Page 23: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Identity Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 12 / 28

• AND form: 1A = A

• OR form: 0 + A = A

Page 24: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Null Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 13 / 28

• AND form: 0A = 0• OR form: 1 + A = 1

Page 25: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Idempotent Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 14 / 28

• AND form: AA = A

• OR form: A + A = A

Page 26: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Inverse Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 15 / 28

• AND form: AA = 0• OR form: A + A = 1

Page 27: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Finding Equivalent Circuits

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 16 / 28

Starting with the following expression, find the equivalent expression

that uses the least number of gates (has the smallest number of

boolean operators) and the least number of inputs

(A + A)(BB)

Page 28: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Finding Equivalent Circuits

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 16 / 28

Starting with the following expression, find the equivalent expression

that uses the least number of gates (has the smallest number of

boolean operators) and the least number of inputs

(A + A)(BB)

• Don’t know what the final result will be so use algebraic substitution

instead of truth tables

Page 29: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Finding Equivalent Circuits

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 16 / 28

Starting with the following expression, find the equivalent expression

that uses the least number of gates (has the smallest number of

boolean operators) and the least number of inputs

(A + A)(BB)

• Don’t know what the final result will be so use algebraic substitution

instead of truth tables

• Follow your intuition about what should be the case and what makes

sense, then justify with a law.

• In other words, have a plan based on what makes sense.

• Sometimes you need to try things to make the plan.

Page 30: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Finding Equivalent Circuits

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 17 / 28

(A + A)(BB)

Page 31: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Finding Equivalent Circuits

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 17 / 28

(A + A)(BB)

(A + A)(BB) Double Negation Law

Page 32: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Finding Equivalent Circuits

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 17 / 28

(A + A)(BB)

(A + A)(BB) Double Negation Law

(A + A)B Idempotent Law

Page 33: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Finding Equivalent Circuits

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 17 / 28

(A + A)(BB)

(A + A)(BB) Double Negation Law

(A + A)B Idempotent Law

1B Inverse Law

Page 34: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Finding Equivalent Circuits

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 17 / 28

(A + A)(BB)

(A + A)(BB) Double Negation Law

(A + A)B Idempotent Law

1B Inverse Law

B Identity Law

Page 35: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Finding Equivalent Circuits

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 17 / 28

(A + A)(BB)

(A + A)(BB) Double Negation Law

(A + A)B Idempotent Law

1B Inverse Law

B Identity Law

A

B

Page 36: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Finding Equivalent Circuits

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 17 / 28

(A + A)(BB)

(A + A)(BB) Double Negation Law

(A + A)B Idempotent Law

1B Inverse Law

B Identity Law

A

B

B

Page 37: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Commutative Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 18 / 28

• AND form: AB = BA

• OR form: A + B = B + A

Page 38: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Associative Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 19 / 28

• AND form: (AB)C = A(BC)• OR form: (A + B) + C = A + (B + C)

Page 39: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Distributive Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 20 / 28

• AND form: A(B + C) = AB + AC

Page 40: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Distributive Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 20 / 28

• AND form: A(B + C) = AB + AC

• OR form: A + BC = (A + B)(A + C)

Page 41: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Distributive Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 20 / 28

• AND form: A(B + C) = AB + AC

• OR form: A + BC = (A + B)(A + C)• ...or A ∨ (B ∧ C) = (A ∨B) ∧ (A ∨ C)

Page 42: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Absorption Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 21 / 28

• AND form: A(A + B) = A

• OR form: A + AB = A

Page 43: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

DeMorgan’s Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 22 / 28

• AND form: AB = A + B

• OR form: A+B = A ·B

Page 44: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

DeMorgan’s Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 22 / 28

• AND form: AB = A + B

• OR form: A+B = A ·B

Aside: recall that AB = A NAND B, and A+B = A NOR B

Page 45: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

DeMorgan’s Law

Introduction

Proofs

Laws

• Double Negation Law

• Identity Law

• Null Law

• Idempotent Law

• Inverse Law

• Example

• Commutative Law

• Associative Law

• Distributive Law

• Absorption Law

• DeMorgan’s Law

Using the Laws

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 22 / 28

• AND form: AB = A + B

• OR form: A+B = A ·B

Aside: recall that AB = A NAND B, and A+B = A NOR B

NOTE:

AB 6= AB

A+B 6= A+B

Page 46: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

How would you prove DeMorgan’s Law?

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 23 / 28

What approach would you use? Why?

Page 47: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 24 / 28

Prove AB + AB = (AB)(AB)

Page 48: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 24 / 28

Prove AB + AB = (AB)(AB)

• (AB)(AB)

Page 49: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 24 / 28

Prove AB + AB = (AB)(AB)

• (AB)(AB)

• (AB) + (AB) DeMorgan’s Law

Page 50: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 24 / 28

Prove AB + AB = (AB)(AB)

• (AB)(AB)

• (AB) + (AB) DeMorgan’s Law

• (AB) + (AB) Double Negation

Page 51: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 24 / 28

Prove AB + AB = (AB)(AB)

• (AB)(AB)

• (AB) + (AB) DeMorgan’s Law

• (AB) + (AB) Double Negation

• (AB) + (AB) Double Negation

Page 52: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 24 / 28

Prove AB + AB = (AB)(AB)

• (AB)(AB)

• (AB) + (AB) DeMorgan’s Law

• (AB) + (AB) Double Negation

• (AB) + (AB) Double Negation

• AB +AB Def. of parentheses/precedence

Page 53: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 25 / 28

Prove AB + AB = (AB)(AB)

Page 54: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 25 / 28

Prove AB + AB = (AB)(AB)

(AB)(AB)

Page 55: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 25 / 28

Prove AB + AB = (AB)(AB)

(AB)(AB)

XY Let X = (AB), Y = (AB)

Page 56: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 25 / 28

Prove AB + AB = (AB)(AB)

(AB)(AB)

XY Let X = (AB), Y = (AB)

X + Y DeMorgan’s Law

Page 57: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 25 / 28

Prove AB + AB = (AB)(AB)

(AB)(AB)

XY Let X = (AB), Y = (AB)

X + Y DeMorgan’s Law

(AB) + (AB) Substitution for X, Y

Page 58: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 25 / 28

Prove AB + AB = (AB)(AB)

(AB)(AB)

XY Let X = (AB), Y = (AB)

X + Y DeMorgan’s Law

(AB) + (AB) Substitution for X, Y

(AB) + (AB) Double Negation

Page 59: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 25 / 28

Prove AB + AB = (AB)(AB)

(AB)(AB)

XY Let X = (AB), Y = (AB)

X + Y DeMorgan’s Law

(AB) + (AB) Substitution for X, Y

(AB) + (AB) Double Negation

(AB) + (AB) Double Negation

Page 60: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 25 / 28

Prove AB + AB = (AB)(AB)

(AB)(AB)

XY Let X = (AB), Y = (AB)

X + Y DeMorgan’s Law

(AB) + (AB) Substitution for X, Y

(AB) + (AB) Double Negation

(AB) + (AB) Double Negation

AB +AB Def. of parentheses/precedence

Page 61: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 26 / 28

Prove AB + AB = (AB)(AB)

Page 62: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 26 / 28

Prove AB + AB = (AB)(AB)

• AB + AB

Page 63: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 26 / 28

Prove AB + AB = (AB)(AB)

• AB + AB

• AB + AB Double Negation

Page 64: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 26 / 28

Prove AB + AB = (AB)(AB)

• AB + AB

• AB + AB Double Negation

• (AB)(AB) DeMorgan’s Law

Page 65: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 27 / 28

Prove ACB + C(B + C) = C

Page 66: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 27 / 28

Prove ACB + C(B + C) = C

• ACB + C(B + C)

Page 67: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 27 / 28

Prove ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

Page 68: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 27 / 28

Prove ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

Page 69: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 27 / 28

Prove ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• CB + ACB + C Commutative Law

Page 70: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 27 / 28

Prove ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• CB + ACB + C Commutative Law

• CB + CBA + C Commutative Law

Page 71: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 27 / 28

Prove ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• CB + ACB + C Commutative Law

• CB + CBA + C Commutative Law

• CB + C + CBA Commutative Law

Page 72: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 27 / 28

Prove ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• CB + ACB + C Commutative Law

• CB + CBA + C Commutative Law

• CB + C + CBA Commutative Law

• CB + C Absorption Law

Page 73: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 27 / 28

Prove ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• CB + ACB + C Commutative Law

• CB + CBA + C Commutative Law

• CB + C + CBA Commutative Law

• CB + C Absorption Law

• C + CB Commutative Law

Page 74: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 27 / 28

Prove ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• CB + ACB + C Commutative Law

• CB + CBA + C Commutative Law

• CB + C + CBA Commutative Law

• CB + C Absorption Law

• C + CB Commutative Law

• C Absorption Law

Page 75: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 28 / 28

Alternate proof of ACB + C(B + C) = C

Page 76: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 28 / 28

Alternate proof of ACB + C(B + C) = C

• ACB + C(B + C)

Page 77: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 28 / 28

Alternate proof of ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

Page 78: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 28 / 28

Alternate proof of ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

Page 79: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 28 / 28

Alternate proof of ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• ABC + CB + 1C Identity Law

Page 80: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 28 / 28

Alternate proof of ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• ABC + CB + 1C Identity Law

• CAB + CB + C1 Commutative Law, twice

Page 81: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 28 / 28

Alternate proof of ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• ABC + CB + 1C Identity Law

• CAB + CB + C1 Commutative Law, twice

• C(AB +B + 1) Distributive Law

Page 82: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 28 / 28

Alternate proof of ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• ABC + CB + 1C Identity Law

• CAB + CB + C1 Commutative Law, twice

• C(AB +B + 1) Distributive Law

• C(1 +AB +B) Commutative Law, twice

Page 83: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 28 / 28

Alternate proof of ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• ABC + CB + 1C Identity Law

• CAB + CB + C1 Commutative Law, twice

• C(AB +B + 1) Distributive Law

• C(1 +AB +B) Commutative Law, twice

• C1 Null Law

Page 84: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 28 / 28

Alternate proof of ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• ABC + CB + 1C Identity Law

• CAB + CB + C1 Commutative Law, twice

• C(AB +B + 1) Distributive Law

• C(1 +AB +B) Commutative Law, twice

• C1 Null Law

• 1C Commutative Law

Page 85: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 28 / 28

Alternate proof of ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• ABC + CB + 1C Identity Law

• CAB + CB + C1 Commutative Law, twice

• C(AB +B + 1) Distributive Law

• C(1 +AB +B) Commutative Law, twice

• C1 Null Law

• 1C Commutative Law

• C Identity Law

Page 86: Boolean Algebra - MaineSAILmainesail.umcs.maine.edu/COS140/schedule/slides/boolean-algebra.pdf · • Boolean algebra is analogous to “regular” algebra, but for true/false values

CSomputer

cience

Foundations

Example: Another Proof by Algebraic Substitution

Introduction

Proofs

Laws

Using the Laws

• Proving DeMorgan’s

Law

• Proof 1

• Proof 1a

• Proof 1b

• Proof 2

• Proof 3

Copyright c© 2002–2018 UMaine School of Computing and Information Science – 28 / 28

Alternate proof of ACB + C(B + C) = C

• ACB + C(B + C)• ACB + CB + CC Distributive Law

• ACB + CB + C Idempotent Law

• ABC + CB + 1C Identity Law

• CAB + CB + C1 Commutative Law, twice

• C(AB +B + 1) Distributive Law

• C(1 +AB +B) Commutative Law, twice

• C1 Null Law

• 1C Commutative Law

• C Identity Law

⇒ Often more than one way to do proof!