Boolean operators are used in programming. It would be hard for me to explain exactly how they are used in programming without giving you a programming course, but I can tell you basically what they do. The main boolean operators are AND, OR, NOT, and XOR (exclusive or). So:
* (true AND true) makes true
* (true AND false) makes false
* (false AND true) makes false
* (false AND false) makes false
* (true OR true) makes true
* (true OR false) makes true
* (false OR true) makes true
* (false OR false) makes false
* (NOT true) make false
* (NOT false) makes true
XOR is the same as OR except that it only allows one or the other to be true; not both:
* '''(true XOR true) makes false'''
* (true OR false) makes true
* (false OR true) makes true
* (false OR false) makes false
Boolean operators can be mixed together like this:
NOT (true XOR (false AND true)) makes false
In programming, you often use symbols to represent these instead of writing out the words. OR is ||, not is !, and AND is &&.
Answered by
Nz
, an ibibo Master,
at
5:55 PM on January 09, 2008