department of management school of business, economics and informatics boolean algebra eva szatmari...

21
Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari [email protected]

Upload: miles-cameron

Post on 17-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Department of ManagementSchool of Business, Economics and Informatics

Boolean AlgebraEva Szatmari

[email protected]

Page 3: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Learning Objectives

• Basic Boolean Operations• Truth Table • Examples• Practice Questions• Evaluating Boolean Expressions• Examples• Practice Questions

Page 4: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Basic Boolean Operations

What are the basic Boolean operations?

What do you know about them?

Page 5: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Truth Table

What is a truth table?

How do you construct one?

What are the key steps when constructing one?

Page 6: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Example 1

(A AND B) OR NOT(A)

Page 7: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Example 2

(NOT(A) OR B) AND C

Page 8: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Example 3

(A AND NOT(B)) XOR C

Page 9: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Example 4

(A IMPLIES B) OR (A IMPLIES C)

Page 10: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Practice Questions

Construct the truth table of the following Boolean expressions:

A OR (NOT(B) AND A)

(A OR B) IMPLIES (A AND B)

A OR (B AND C)

Page 11: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Practice Question 1 – Answer

A B NOT(B)

NOT(B) AND A

A OR (NOT(B) AND A)

0 0 1 0 0

0 1 0 0 0

1 0 1 1 1

1 1 0 0 1

Page 12: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Practice Question 2 – Answer

A B A OR B A AND B

(A OR B) IMPLIES (A AND B)

0 0 0 0 1

0 1 1 0 0

1 0 1 0 0

1 1 1 1 1

Page 13: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Practice Question 3 – Answer

A B C B AND C A OR (B AND C)0 0 0 0 00 0 1 0 00 1 0 0 00 1 1 1 11 0 0 0 11 0 1 0 11 1 0 0 11 1 1 1 1

Page 14: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Evaluating Boolean Expressions

Which operations are used, how do they work?

What are the priorities?

What values do I know?

Is there any value I don’t know?

Page 15: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Example 1

Evaluate the value of the following Boolean expression, if A = 1 and B = 0

A OR NOT(B)

Page 16: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Example 2

Evaluate the value of the following Boolean expression, if A = 1, B = 0 and C = 1

(A AND NOT(B)) IMPLIES C

Page 17: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Example 3

Evaluate the value of the following Boolean expression, if A = 1 and B = 0

A OR NOT(B AND C)

Page 18: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Practice Questions

1) Evaluate the value of the following Boolean expression, if A = 0 and B = 1 NOT(A XOR B)

2) Evaluate the value of the following Boolean expression, if A = 0 and B = 1 A OR (NOT(B) AND C)

Page 19: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Practice Questions – Answers

1) NOT(A XOR B) = NOT (0 XOR 1) = NOT(0) = 1

2) A OR (NOT(B) AND C) If C = 00 OR (NOT(1) AND 0) = 0 OR (0 AND 0) = 0 OR 0 = 0If C = 10 OR (NOT(1) AND 1) = 0 OR (0 AND 1) = 0 OR 0 = 0

Page 20: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Any Other Questions?

Page 21: Department of Management School of Business, Economics and Informatics Boolean Algebra Eva Szatmari e.szatmari@bbk.ac.uk

Contact DetailsEva Szatmari

0207 631 6254Or

[email protected] LUCK