The operators can be expressed in symbols as well as in words. These symbols are also known as “logical operators” and are mainly used in programming languages. For example:
- & or && mean AND
- | or || mean OR
- ! or ~ mean NOT
Placing the AND operator between two conditions means that both conditions must be met in order for the result to be “true”.
With the OR operator, only one condition has to be met for the result to be “true”.
When NOT is used, all the conditions except the excluded ones must be true.
Search engines like Google use these Boolean operators as follows:
- AND: A space between two terms is interpreted as “AND”.
- OR: Both the word “OR” and the pipe symbol ( | ) act as the OR operator. The Windows keyboard shortcut for the pipe symbol is ALT + [0] [1] [2] [4] (on the number pad). In MacOS it is [ALT] + [7].
- NOT: Putting a minus sign before a word (with no space) excludes the word from the search. Be careful not to accidentally type a dash instead of the minus sign, as this will give completely different search results.