Boolean logic and notation
A Boolean value has only two states: True or False, written 1 or 0. Logical operations take Boolean inputs and give a Boolean output.
| Operation | Written | Also written | Output is 1 when… |
|---|---|---|---|
| NOT | A̅ (a bar over A) | ¬A, NOT A | A is 0 |
| AND | A . B | A ∧ B, A AND B | both A and B are 1 |
| OR | A + B | A ∨ B, A OR B | A or B or both are 1 |
| XOR (exclusive OR) | A ⊕ B | A XOR B | A and B are different |
On paper, NOT over a whole expression is a bar over the whole of it. On this site that is written NOT(A + B).
Order of operations: brackets first, then NOT, then AND, then OR. So A + B . C means A + (B . C), just as 2 + 3 × 4 means 2 + (3 × 4).
Logic gates in a circuit do the same operations on electrical signals: high voltage is 1, low voltage is 0.