department of management school of business, economics and informatics boolean algebra eva szatmari...
TRANSCRIPT
Department of ManagementSchool of Business, Economics and Informatics
Boolean AlgebraEva Szatmari
School of BEI Study Skills in Mathematics
http://moodle.bbk.ac.uk/
http://www.dcs.bbk.ac.uk/~sjmaybank/introduction%20to%20computer%20systems.html
Learning Objectives
• Basic Boolean Operations• Truth Table • Examples• Practice Questions• Evaluating Boolean Expressions• Examples• Practice Questions
Basic Boolean Operations
What are the basic Boolean operations?
What do you know about them?
Truth Table
What is a truth table?
How do you construct one?
What are the key steps when constructing one?
Example 1
(A AND B) OR NOT(A)
Example 2
(NOT(A) OR B) AND C
Example 3
(A AND NOT(B)) XOR C
Example 4
(A IMPLIES B) OR (A IMPLIES C)
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)
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
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
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
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?
Example 1
Evaluate the value of the following Boolean expression, if A = 1 and B = 0
A OR NOT(B)
Example 2
Evaluate the value of the following Boolean expression, if A = 1, B = 0 and C = 1
(A AND NOT(B)) IMPLIES C
Example 3
Evaluate the value of the following Boolean expression, if A = 1 and B = 0
A OR NOT(B AND C)
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)
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
Any Other Questions?