1. Gyanastra
  2. Digital Logic
  3. Boolean Algebra and Logic Gates
  4. Boolean Variables and Basic Operators (AND, OR, NOT)
Free lesson, no account needed 5 min read 11 practice questions after it
Asked in past papers13 times
  • GATE CSE20172005200219981997
  • ISRO202320112008
  • UGC NET20232022202020172013

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.
Logic circuit: Boolean Variables and Basic Operators (AND, OR, NOT)
Figure. Boolean Variables and Basic Operators (AND, OR, NOT)

How it works

  1. AND: output 1 only for the input combination 1, 1; all other combinations give 0.
  2. OR: output 0 only for the input combination 0, 0; all other combinations give 1.
  3. NOT: a single input is flipped — 0 becomes 1 and 1 becomes 0.
  4. 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

  • 0 AND 0=00 \text{ AND } 0 = 0
  • 0 AND 1=00 \text{ AND } 1 = 0
  • 1 AND 0=01 \text{ AND } 0 = 0
  • 1 AND 1=11 \text{ AND } 1 = 1
  • 0 OR 0=00 \text{ OR } 0 = 0
  • 0 OR 1=10 \text{ OR } 1 = 1
  • 1 OR 0=11 \text{ OR } 0 = 1
  • 1 OR 1=11 \text{ OR } 1 = 1
  • NOT 0=1\text{NOT } 0 = 1
  • NOT 1=0\text{NOT } 1 = 0

Worked examples

Truth tables for the three operators.

AND

ABA AND B
000
010
100
111

OR

ABA OR B
000
011
101
111

NOT

ANOT A
01
10

Comparison

OperatorOutput is 1 whenOutput is 0 whenAnalogy
ANDboth inputs are 1any input is 0intersection
ORany input is 1both inputs are 0union
NOTinput is 0input 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 2n2^{n} 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
Pages 1–2 of 2