Digital Logic · Boolean Algebra and Logic Gates
Boolean Variables and Basic Operators (AND, OR, NOT)
Overview
Boolean (switching) algebra is a two-valued algebra in which every variable is either 0 or 1, standing for false and true.
It is built from three basic operators — OR, AND, NOT — whose behaviour is fully captured by truth tables, which are also the standard tool for proving any Boolean equation true.
Key concepts
- Boolean / switching algebra: an algebra that works with only two values, 0 and 1.
- Value meaning: 0 means false, 1 means true, so the two values map directly onto true/false logic.
- Boolean variable: the basic element of switching algebra; it can take only the value 0 or 1.
- Three basic operators: OR, AND, NOT.
- AND: the output is 1 only when both inputs are 1; otherwise it is 0.
- OR: the output is 1 if any input is 1; it is 0 only when both inputs are 0.
- NOT: inverts the value.
- Names of NOT: complement, prime, and not all mean the same operation.
- Analogy: OR is similar to union and AND is similar to intersection, but the fixed names used are OR, AND, NOT.

How it works
- AND: output 1 only for the input combination 1, 1; all other combinations give 0.
- OR: output 0 only for the input combination 0, 0; all other combinations give 1.
- NOT: a single input is flipped — 0 becomes 1 and 1 becomes 0.
- To check whether any Boolean equation is true, build the truth table and compare the left-hand side and right-hand side for every input combination.
Formulas
Worked examples
Truth tables for the three operators.
AND
| A | B | A AND B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR
| A | B | A OR B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NOT
| A | NOT A |
|---|---|
| 0 | 1 |
| 1 | 0 |
Comparison
| Operator | Output is 1 when | Output is 0 when | Analogy |
|---|---|---|---|
| AND | both inputs are 1 | any input is 0 | intersection |
| OR | any input is 1 | both inputs are 0 | union |
| NOT | input is 0 | input is 1 | — (inverts the value) |
Revision summary
- Only two values exist: 0 (false) and 1 (true).
- A Boolean variable takes only 0 or 1 — never any other value.
- The three basic operators are OR, AND, NOT.
- NOT = complement = prime: same operation, different names.
- AND behaves like intersection and OR like union — this is an analogy only; the fixed names are OR, AND, NOT.
- To verify any Boolean equation, build the truth table and compare LHS and RHS for every input combination.
Previous-year exam insights
- XOR (exclusive-OR) gives 1 when the inputs differ and 0 when they are equal; XNOR is its complement.
XOR is associative and commutative, so XORing a bit with the same operand an even number of times returns the original bit, and an odd number of times gives the same result as XORing once (with 1 this complements the bit).
Asked inGATE 1998ISRO 2011UGC NET 2023 - Basic Boolean identities: A+0=A, A·1=A, A+1=1, A·0=0, A+A=A, A·A=A, A+A'=1, A·A'=0, (A')'=A. De Morgan's laws: (A+B)' = A'·B' and (A·B)' = A' + B'.
Asked inGATE 2002UGC NET 2022 - Distributive, commutative and associative laws hold for AND and OR: A·(B+C)=A·B+A·C and A+(B·C)=(A+B)·(A+C).
Implication p→q is equivalent to p'+q and to q'→p' (contrapositive).
Asked inUGC NET 2022UGC NET 2020 - A Boolean function of n variables can be represented by a truth table with rows; two functions are equal iff their truth tables (or canonical minterm/maxterm sets) are identical.
For Boolean functions F and G, F ≤ F+G and F·G ≤ F (and F·G ≤ G).
Asked inUGC NET 2013 - A newly defined Boolean operator must be evaluated from its given truth table; to test an identity involving it, substitute all input combinations (or use the table to derive its equivalent expression in AND/OR/NOT).
Asked inGATE 1997UGC NET 2013 - Boolean matrix product: for matrices A (m×n) and B (n×p), (A⊙B)ij = OR over k of (Aik AND Bkj);
entries are 0/1 and multiplication is AND, addition is OR.
Asked inUGC NET 2017