discrete module 1
discrete module 1
discrete module 1
Theory
By
Neelam Patidar
SASL – Mathematics
VIT , Bhopal University.
Properties of Relations
1.Reflexive
2.Symmetric and Antisymmetric
Lattice
Lattices – A Poset in which every pair of elements has both, a least upper
bound and a greatest
lower bound is called a lattice.
There are two binary operations defined for lattices –
1.Join – The join of two elements is their least upper bound. It is denoted by
, not to be confused with disjunction.
2.Meet – The meet of two elements is their greatest lower bound. It is denoted
by , not to be confused with conjunction.
Least Upper Bound (SUPREMUM):
Let A be a subset of a partially ordered set S. An element M in S is
called an upper bound of A if M succeeds every element of A, i.e. if,
for every x in A, we have x <=M
If an upper bound of A precedes every other upper bound of A, then it
is called the supremum of A and is denoted by Sup (A)
Greatest Lower Bound (INFIMUM):
An element m in a poset S is called a lower bound of a subset A of S if
m precedes every element of A, i.e. if, for every y in A, we have m
<=y
If a lower bound of A succeeds every other lower bound of A, then it
is called the infimum of A and is denoted by Inf (A)
Properties of Lattice
Let L be a non-empty set closed under two binary operations called meet
and join, denoted by ∧ and ∨. Then L is called a lattice if the following
axioms hold where a, b, c are elements in L:
1) Commutative Law: -
(a) a ∧ b = b ∧ a (b) a ∨ b = b ∨ a
2) Associative Law:-
3) Absorption Law: -
(a) a ∧ ( a ∨ b) = a (b) a ∨ ( a ∧ b) = a
Boolean Algebra
3
Boolean Algebra
Summary
• Examples:
– is read “Y is equal to A AND
– B.”
– is read “z is equal to x OR y.”
is read “X is equal to NOT A.”
Tabular listing of the values of a function for all
possible
combinations of values on its arguments
Example: Truth tables for the basic logic
AND
operations: OR NOT
X Y Z = X·Y X Y Z = X+Y X Z
0 0 0 0 0 0 X
0 1 0 0 1 1 0 1
1 0 0 1 0 1 1 0
1 1 1 1 1 1 4
Boolean Operator Precedence
• After finding the circuit inputs and outputs, you can come up with
either an expression or a truth table to describe what the circuit
does.
• You can easily convert between expressions and truth tables.
Find the circuit’s
inputs and
outputs
Find a
Find a truth
Boolean
table
expression
for the circuit
for the circuit
1
2
De-Moprgan’s Theorem
Logic Gates
• In the earliest computers, switches
were opened and closed by
magnetic fields produced by
energizing coils in relays. The
switches in turn opened and closed
the current paths.
The AND gate is so named because, if 0 is called "false" and 1 is called "true,"
the gate acts in the same way as the logical "and" operator. The following
illustration and table show the circuit symbol and logic combinations for an AND
gate. (In the symbol, the input terminals are at left and the output terminal is at
right.) The output is "true" when both inputs are "true." Otherwise, the output is
"false." In other words, the output is 1 only when both inputs one AND two are
1.
Boolean
Functions
• Boolean
Expression/Function x y z F
Example: F (x, y) = x
0 0 0 0
+ y’ z
0 0 1 1
• Truth Table
0 1 0 0
All possible
0 1 1 0
combinations
x of input
1
variables
y F0 0 1
1 0 1 1
• Logic Circuit
z 1 1 0 1
1 1 1 1
13 /
28
Logic Diagrams and
Expressions
Truth Logic Equation/Boolean
XTable
YZ F X Y ×Z Function
000 0
001 1
010 0
F X Y Z
011 0 X
Logic Circuit
100 1
Y F
101 1
110 1 Z
111 1
• Boolean equations, truth tables and logic
diagrams
• describe the same function!
Truth tables are unique, but expressions
and logic diagrams are not. This gives
Boolean Functions Exercise
Sol. AB + AC
AB(C+C’) + AC(B+B’)
ABC+ABC’+ABC+AB’ Distributive law
C ABC+ABC’+AB’C
Canonical form of Boolean Expression
(Standard form) Contd..
Convert (A+B)(A+C) in
Canonical POS
Sol. (A+B).(A+C)
(A+B)+(C.C’) . (A+C)+(B.B’) (A+B+C).(A+B+C’).
(A+B+C)(A+B’+C) Distributive law
(A+B+C).(A+B+C’)(A+B’+C) Remove duplicates
Canonical form of Boolean Expression
(Standard form) Contd..
• Minterm A B C Minterm
– Product (AND function) 0 0 0 0 m0 A BC
– Contains all variables 1 0 0 1 m1 A BC
– Evaluates to ‘1’ for 2 0 1 0 m2 A BC
a specific 3 0 1 1 m3 A BC
combination
4 1 0 0 m4 A BC
A =
Example A B C
0 5 1 0 1 m5 A BC
(0) • (0) •
B= (0) 6 1 1 0 m6 A BC
0 1 • 1 • 1=
7 1 1 1 m7 ABC
1
C=
18 /
0 28
Converting from Truth Table to Boolean
Function
• Maxterm A B C Maxterm
– Sum (OR function) 0 0 0 0 M0 A B
– Contains all variables C
– Evaluates to ‘0’ for 1 0 0 1 M1 A B
a specific C
combination 2 0 1 0 M2 AB
A =
Example A B C C
1 3 0 1 1 M3 AB
(1) • (1) •
B= (1) C
1 4 1 0 0 M4 AB
0 • 0 • 0=
0 C
C=
5 1 0 1 M5 A B 19
/
1 28
Converting from Truth Table to Boolean
Function