Boolean Operators - PowerPoint PPT Presentation

andrew
boolean operators l.
Skip this Video
Loading SlideShow in 5 Seconds..
Boolean Operators PowerPoint Presentation
Download Presentation
Boolean Operators

play fullscreen
1 / 20
Download Presentation
Boolean Operators
317 Views
Download Presentation

Boolean Operators

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Boolean Operators Defined by truth tables and applied in search expressions

  2. Building a Truth Table

  3. Building a Truth Table The number of rows in a truth table is 2n, where n is the number of terms in the table.

  4. Building a Truth TableNegation The truth-value of ~p is always the opposite of p. This is essentially what contradiction looks like.

  5. Building a Truth TableBoolean AND The expression "p & q" evaluates to TRUE only when both p and q are TRUE.

  6. Building a Truth TableBoolean OR The expression p v q ( also written "p OR q"; inclusive OR) evaluates to TRUE when either p or q is TRUE.

  7. Building a Truth TableAll Relations The three operators illustrated here are the basis of most database searches.

  8. In the music store... C - CD e - electronica1 - single disk pkg. D - DVD h - hip hop2 - double disk pkg. S - Super Audio CD m - metal3 - triple disk pkg.

  9. In the music store... C - CD e - electronica1 - single disk pkg. D - DVD h - hip hop2 - double disk pkg. S - Super Audio CD m - metal3 - triple disk pkg. All CDs C Everything that is not a Super Audio CD ~S All electronica DVDs D • e DVDs that are not metal D • (~m) All CDs and DVDs C v D Hip hop CDs except triple disk pkgs. (h • C) • ~3

  10. In the music store... C - CD e - electronica1 - single disk pkg. D - DVD h - hip hop2 - double disk pkg. S - Super Audio CD m - metal3 - triple disk pkg. All CDs C Everything that is not a Super Audio CD ~S All electronica DVDs D • e DVDs that are not metal D • (~m) All CDs and DVDs C v D Hip hop CDs except triple disk pkgs. (h • C) • ~3

  11. In the music store... C - CD e - electronica1 - single disk pkg. D - DVD h - hip hop2 - double disk pkg. S - Super Audio CD m - metal3 - triple disk pkg. All CDs C Everything that is not a Super Audio CD ~S All electronica DVDs D • e DVDs that are not metal D • (~m) All CDs and DVDs C v D Hip hop CDs except triple disk pkgs. (h • C) • ~3

  12. In the music store... C - CD e - electronica1 - single disk pkg. D - DVD h - hip hop2 - double disk pkg. S - Super Audio CD m - metal3 - triple disk pkg. All CDs C Everything that is not a Super Audio CD ~S All electronica DVDs D • e DVDs that are not metal D • (~m) All CDs and DVDs C v D Hip hop CDs except triple disk pkgs. (h • C) • ~3

  13. In the music store... C - CD e - electronica1 - single disk pkg. D - DVD h - hip hop2 - double disk pkg. S - Super Audio CD m - metal3 - triple disk pkg. All CDs C Everything that is not a Super Audio CD ~S All electronica DVDs D • e DVDs that are not metal D • (~m) All CDs and DVDs C v D Hip hop CDs except triple disk pkgs. (h • C) • ~3

  14. In the music store... C - CD e - electronica1 - single disk pkg. D - DVD h - hip hop2 - double disk pkg. S - Super Audio CD m - metal3 - triple disk pkg. All CDs C Everything that is not a Super Audio CD ~S All electronica DVDs D & e DVDs that are not metal D & (~m) All CDs and DVDs C v D Hip hop CDs except triple disk pkgs. (h & C) & ~3

  15. In the music store... C - CD e - electronica1 - single disk pkg. D - DVD h - hip hop2 - double disk pkg. S - Super Audio CD m - metal3 - triple disk pkg. All CDs C Everything that is not a Super Audio CD ~S All electronica DVDs D & e DVDs that are not metal D & (~m) All CDs and DVDs C v D Hip hop CDs except triple disk pkgs. (h & C) & ~3

  16. In the music store... C - CD e - electronica1 - single disk pkg. D - DVD h - hip hop2 - double disk pkg. S - Super Audio CD m - metal3 - triple disk pkg. All CDs C Everything that is not a Super Audio CD ~S All electronica DVDs D & e DVDs that are not metal D & (~m) All CDs and DVDs C v D Hip hop CDs except triple disk pkgs. (h & C) & ~3

  17. In the music store... C - CD e - electronica1 - single disk pkg. D - DVD h - hip hop2 - double disk pkg. S - Super Audio CD m - metal3 - triple disk pkg. All CDs C Everything that is not a Super Audio CD ~S All electronica DVDs D & e DVDs that are not metal D & (~m) All CDs and DVDs C v D Hip hop CDs except triple disk pkgs. (h & C) & ~3

  18. In the music store... C - CD e - electronica1 - single disk pkg. D - DVD h - hip hop2 - double disk pkg. S - Super Audio CD m - metal3 - triple disk pkg. All CDs C Everything that is not a Super Audio CD ~S All electronica DVDs D & e DVDs that are not metal D & (~m) All CDs and DVDs C v D Hip hop CDs except triple disk pkgs. (h & C) & ~3

  19. In the music store... C - CD e - electronica1 - single disk pkg. D - DVD h - hip hop2 - double disk pkg. S - Super Audio CD m - metal3 - triple disk pkg. All CDs C Everything that is not a Super Audio CD ~S All electronica DVDs D & e DVDs that are not metal D & (~m) All CDs and DVDs C v D Hip hop CDs except triple disk pkgs. (h & C) & ~3

  20. In the music store... C - CD e - electronica1 - single disk pkg. D - DVD h - hip hop2 - double disk pkg. S - Super Audio CD m - metal3 - triple disk pkg. All CDs C Everything that is not a Super Audio CD ~S All electronica DVDs D & e DVDs that are not metal D & (~m) All CDs and DVDs C v D Hip hop CDs except triple disk pkgs. (h & C) & ~3