Glossaria.net

Glossary Visual Basic / Term

Boolean

Boolean variables are stored as 16-bit (2-byte) numbers, but they can only be True or False. Boolean variables display as either True or False (when Print is used) or #TRUE# or #FALSE# (when Write # is used). Use the keywords True and False to assign one of the two states to Boolean variables.

When other numeric types are converted to Boolean values, 0 becomes False and all other values become True. When Boolean values are converted to other data types, False becomes 0 and True becomes -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 is a Boolean expression because the result is TRUE. All expressions that contain relational operators , such as the less than sign ( "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

Permanent link Boolean - Creation date 2020-06-07


< bookmark Glossary / Visual Basic boolean data >