Download presentation
Presentation is loading. Please wait.
1
Building Security System A new building is creating a security system with three alarm types. A flood alarm, a fire alarm and an intrusion alarm. If the intrusion or fire alarm goes off, the police department is called. If the fire or flood alarm goes off the fire department is called. If the flood alarm goes off don’t call the police department. Similarly, if the intrusion alarm goes off don’t call the fire department. A = intrusion alarm B = flood alarm C = fire alarm If intrusion OR fire alarm call police If fire OR flood alarm call fire department If flood NOT police If intrusion NOT fire Copyright © 2008 by Helene G. Kershner
2
Building Security System A = intrusion alarm B = flood alarm C = fire alarm If intrusion OR fire alarm call police Police = A OR C = A+C P = A+C If fire OR flood alarm call fire department Fire Dept. = B OR C = B+C F = B+C If flood NOT police P = ~B If intrusion NOT fire F = ~C Copyright © 2008 by Helene G. Kershner
3
Building Security System Intrusion alarm = A, Flood alarm = B, Fire alarm = C Police Fire Dept. or or (any row with a 1 1) A B C A+C B+C 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Copyright © 2008 by Helene G. Kershner
4
Building Security System Intrusion alarm = A, Flood alarm = B, Fire alarm = C Police Fire Dept. or (any row with a 1 1 1) A B C A+C B+C 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 Copyright © 2008 by Helene G. Kershner
5
Building Security System Intrusion alarm = A, Flood alarm = B, Fire alarm = C Police Fire Dept. or (any row with a 1 1 1) A B C A+C B+C 0 0 0 0 0 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 Copyright © 2008 by Helene G. Kershner
6
Building Security System Intrusion alarm = A, Flood alarm = B, Fire alarm = C Remember: A+C = Police, B+C = Fire A B C A+C B+C 0 0 0 0 0 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 Now lets ask some questions: 1)If an intruder enters the building, which alarm goes off? A=1, B=0, C=0 Copyright © 2008 by Helene G. Kershner
7
Building Security System Intrusion alarm = A, Flood alarm = B, Fire alarm = C Remember: A+C = Police, B+C = Fire A B C A+C B+C 0 0 0 0 0 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 Now lets ask some questions: 1)If an intruder enters the building, which alarm goes off? A=1, B=0, C=0 2)If the building is empty and a fire starts and sets off the sprinkler system, who gets called? A=0, B=1, C=1 Copyright © 2008 by Helene G. Kershner
8
Building Security System Intrusion alarm = A, Flood alarm = B, Fire alarm = C Remember: A+C = Police, B+C = Fire A B C A+C B+C 0 0 0 0 0 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 Now lets ask some questions: 1)If an intruder enters the building, which alarm goes off? A=1, B=0, C=0 2)If the building is empty and a fire starts and sets off the sprinkler system, who gets called? A=0, B=1, C=1 3)If an intruder sets a fire to cover his tracks, who get called? A=1, B=1, C=0 Copyright © 2008 by Helene G. Kershner
9
Logic – Order of Operations In Logic as in basic arithmetic the operations are ordered based on their importance 1. Parenthesis (these say DO ME FIRST) 2. NOT (~) 3. AND (۰ ) 4. OR (+) Copyright © 2008 by Helene G. Kershner
10
Solving Logic Problems Solve the following: R = ~(A+B)A Read as R = NOT (A OR B) AND A 1.Create Truth Table with 2 columns 2.Solve (A+B) 3.Solve ~(A+B) 4.Solve entire equation What is R, when A = 1, B = 0 A B (A+B) ~(A+B) (A+B)A 0 0 1 1 0 1 Copyright © 2008 by Helene G. Kershner
11
Solving Logic Problems Solve the following: R = ~(A+B)A Read as R = NOT (A OR B) AND A 1.Create Truth Table with 2 columns 2.Solve (A+B) 3.Solve ~(A+B) 4.Solve entire equation What is R, when A = 1, B = 0 A B (A+B) ~(A+B) ~(A+B)A 0 0 0 0 1 1 1 0 1 1 1 1 Copyright © 2008 by Helene G. Kershner
12
Solving Logic Problems Solve the following: R = ~(A+B)A Read as R = NOT (A OR B) AND A 1.Create Truth Table with 2 columns 2.Solve (A+B) 3.Solve ~(A+B) 4.Solve entire equation What is R, when A = 1, B = 0 A B (A+B) ~(A+B) ~(A+B)A 0 0 0 1 0 1 1 0 1 0 1 1 1 0 Copyright © 2008 by Helene G. Kershner
13
Solving Logic Problems Solve the following: R = ~(A+B)A Read as R = NOT (A OR B) AND A 1.Create Truth Table with 2 columns 2.Solve (A+B) 3.Solve ~(A+B) 4.Solve entire equation What is R, when A = 1, B = 0 ? R = 0 A B (A+B) ~(A+B) ~(A+B)A 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 1 1 0 0 Copyright © 2008 by Helene G. Kershner
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.