Boolean Logic and Logic Gates
The three basic gates
| Gate | Symbol notation | Output is 1 when… |
|---|---|---|
| AND | A · B | both inputs are 1 |
| OR | A + B | either input is 1 |
| NOT | ¬A | the input is 0 (it inverts) |
Truth tables
A B | AND OR
0 0 | 0 0
0 1 | 0 1
1 0 | 0 1
1 1 | 1 1
A | NOT A
0 | 1
1 | 0
Combining gates
Q = A AND (NOT B) — build the table column by column:
A B | NOT B | A AND NOT B
0 0 | 1 | 0
0 1 | 0 | 0
1 0 | 1 | 1
1 1 | 0 | 0
Exam tip
Build truth tables one column at a time, working from the innermost brackets outwards. AND needs both 1; OR needs at least one 1; NOT flips the value.