DLD ASSIGNMENT
Name:
Abdul Mueiz
ROLL NO:
33
SUBJECT:
DLD
SUBMITTED TO:
PROFESSOR SHERAZ TOOR
DEPARTMENT:
BS CS
Roll no 33
DLD ASSIGNMENT
TOPICS:
• Fundamentals of Boolean Algebra
• Understanding the Duality Principle
Boolean Algebra
Definition
Boolean algebra is a branch of algebra that deals with logical
values (true and false) and logical operations. It provides a
formal system for manipulating and reasoning about these values.
Basic Operations
AND (Conjunction): The AND operation returns true
only if both operands are true. It's often represented by the
symbol "∧" or a dot "·".
|A|B|A∧B|
|---|---|-------|
|T|T|T|
Roll no 33
DLD ASSIGNMENT
|T|F|F|
|F|T|F|
|F|F|F|
OR (Disjunction): The OR operation returns true if at
least one of the operands is true. It's often represented by the
symbol "∨" or a plus "+".
|A| B |A∨B |
|T|T|T|
|T|F|T
|F|T|T|
|F|F|F
NOT (Negation): The NOT operation reverses the value of
the operand. It's often represented by the symbol "¬" or an
overline.
| A | ¬A |
|T|F|
|F|T|
Boolean Expressions :
Boolean expressions are combinations of variables, constants
(true or false), and logical operations. They represent logical
statements or conditions.
Roll no 33
DLD ASSIGNMENT
• Examples:
o (A ∧ B) ∨ ¬C o
A ∨ (B ∧ C) o
¬A ∧ ¬ B
Fundamental Laws of Boolean Algebra:
Boolean algebra has several important laws that govern how
expressions can be manipulated and simplified. Some key laws
include:
• Commutative Laws: o A ∧B = B ∧A o A ∨B = B
∨
A
• Associative Laws: o (A ∧ B) ∧ C = A ∧ (B ∧ C) o (A
∨
B) ∨ C = A ∨ (B
∨ C)
• Distributive Laws: o A
∧ (B ∨ C) =
(A ∧ B) ∨ (A ∧
C) o A ∨ (B ∧ C)
= (A ∨ B) ∧ (A
Roll no 33
DLD ASSIGNMENT
∨ C)
• Identity Laws: o A
∧ true = A o A ∨
false = A
• Complement
Laws: o A ∧ ¬A =
false o A ∨ ¬A =
true
• De Morgan's Laws: o
¬(A ∧ B) = ¬A ∨
¬B o ¬(A ∨ B) =
¬A ∧ ¬B
Practical Applications of Boolean Alegbra:
Boolean algebra is fundamental to:
• Digital Circuit Design: Logic gates (AND, OR, NOT)
are the building blocks of digital circuits, and their behavior
is described by Boolean algebra.
• Computer Programming: Conditional statements
and logical expressions in programming languages rely on
Boolean logic.
Roll no 33
DLD ASSIGNMENT
• Set Theory: Boolean algebra has connections to set
theory, where true/false can represent membership in a set.
Duality Principle:
The duality principle is a powerful concept in Boolean algebra
that provides a shortcut for deriving new theorems or identities
from existing ones. It essentially states that for any true Boolean
statement, you can create another true statement (its dual) by
systematically interchanging certain operators and constants.
The Mechanics of Duality
To find the dual of a Boolean expression, follow these steps:
Interchange AND and OR operators: Replace all
instances of the AND operator (∧ or ·) with the OR
operator (∨ or +), and vice versa.
Interchange constants: Replace all instances of the
constant true (1) with the constant false (0), and vice versa.
Leave variables unchanged: The variables themselves
remain as they are. Do not complement them. Examples
[Link] Example: o Original statement: A ∨ (B ∧
C) = (A ∨ B) ∧
Roll no 33
DLD ASSIGNMENT
(A ∨ C) (Distributive Law) o Dual
statement: A ∧ (B ∨ C) = (A ∧ B) ∨
(A ∧ C)
[Link] Example:
o Original statement: A ∧ true = A (Identity Law) o
Dual statement: A ∨ false = A
[Link] Morgan's Law:
o Original statement: ¬(A ∧ B) = ¬A ∨ ¬B o Dual
statement: ¬(A ∨ B) = ¬A ∧ ¬B Why Does
Duality Work?
The duality principle is based on the inherent symmetry in the
axioms and postulates of Boolean algebra. The operations of
AND and OR, as well as the constants true and false, are duals of
each other. This symmetry allows us to "flip" the roles of these
elements without affecting the overall validity of the logical
statements.
Importance and Applications
• Deriving New Theorems: Duality provides a
convenient way to generate new theorems from existing
ones without having to prove them from scratch. If you
prove a statement, you automatically know its dual is also
true.
Roll no 33
DLD ASSIGNMENT
• Simplifying Expressions: Sometimes, finding the dual
of an expression can lead to a simpler or more easily
manipulated form.
• Circuit Design: Duality can be useful in simplifying and
optimizing digital circuit designs.
THE END
Roll no 33