AND
The conjunction operation - true only when both inputs are true, equivalent to multiplication in binary arithmetic.
A single valve can block or allow. But real systems need more: "flow only if BOTH valves are open" or "flow if EITHER valve is open." Binary operations let us combine conditions.
Binary Operations
NOT is a unary operation - it takes a single input and produces an output.
Many Boolean operations are binary - they take two inputs and combine them to produce a single output. The most fundamental binary operations are AND and OR.
The AND Operation
The AND operation (also called conjunction) combines two truth values.
It returns true only when both inputs are true. If either input is false (or both are false), AND returns false.
Think of it as a strict requirement: both conditions must be met.
AND Notation
The AND operation is written in several ways:
- $\land$ (wedge/caret) - formal logic notation: P $\land$ Q
- && - programming (C, Java, JavaScript): p && q
- · or juxtaposition - Boolean algebra: P · Q or PQ
- AND - written out: P AND Q
The $\land$ symbol looks like an "A" for AND (without the crossbar).
AND as Multiplication
When we represent True as 1 and False as 0, something remarkable happens: AND behaves exactly like multiplication!
| A | B | A $\times$ B | A AND B |
|---|---|---|---|
| 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 0 | 0 | 0 |
This isn't a coincidence - it's why Boolean algebra uses · (dot) for AND.
Multiplying by 0 always gives 0, just like ANDing with False always gives False.
Evaluating AND
To evaluate AND, remember the rule: AND returns true only when both inputs are true. In all other cases, it returns false.
Symbolic AND Evaluation
When evaluating symbolic expressions like {{leftVar}} $\land$ {{rightVar}}, we substitute the given values and apply the AND rule.
The AND Truth Table
Since AND is a binary operation, its truth table has four rows - one for each combination of two Boolean inputs:
| P | Q | P $\land$ Q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
Notice: only one row produces True - when both inputs are True.
Reading the AND Truth Table
The AND truth table:
| P | Q | P $\land$ Q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
To find the result, locate the row matching your input values.
English to Logic (AND)
In English, AND is expressed in several ways:
- "X and Y"
- "Both X and Y"
- "X as well as Y"
- "X, but also Y"
When you see these patterns, you can translate them to P $\land$ Q.
Logic to English (AND)
We can also translate from logical notation back to English. When you see P $\land$ Q, you can read it as "P and Q" or "both P and Q".
AND with Multiple Operands
AND can be extended to more than two operands. The result is true only if all operands are true:
- P $\land$ Q $\land$ R is true only when P, Q, and R are all true
- If any one operand is false, the entire expression is false
This works because AND is associative: (P $\land$ Q) $\land$ R = P $\land$ (Q $\land$ R).
The grouping doesn't matter, so we can write P $\land$ Q $\land$ R without parentheses.
Short-Circuit Evaluation
When evaluating P $\land$ Q, if P is false, we already know the result must be false - there's no need to evaluate Q. This optimization is called short-circuit evaluation.
In programming, this is useful because:
- It can prevent errors (e.g.,
x != null && x.value) - It can save computation time
The AND operation "short-circuits" on false because false $\land$ anything = false.
AND Combined with NOT
When we combine AND with NOT, interesting patterns emerge:
- P $\land$ $\neg$P is always false (a thing can't be both true and not true)
- $\neg$(P $\land$ Q) can be rewritten using OR (De Morgan's Law - coming later!)
The first pattern, P $\land$ $\neg$P = F, is called the Law of Non-Contradiction.
It's one of the fundamental laws of logic.
Ready to test your understanding?
Bitwit uses spaced repetition to help you truly master concepts like this—not just read about them. Each card generates with different values, so you can't just memorize answers.
Practice AND →