User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

dictionary:boolean [2007/11/17 18:33] (current)
Line 1: Line 1:
 +Boolean logic, Boolean expressions and Boolean operators are key components in a mathematical syntax. The processes and logic associated with it are named after the nineteenth century mathematician George Boole. Boolean logic is a form of algebra in which all values are reduced to either TRUE or FALSE. Boolean logic is especially important for computer science because it fits nicely with the binary numbering system, in which each bit has a value of either 1 or 0. Another way of looking at it is that each bit has a value of either TRUE or FALSE, corresponding to 1 or 0. An expression that results in a value of either TRUE or FALSE. For example, the expression: 2 < 5 (2 is less than 5)
 +is a Boolean expression because the result is TRUE. All expressions that contain relational operators , such as the less than sign (<), are Boolean. The operators, AND, OR, XOR, NOT, NAND and NOR, are all Boolean operators. They are the four often used Boolean operators and two combination operators that can be used to manipulate TRUE/FALSE values. These operators have the following meanings, where x and y represent values of TRUE or FALSE. The OR operator is often called an inclusive OR, whereas XOR is an exclusive OR. Boolean operators are used widely in programming and also in forming database queries. For example, the query: “SELECT ALL WHERE LAST_NAME = “Smith” AND FIRST_NAME = “John”” finds all records with the name John Smith. But the query “SELECT ALL WHERE LAST_NAME = “Smith” OR FIRST_NAME = “John”” finds all records with the last name “Smith” or the first name “John.” Boolean Operators
 +x AND y: Result is TRUE if both x and y are TRUE. Otherwise the result is FALSE. x OR y: Result is TRUE if either x or y is TRUE. Otherwise the result is FALSE. x XOR y: Result is TRUE only if x and y have different values. Otherwise the result is FALSE. NOT: x Result is TRUE if x is FALSE. Result is FALSE if x is TRUE. Sometimes considered but less often used: NOR: is the combination of OR, followed by NOT NAND: is the combination of AND followed by NOT 
dictionary/boolean.txt · Last modified: 2007/11/17 18:33 (external edit)