Recent Blog Posts
Other Content
Boolean Operator Truth Tables
There are actually 16 boolean operators, but some of them are not at
all interesting and most of them do not have names. I listed all the ones I
could think of names for. and, or, nand and xor are by far the ones most
commonly used. xor and friends are sometimes known as eor. Both the x and the
e stand for exclusive.
and
Notation:
a | b | a and b |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
xnor
a | b | a xnor b |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
xor
Notation:
a | b | a xor b |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
nand
a | b | a nand b |
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
imp
a | b | a imp b |
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 0 |
1 | 1 | 1 |
or
Notation:
a | b | a or b |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
nor
a | b | a nor b |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |