Like arithmetic expressions, Boolean expressions are generally formed from "triplets" (in the case of AND and OR) of operands and operators, or "diadics" (in the case of NOT), where each simple expression can be used as the operand for a larger expression:
(Top to bottom)
We can use parentheses to force the early evaluation of sub-expressions.
is equivalent to:
((A AND B) OR ((NOT C) AND D))
DIFFERING NOTATIONS EXAMPLES USING PROGRAMMING NOTATION
EXAMPLES USING BOOLEAN NOTATION
In general computer memory contains "fields" or "words" that are more than one bit in length. So we can contain several "truth values" in one field/word and perform similar operations on all the bits (Truth values) at one time. Thi is useful if an object being represented in a variable has several T/F properties.
Consider a word or 8-bits. It can contain 8 truth values. So two words of truth values can be "ANDed", "ORed" or "NOTted" in one operation. Using this representation we can also perform normal (binary) arithmetic using logical operations that are simpler for the computer to execute.
Last updated 2000/02/10
© J.A.N. Lee, 2000.