In mathematics, Boolean algebra is an algebra for binary digits (where 0 means false and 1 means true).
It is equipped with three operators: conjunction (AND), disjunction (OR) and negation (NOT). It uses normal math symbols, but it does not work in the same way. It is named for George Boole, who invented it in the middle 19th century. Boolean algebra did not get much attention except from mathematicians until the 20th century when engineers began using it for logic gates.
NOT | |
---|---|
0 | 1 |
1 | 0 |
The NOT operator is written with a bar over numbers or letters like this:
It means that the output is not the input.
AND | 0 | 1 |
---|---|---|
0 | 0 | 0 |
1 | 0 | 1 |
The AND operator is written as like this:
The output is true if and only if one and the other input is true.
OR | 0 | 1 |
---|---|---|
0 | 0 | 1 |
1 | 1 | 1 |
The OR operator is written as like this:
If one or the other input is true, then the output to be true (and false otherwise).
XOR | 0 | 1 |
---|---|---|
0 | 0 | 1 |
1 | 1 | 0 |
XOR basically means "exclusive or", meaning one input or the other must be true, but not both. It is also sometimes called NOR, which means the same thing.
The XOR operator is written as like this:
In other words, the XOR operator returns true precisely when one or the other input is true—but not both.
Different gates can be put together in different orders:
It is not the same as a NOT then an AND:
which is called AND identity table
AND | 1 | 0 | Any |
---|---|---|---|
1 | TRUE | 0 | 0 |
0 | 0 | 0 | |
Any | 0 |
, if .[source?]
or if =TRUE, TRUE.,
Augustus De Morgan discovered that it is possible to preserve the truth values of Boolean expressions by changing a sign to a sign, while making or breaking a bar. That is:
These findings are commonly known as De Morgan's laws.
This article uses material from the Wikipedia Simple English article Boolean algebra, which is released under the Creative Commons Attribution-ShareAlike 3.0 license ("CC BY-SA 3.0"); additional terms may apply (view authors). Content is available under CC BY-SA 4.0 unless otherwise noted. Images, videos and audio are available under their respective licenses.
®Wikipedia is a registered trademark of the Wiki Foundation, Inc. Wiki Simple English (DUHOCTRUNGQUOC.VN) is an independent company and has no affiliation with Wiki Foundation.