Boolean expression: Difference between revisions

Content deleted Content added
added some more truth to it
m Reverting possible vandalism by 62.49.24.124 to version by Solomon7968. Report False Positive? Thanks, ClueBot NG. (2344330) (Bot)
Line 1:
In [[computer science]], a '''Boolean expression''' is an [[Expression (programming)|expression]] in a [[o==Examples==programming language]] that produces a [[Boolean value]] when evaluated, i.e. one of '''true''' or '''false'''. A Boolean expression may be composed of a combination of the Boolean constants '''true''' or '''false''', [[Boolean data type|Boolean-typed]] variables, Boolean-valued operators, and [[Boolean-valued function]]s.<ref>{{citation
| last1 = Gries | first1 = David | author1-link = David Gries
| last2 = Schneider | first2 = Fred B. | author2-link = Fred B. Schneider
| contribution = Chapter 2. Boolean Expressions
| isbn = 9780387941158
| page = 25ff
| publisher = Springer
| series = Monographs in Computer Science
| title = A Logical Approach to Discrete Math
| url = http://books.google.com/books?id=ZWTDQ6H6gsUC&pg=PA25
| year = 1993}}.</ref>
 
Boolean expressions correspond to [[propositional formula]]s in logic and are a special case of [[Boolean circuit]]s.<ref>{{citation
| last = van Melkebeek | first = Dieter
| isbn = 9783540414926
| page = 22
| publisher = Springer
| series = [[Lecture Notes in Computer Science]]
| title = Randomness and Completeness in Computational Complexity
| url = http://books.google.com/books?id=-S0zCjOAIVwC&pg=PA22
| volume = 1950
| year = 2000}}.</ref>
 
==Boolean operators==
Most [[programming language]]s have the Boolean operators [[Logical disjunction|OR]], [[Logical conjunction|AND]] and [[Negation|''not'']]; in [[C (programming language)|C]] and some newer languages, these are represented by "||" (double pipe character), "&&" (double ampersand) and "!" (exclamation point) respectively, while the corresponding [[bitwise operation]]s are represented by "|", "&" and "~" (tilde).<ref>E.g. for [[Java (programming language)|Java]] see {{citation
| last1 = Brogden | first1 = William B.
| last2 = Green | first2 = Marcus
| isbn = 9780789728616
| page = 45
| publisher = Que Publishing
| title = Java 2 Programmer
| url = http://books.google.com/books?id=24nPZw9Wsf4C&pg=PA45
| year = 2003}}.</ref> In the mathematical literature the symbols used are often "+" (plus), "'''·'''" (dot) and [[overbar]], or "∨" (cup), "∧" (cap) and "¬" or "′" (prime).
 
==Examples==
 
*The expression "5 > 3" is evaluated as '''true'''.
 
*"5>=3" and "3<=5" are equivalent Boolean expressions, both of which are evaluated as '''true'''.
ERROR 404 ILLUMINATI CONFIRMED
 
*Of course, most Boolean expressions will contain at least one variable (X > 3), and often more (X > Y).
 
==See also==
*[[Expression (programming)]]
*[[Expression (mathematics)]]
 
==References==
{{reflist}}
==External links==
*[http://www.maths.tcd.ie/pub/HistMath/People/Boole/CalcLogic/CalcLogic.html The Calculus of Logic], by George Boole, Cambridge and Dublin Mathematical Journal Vol. III (1848), pp.&nbsp;183–98.
 
{{DEFAULTSORT:Boolean Expression}}
[[Category:Boolean algebra]]
[[Category:Operators (programming)]]