Venn Diagrams for Boolean Logic

Contents

OR operator
AND operator
NOT operator
Using Parentheses to Express Correct Search Logic

OR Operator

OR - Any one of the terms are present (more than one term may be present).

fruit OR vegetables

fruit OR vegetables OR cereal

 

OR - is often used to broaden a search by linking together a number of synonyms.
cars or automobiles / marijuana or pot or cannabis
/ euthanasia or assisted suicide 

 


AND Operator


AND - All terms are present. AND is the best way to narrow down your search by  limiting your results to only those resources (articles or books) which deal with your chosen words.

rivers AND salinity

dairy products AND export AND europe


NOT Operator


NOT - The first term but not the second is present.

fruit NOT apples


Using Parentheses to Express Correct Search Logic


Order of precedence of Boolean operators is: AND, NOT, OR. That is, an AND operation will be performed before an OR operation if both operations are included in a query, unless parentheses are used to override priority of search operators. Expressions in parentheses are processed first.

(foxes OR rabbits) AND pest control

The statement in parentheses - 'foxes OR rabbits' - is processed first.

If parentheses were omitted:

foxes OR rabbits AND pest control

The AND operation - 'rabbits AND pest control' - is processed first.

 

College Home | Library Home | Online Catalog