2.2 Logic Function and Boolean Algebra
2.2.1 Introduction to Boolean Algebra
Boolean algebra is a branch of mathematics used to analyse
and design digital circuits and logic systems. It was introduced by George
Boole.
It works with only two values: 0 and 1.
- 0
represents FALSE / OFF
- 1
represents TRUE / ON
Boolean algebra is mainly used in computers, digital
electronics, and communication systems to represent and simplify logical
operations.
2.2.2 Introduction to Boolean Values, Truth Table,
Boolean Expression and Boolean Function
a) Boolean Values:
Boolean values are the possible values used in Boolean
algebra.
Ø 0
(False)
Ø 1
(True)
These values represent the two states of digital signals.
b) Truth Table:
A truth table shows all possible input combinations and
their corresponding outputs of a logic operation or Boolean expression.
c) Boolean Expression:
A Boolean expression is a mathematical expression formed
using:
- Boolean
variables (A, B, C, …)
- Boolean
operators (AND, OR, NOT)
Examples: ,
,
, etc.
Boolean expressions are used to represent logic circuits.
d) Boolean Function:
A Boolean function is a function that maps Boolean inputs to
a Boolean output using a Boolean expression.
Example:
Here, Y is a Boolean function depending on inputs A, B, and
C.
2.2.3 Logic Gates
Logic Gates are defined as digital circuits that operates on
one or more digital inputs and produces an one output signal. Logic gates are
called digital circuits because the input and output signals are either lower
voltage(0) or high voltage(1). Logic Gates can be divided into two types:
Basic Gates: Basic gates are defined as gates very
basic and are not complicated. These are of three types
1) AND
gate
2) OR
Gate
3) NOT
Gate
Derived Gates: Derived Gates are those gets which are made of combination of basic Gates. These are of four types:
4) NAND Gate
5) NOR
Gate
6) XOR
Gate
7) XNOR Gate
1. AND Gate
Definition:
The AND gate gives output 1 only when all inputs are 1.
Logic Function:
Truth Table:
|
A |
B |
Y |
|
0 |
0 |
0 |
|
0 |
1 |
0 |
|
1 |
0 |
0 |
|
1 |
1 |
1 |
Logic Symbol:
2. OR Gate
Definition:
The OR gate gives output 1 if any one of the inputs is 1.
Logic Function:
Truth Table:
|
A |
B |
Y |
|
0 |
0 |
0 |
|
0 |
1 |
1 |
|
1 |
0 |
1 |
|
1 |
1 |
1 |
Logic Symbol:
3. NOT Gate
Definition:
The NOT gate inverts the input (complement).
Logic Function:
Truth Table:
|
A |
Y |
|
0 |
1 |
|
1 |
0 |
Logic Symbol:
4. NAND Gate
Definition:
The NAND gate is the inverse of AND gate.
Logic Function:
Truth Table:
|
A |
B |
Y |
|
0 |
0 |
1 |
|
0 |
1 |
1 |
|
1 |
0 |
1 |
|
1 |
1 |
0 |
Logic Symbol:
5. NOR Gate
Definition:
The NOR gate is the inverse of OR gate.
Logic Function:
Truth Table:
|
A |
B |
Y |
|
0 |
0 |
1 |
|
0 |
1 |
0 |
|
1 |
0 |
0 |
|
1 |
1 |
0 |
Logic Symbol:
6. XOR Gate (Exclusive OR)
Definition:
The XOR gate gives output 1 when inputs are different.
Logic Function:
Truth Table:
|
A |
B |
Y |
|
0 |
0 |
0 |
|
0 |
1 |
1 |
|
1 |
0 |
1 |
|
1 |
1 |
0 |
Logic Symbol:
7. XNOR Gate (Exclusive NOR)
Definition:
The XNOR gate gives output 1 when inputs are the same.
Logic Function:
Truth Table:
|
A |
B |
Y |
|
0 |
0 |
1 |
|
0 |
1 |
0 |
|
1 |
0 |
0 |
|
1 |
1 |
1 |
Logic Symbol:
Exam Tip:
Ø NAND
and NOR are called Universal Gates.
Ø XOR
→ different inputs
Ø XNOR
→ same inputs
2.2.4 Laws of Boolean Algebra
The laws of Boolean algebra are rules used to simplify
Boolean expressions and design efficient digital circuits.
1) Boolean Identities (Basic Laws):
These laws describe basic relationships between Boolean
variables.
|
Law |
Expression |
|
Idempotent Law |
|
|
Null (Dominance) Law |
|
|
Involution Law |
|
|
Absorption Law |
|
2) Complement Laws:
A variable combined with its complement gives fixed output.
|
Expression |
Result |
|
|
1 |
|
|
0 |
|
|
1 |
|
|
0 |
3) Identity Laws:
These laws show how values behave with 0 and 1.
|
Expression |
Result |
|
|
A |
|
|
A |
4) Commutative Laws:
Order of variables does not change the result.
|
Operation |
Law |
|
OR |
|
|
AND |
|
5) Associative Laws:
Grouping of variables does not change the result.
|
Operation |
Law |
|
OR |
|
|
AND |
|
6) Distributive Laws:
One operation distributes over another.
|
Law |
|
|
|
|
De Morgan’s Theorems
De Morgan’s theorems are important laws of Boolean algebra
used to simplify Boolean expressions and convert AND operations into OR (and
vice-versa) with complementation.
1) De Morgan’s First Theorem:
Statement:
Meaning:
The complement of OR is equal to the AND of the complements.
Verification using Truth Table:
|
A |
B |
A + B |
|
|
|
|
|
0 |
0 |
0 |
1 |
1 |
1 |
1 |
|
0 |
1 |
1 |
0 |
1 |
0 |
0 |
|
1 |
0 |
1 |
0 |
0 |
1 |
0 |
|
1 |
1 |
1 |
0 |
0 |
0 |
0 |
✅ LHS = RHS, hence verified.
2) De Morgan’s Second Theorem:
Statement:
Meaning:
The complement of AND is equal to the OR of the complements.
Verification using Truth Table:
|
A |
B |
A · B |
|
|
|
|
|
0 |
0 |
0 |
1 |
1 |
1 |
1 |
|
0 |
1 |
0 |
1 |
1 |
0 |
1 |
|
1 |
0 |
0 |
1 |
0 |
1 |
1 |
|
1 |
1 |
1 |
0 |
0 |
0 |
0 |
✅ LHS = RHS, hence verified.