Transcript of Boolean Algebra. Topics Binary Number System AND, OR, NOT, Exclusive OR, and Implications operations...
- Slide 1
- Boolean Algebra
- Slide 2
- Topics Binary Number System AND, OR, NOT, Exclusive OR, and
Implications operations Truth Tables and Algebraic Laws Boolean
Logic and Circuits Application in Internet Searching Boolean Logic
and Fallacies
- Slide 3
- Binary OFF 0 ON 1
- Slide 4
- Counting Binary BINARYDECIMAL 00 11 102 113 1004 1015 1106 1117
10008 10019 101010 101111 110012 110113 111014 111115 1000016
- Slide 5
- AND FIRST NUMBERSECOND NUMBERRESULT 000 010 100 111 Usually
denoted with ^ Example: 1 ^ 1 = 1 1 ^ 0 = 0
- Slide 6
- OR FIRST NUMBERSECOND NUMBERRESULT 000 011 101 111 Usually
denoted with Example: 1 1 = 1 0 0 = 0
- Slide 7
- Example 1 For x = 1 and y = 0 (x ^ y ) (x ^ y) (1 ^ 0) (1 ^ 0)
0 0 0
- Slide 8
- NOT NUMBERResult 10 01 Usually denoted with ~ Example: ~1 = 0
~0 = 1
- Slide 9
- EXCLUSIVE OR FIRST NUMBERSECOND NUMBERRESULT 000 011 101 110
Usually denoted with Example: 1 1 = 0 0 1 = 1 c
- Slide 10
- Example 2 For x = 1, y = 1, z = 0 ~(x ^ z) ( y ~z) ~(1 ^ 0) ( 1
~0) ~0 ( 1 1) 1 1 0
- Slide 11
- Implication FIRST NUMBERSECOND NUMBERRESULT 001 011 100 111
Usually denoted with => Example: 1 => 1 = 1 0 => 1 =
1
- Slide 12
- Truth Tables Table that lists ALL possible values for a
particular equation. Ex: (x ^ y ) (x y) xy(x^y) (x y)(x^y) (x y)
00000 01010 10010 11111
- Slide 13
- Algebraic Laws Associativity => x (y z) = (x y) z
Commutativity => x y = y x Distribution => x ( y z ) = (x y)
(x z) De Morgan => (~x) ^ (y) = ~(x y)
- Slide 14
- Application 1: Circuits
- Slide 15
- Transistors and Gates Gates A single entity that usually take
in two inputs and produces an output. Transistors Works the same
way as logical gates, but is an actual device. Building blocks a
computer. Number of Transistors in a modern CPU: 10 Million
- Slide 16
- Gates
- Slide 17
- Example: Alarm
- Slide 18
- Example: Half Adder Adds 2 bits 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1
+ 1 = 0 + 1 (carry_ 0 + 0 + 1 = 1
- Slide 19
- Application 2: Searching
- Slide 20
- Searching Primitives pizza restaurants Mexican restaurants Both
pizza restaurants and Mexican restaurants must appear as your
result. respiration OR photosynthesis At least one of these results
must appear as your result. This can mean only respiration, both,
or only photosynthesis.
- Slide 21
- Searching Primitives William Shakespeare -hamlet Search for
anything William Shakespeare related that does not include hamlet.
Analogues to the NOT operator. Natural Disasters +earthquakes
Search for anything that involves natural disasters, but the term
earth quakes must be included.
- Slide 22
- Example: Searching Techniques Suppose I am interested in
scholarships, but I dont want to search for any women or grade
based scholarships. Scholarships AND NOT minority OR need based
scholarships minority OR grades
- Slide 23
- Example 2: Searching Techniques Lets search for graduate school
that are NOT in Alabama, but are in Georgia OR Florida graduate
schools -"Alabama" +"Florida" OR +"Georgia"
- Slide 24
- Application 3: Analyzing Fallacies
- Slide 25
- Fallacy I A caused B therefore B caused A Ex: Bill sets out
several plates with bread on them. After a couple days, he notices
that the bread has mold growing all over it. Bill concludes that
the mold was produced by the bread going bad. A => B must be
equal to B => A. Lets test that out! ABA=>BB=>A 0011 0110
1001 1111
- Slide 26
- Fallacy II Is this a fallacy? A cause B therefore B did not
cause A A=>B must be equal to ~(B=>A)
ABA=>BB=>A~(B=>A) 00110 01101 10010 11110