Understanding logical operations, Boolean algebra, and their applications in computing.
true
if both operands are true
.A ∧ B
or A & B
A | B | A ∧ B |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
true
if at least one operand is true
.A ∨ B
or A | B
A | B | A ∨ B |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
¬A
or !A
A | ¬A |
---|---|
0 | 1 |
1 | 0 |
true
if exactly one operand is true
.A ⊕ B
A | B | A ⊕ B |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
A ⊼ B
A | B | A ⊼ B |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
A ⊽ B
A | B | A ⊽ B |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
1
only if both inputs are 1
.1
if at least one input is 1
.1
if inputs are different.0
only if both inputs are 1
.1
only if both inputs are 0
.