To determine if a statement is True or False, computers use Boolean opearators. There are four main Boolean operators: AND, NOT, OR, and XOR. These logical operators are used together in complex ways to determine if a particular condition is True or False.
Examples: x AND y returns the value True if the condition is true for both x and y or else it returns False NOT x returns the value True if x is false (or null) and False if x is true x OR y returns the value True if either or both x and y are true. It only returns false if both x and y are False for the given condition x XOR y returns the value True only if either x or y are true. If both x and y are true then it will return the value False.
Using Boolean operators is not restricted to computer programming. End-users also use Boolean expressions when they need to filter results in a search engine window. For example, the Boolean expression “computers AND hardware NOT memory” when used in a search engine will return all pages containing the words “computers” and “hardware” while excluding all pages containing the word “memory”.