1 / 17

Boolean Algebra

Boolean Algebra. && how we might use it in spreadsheets. Belinda Kerchmar 2.24.11. Boolean Logic. Invented by George Boole Boolean logic is the basis for modern computer logic. Quick Review: Variables. Where are variables in excel held?

danarthur
Download Presentation

Boolean Algebra

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Boolean Algebra && how we might use it in spreadsheets Belinda Kerchmar 2.24.11

  2. Boolean Logic • Invented by George Boole • Boolean logic is the basis for modern computer logic.

  3. Quick Review: Variables • Where are variables in excel held? • What types of variables can we have? (In other words, what can be held in a cell?)

  4. What is a Boolean Variable? • A variable (cell) that holds either true or false • In excel, can also be seen as 1 or 0 • Can be thought of conceptually as yes or no

  5. Boolean Operations • In Math, there are operations: plus, minus, times, etc. • In Boolean Algebra, there are operations as well. • Boolean Operations: • AND • OR • NOT

  6. Boolean Logic • Boolean logic Basics: • AND • OR • NOT

  7. Intuitive vs. Excel • Over the course of the lecture, I’ll use a syntax like this: a AND b AND c • The same expression in excel would look like: AND(a,b,c)

  8. AND • If every boolean being “and-ed” is true, then the AND operator returns true. • true AND true AND true = true • true AND false AND true = false

  9. AND • In excel: AND (some list of arguments) • If everything in list of arguments is true, then AND returns true. Otherwise, AND returns false. • Did all students pass the course?

  10. OR • If some boolean being “or-ed” is true, then the OR operator returns true • false OR false OR false = false • false OR false OR true = true

  11. OR • In excel: OR(some list of arguments) • If at least one of the list of arguments is true, then OR returns true. • Did at least one student pass?

  12. NOT • NOT(one argument) • If p is true, then NOT p is false. • If p is false, then NOT p is true.

  13. NOT • NOT (circles) • blue & white • NOT(diagrams) • yellow & white • NOT(circles OR diagrams) • white • NOT(circles AND diagrams) • yellow, blue, white • Did neither student pass the course?

  14. Properties • Just as in Math, the operations in Boolean Algebra follow certain properties.

  15. Properties you’ve seen before…

  16. De Morgan’s Laws • NOT (P AND Q) = • (NOT P) OR (NOT Q) • NOT (P OR Q) = • (NOT P) AND (NOT Q)

  17. On your own (or in groups) • Download Spreadsheet from course website • Write formulas to determine the following information for each item: • Is it tasty and healthy? • Is it dinner, but not tasty? • Is it dinner, and healthy or tasty? • Is it healthy, but not tasty or a snack?

More Related