Download presentation
Presentation is loading. Please wait.
Published byReynard Reeves Modified over 9 years ago
1
Logic and Boolean Algebra
2
Logic statements Real life statements “I use public transportation when the car is broken and I have to go to work” “All the lights in the house are turned off” Mathematical statements “If side AB is equal to side BC and BC is equal to side CA, then the triangle ABC is equilateral” “If a shape is both a rombus and a rectangle then it is a square” “This triangle is rectangle” Are called logic statements Statements are either TRUE or FALSE
3
What is logic Logic is a branch of mathematics that studies statements. It helps organize mathematicians on proofs and theorems. Statements “A”, “B” can be combined as follows: “A or B” is called (inclusive) logical disjunction “A and B” is called logical conjunction “not A” is called logical negation or complement These are called logic operations
4
Truth Tables ABA and B (A B) fff ftf tff ttt ABA or B (A B) fff ftt tft ttt To see the effect of these operation we draw their truth tables. Anot A (A) ft tf
5
A few more operations… Implication Exclusive disjunction (exclusive or - XOR) ABA then B (A B) fft ftt tff ttt ABA xor B (A B) fff ftt tft ttf
6
Boolean Algebra Boolean algebra combines two math fields Algebra (operations, associative laws, etc) Binary logic: 0,1 (or True, False) Developed by George Boole, 1815 – 1864 Has three operators And (ab), OR (a+b), NOT (a’) Basic binary operation theorems Identity: a1=a, a+0=a Null element: a0=0, a+1=1 Idempotency: aa=a, a+a=a Complements: a+a’=1, aa’=0 Basic algebraic theorems: Commutativity: ab=ba, a+b=b+a Associativity: (ab)c=a(bc), (a+b)+c=a+(b+c) Distributivity: (a+b)c=(ac)+(bc), (ab)+c=(ac)+(bc) Covering: a(a+b) = a, a+(ab) = a
7
Examples Prove that: (a+b)b’ = ab’ (ab)+b’ = a+b’ (a+b)’ = a’ b’ (ab)’ =a’ + b’
8
Use of Boolean Algebra: Logic (i.e. digital) circuits
9
Honestants and Swindlecants There are two kinds of people (aborigines) on a mysterious island. There are so-called Honestants who speak always the truth, and the others are Swindlecants who always lie An outside visitor, on his way to the pub, he met three aborigines. One made this statement: "We are all Swindlecants." The second one concluded: "Just one of us is an Honestant." Who are they? [Hint: use truth tables]
10
Pandora’s Box Once upon a time, there was a girl named Pandora, who wanted a bright groom so she made up a few logic problems for the wannabe. This is one of them. Based upon the inscriptions on the boxes (none or just one of them is true), choose one box where the wedding ring is hidden. Golden box: "The ring is in this box." Silver box: "The ring is not in this box." Lead box: "The ring is not in the golden box." [Hint: use truth tables]
11
Pandora’s Box II And here is the second test. At least one inscription is true and at least one is false. Which means the ring is in the... Golden box: "The ring is not in the silver box." Silver box: "The ring is not in this box." Lead box: "The ring is in this box." [Hint: use truth tables]
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.