Logic gates are the fundamental building blocks of digital circuits. Each gate performs a logical operation based on Boolean algebra.
Gate Name
Symbol
Expression
Truth Table
OR Gate
++
A+BA + B
0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, 1 + 1 = 1
AND Gate
â‹…\cdot
Aâ‹…BA \cdot B
0 â‹… 0 = 0, 0 â‹… 1 = 0, 1 â‹… 0 = 0, 1 â‹… 1 = 1
NOT Gate
A‾\overline{A}
Inverts input
0 → 1, 1 → 0
Gate Name
Symbol
Expression
Truth Table
NOR Gate
A+B‾\overline{A + B}
Inverse of OR
0 0 → 1, 0 1 → 0, 1 0 → 0, 1 1 → 0
NAND Gate
A⋅B‾\overline{A \cdot B}
Inverse of AND
0 0 → 1, 0 1 → 1, 1 0 → 1, 1 1 → 0
NOR and NAND are universal gates since they can form any logic circuit.
Gate Name
Symbol
Expression
Truth Table
XOR (Exclusive OR)
A⊕BA \oplus B
AB‾+A‾BA \overline{B} + \overline{A} B
0 0 → 0, 0 1 → 1, 1 0 → 1, 1 1 → 0
XNOR (Exclusive NOR)
A⊕B‾\overline{A \oplus B}
AB+A‾B‾A B + \overline{A} \overline{B}
0 0 → 1, 0 1 → 0, 1 0 → 0, 1 1 → 1
These help simplify Boolean expressions.
First Law:
A+B‾=A‾⋅B‾\overline{A + B} = \overline{A} \cdot \overline{B}
(NOR is the same as AND with inverted inputs.)
Second Law:
A⋅B‾=A‾+B‾\overline{A \cdot B} = \overline{A} + \overline{B}
(NAND is the same as OR with inverted inputs.)
Law Name
Expression
Identity Law
A+0=AA + 0 = A, Aâ‹…1=AA \cdot 1 = A
Null Law
A+1=1A + 1 = 1, Aâ‹…0=0A \cdot 0 = 0
Idempotent Law
A+A=AA + A = A, Aâ‹…A=AA \cdot A = A
Complement Law
A+A‾=1A + \overline{A} = 1, A⋅A‾=0A \cdot \overline{A} = 0
Distributive Law
A(B+C)=AB+ACA(B + C) = AB + AC
(i) Sum of Products (SOP) Form
A function is expressed as a sum (OR) of product (AND) terms.
Example:
F(A,B,C)=A‾BC+AB‾C+ABCF(A, B, C) = \overline{A}BC + A\overline{B}C + ABC
(ii) Product of Sums (POS) Form
A function is expressed as a product (AND) of sum (OR) terms.
Example:
F(A,B,C)=(A+B)(A‾+C)F(A, B, C) = (A + B)(\overline{A} + C)
A K-Map is a graphical way to simplify Boolean expressions by minimizing the number of terms.
2-Variable K-Map:
AB
0
1
0
f(0,0)
f(0,1)
1
f(1,0)
f(1,1)
3-Variable K-Map:
AB\C
0
1
00
f(0,0,0)
f(0,0,1)
01
f(0,1,0)
f(0,1,1)
10
f(1,0,0)
f(1,0,1)
11
f(1,1,0)
f(1,1,1)
Using K-Maps, we group 1s in the map to find a simplified expression.
Given truth table:
A
B
F(A, B)
0
0
0
0
1
1
1
0
1
1
1
1
Plotting in a 2-variable K-map:
A/B
0
1
0
0
1
1
1
1
The simplified function is:
F(A,B)=A+BF(A, B) = A + B
This covers logic gates, Boolean algebra, De Morgan’s laws, SOP, POS, and K-Maps. Let me know if you need detailed examples! 😊
BCA-201 Mathematics IIÂ
BCA-201 Mathematics II
Unit – I Sets   Sets, Subsets, Equal Sets Universal Sets, Finite and Infinite Sets, Operation on Sets, Union, Intersection and Complements of Sets, Cartesian Product, Cardinality of Set, Simple ApplicationsÂ1. Sets, Subsets, and Equal Sets
Sets:
A = {red, blue, green} (A set of colors)
B = {1, 2, 3, 4, 5} (A set of numbers)
C = {apple, banana, orange} (A set of fruits)
Subsets:
D = {red, green} is a subset of A because every element in D is also in A. We write this as D ⊆ A.
E = {2, 4} is a subset of B. We write this as E ⊆ B.
F = {apple} is a subset of C. We write this as F ⊆ C.
Equal Sets:
G = {blue, green, red} is equal to A because they contain the same elements, even though the order is different. We write this as G = A.
H = {1, 3, 5, 2, 4} is equal to B. We write this as H = B.
2. Universal Set
Suppose we're discussing the numbers 1 through 10. Then our universal set (let's call it U) could be: U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
If A = {2, 4, 6, 8, 10} (the even numbers in U), then the complement of A (A') would be the odd numbers in U.
3. Finite and Infinite Sets
Finite:
The set of days in a week: {Monday, Tuesday, ..., Sunday}
The set of letters in the English alphabet: {a, b, c, ..., z}
Infinite:
The set of all integers: {..., -3, -2, -1, 0, 1, 2, 3, ...}
The set of all real numbers between 0 and 1 (inclusive).
4. Operations on Sets
Union (∪):
A = {1, 2, 3}
B = {3, 4, 5}
A ∪ B = {1, 2, 3, 4, 5} (We include the 3 only once, even though it's in both sets)
Intersection (∩):
A = {1, 2, 3}
B = {3, 4, 5}
A ∩ B = {3} (Only the element 3 is in both A and B)
Complement (A' or Aᶜ):
U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} (Universal set)
A = {2, 4, 6, 8, 10}
A' = {1, 3, 5, 7, 9} (All elements in U that are not in A)
Cartesian Product (×):
A = {a, b}
B = {1, 2}
A × B = {(a, 1), (a, 2), (b, 1), (b, 2)}
5. Cardinality
A = {red, blue, green}
|A| = 3 (The cardinality of A is 3)
B = {1, 2, 3, 4, 5}
|B| = 5 (The cardinality of B is 5)
I hope these examples make the concepts clearer! Let me know if you have any other questions.