0% found this document useful (0 votes)
24 views

Lecture 3 Updated

The document discusses the basics of Boolean algebra. It defines key concepts like closure, identity elements, complements, and duality. It also presents six postulates that form the basis of Boolean algebra, such as closure with respect to logical operators AND and OR. The document then proves two theorems - idempotency and the properties of 1 and 0 - by deducing them logically from the postulates.

Uploaded by

Adnan Aijaz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Lecture 3 Updated

The document discusses the basics of Boolean algebra. It defines key concepts like closure, identity elements, complements, and duality. It also presents six postulates that form the basis of Boolean algebra, such as closure with respect to logical operators AND and OR. The document then proves two theorems - idempotency and the properties of 1 and 0 - by deducing them logically from the postulates.

Uploaded by

Adnan Aijaz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

LOGIC AND

SEQUENTIAL CIRCUIT
DESIGN
BOOLEAN ALGEBRA & LOGIC GATES

2
BASIC DEFINITION

 Closure
A set S is closed w.r.t. a binary operator if, for every pair of elements of S, the binary
operator specifies a rule for obtaining a unique element of S.

◼ Example

Set of Natural numbers N={1,2,3,…….}


Closed w.r.t. Addition
NOT closed w.r.t. Subtraction

3
BASIC DEFINITIONS

◼ Associative Law
 A binary operator * on a set S is said to be associative whenever:

(x*y) * z = x* (y*z) for all x,y,z  S

◼ Commutative Law
 A binary operator * on a set S is said to be commutative whenever:

x*y=y*x for all x,y  S

4
BASIC DEFINITIONS

◼ Identity Element
 A set S is said to have an identity element with respect to a binary
operation * on S if there exist an element e S with the property
e * x = x * e = x for every x  S

With respect to operator +, the set I has identity element 0

Example: The element 0 is an identity element with


respect to the binary operator + on the set of integers
I = {c, -3, -2, -1, 0, 1, 2, 3,c}, since
x + 0 = 0 + x = x for any x  I

With respect to operator *, the set I has identity element 1

5
BASIC DEFINITIONS

QUESTION

With respect to operator +, what is the identity element for the set of natural numbers
NONE
With respect to operator +, what is the identity element for the set of whole numbers
ZERO

6
BASIC DEFINITIONS

 Inverse
 A set S having the identity element e with respect to a binary
operator * is said to have an inverse whenever, for every x 
S, there exist an element y  S such that

x * y = e for every x  S

◼ Example
For set of integers I and operator +, e=0
Inverse of a = -a

a+ (-a) = 0 = e 7
BASIC DEFINITIONS

 Distributive Law
 If ‘*’ and ‘.’ are two binary operators on S, ‘*’ is said to be
distributive over ‘.’ whenever
 The only distributive law applicable is that of * over +:
a * (b + c) = (a * b) + (a * c)

8
BOOLEAN ALGEBRA

Boolean Algebra developed by


George Boole (1815-1864)

9
POSTULATES & THEOREMS

Postulate (a fact)

❑ A basic assumption that is accepted without proof


❑ Accepted as true in order to provide a basis for
logical reasoning

Theorem
❑ A statement which can be proved to be true
using logical (deductive) reasoning
❑ A proposition deducible from basic postulates
10
BOOLEAN ALGEBRA

“plus” / ”OR” “times” / ”AND”

A (two-valued) Boolean Algebra is a 3-tuple {B , + , · }, where


• B is a set of at least 2 elements
• ( + ) and ( · ) are binary operations

There are 6 fundamental laws, or axioms that these operators


satisfy

11
POSTULATE 1
A1. Closure: For every a, b  B
I. a + b is in B; Closure with respect to ‘+’
II. a · b is in B; Closure with respect to ‘.’

(1,0)
(1,0) (1,0)

(1,0)
(1,0) (1,0)

12
POSTULATE 2

A2. Existence of identity elements: The set B has two distinct identity
elements, denoted as 0 and 1, such that for every element a  B
additive identity element
I. a+0=0+a=a
II. a·1=1·a= a

multiplicative identity element

a a
a 1 a
0
OR operation AND operation 13
POSTULATE 3
A3. Commutative laws: For every a, b  B
I. a+b=b+a
II. a·b=b·a

a
F=a+b a F = a.b
b b
b
F=b+a b F = b.a
a a
14
POSTULATE 4
A4. Distributive laws: For every a, b, c  B
a · (b + c) = (a · b) + (a · c)
a·+(b . c) = (a·+ b) . (a + c)

15
POSTULATES 5 & 6
A5. Existence of a complement: For every element a  B there exists an
element a’ such that
I. a + a’ = 1
II. a · a’ = 0
the complement of a

A6. There exist at least two elements a,b  B such that


a≠b

16
BOOLEAN ALGEBRA
 Closure➔ x + y is in B and x . y is in B
 Obvious as result either 0 or 1

 Identity➔ (1. x = x) and (0 + x = x)


 Commutative ➔x + y = y + x and x.y=y.x
 Can be checked from the Truth Table

 Distributive ➔ x + (y. z) = (x + y) (x + z) and x. (y + z) = (x . y) + (x . z)


 Can be checked from the Truth Table
 Can be checked from the Truth Table

 Complement➔ x + x’ = 1 and x.x’=0


 X+X’=1➔ 0 +0’=0+1=1 and 1+1’=1+0=1
 X.X’=0 ➔ 0.0’ = 0.1 =0 and 1.1’ =1.0=0
THE DUALITY PRINCIPLE

 Each postulate of Boolean algebra contains a pair of


expressions or equations such that one is
transformed into the other and vice-versa by
interchanging the operators, + ↔ ·, and identity
elements, 0 ↔ 1.
 The two expressions are called the duals of each
other.
EXAMPLES OF DUALS

Duals
Postulate
Expression 1 Expression 2

1 a, b, a + b ε B a, b, a · b ε B

2 a+0=a a·1=a

3 a+b=b+a a·b=b·a

4 a + (b + c) = (a + b) + c a · (b · c) = (a · b) · c

5 a + (b · c)=(a + b) · (a + c) a · (b + c)=(a · b)+(a · c)

6 a+a =1 a•a = 0
PROPERTIES OF BOOLEAN ALGEBRA

 The postulates are basic axioms of the algebraic structure and need no proof.
 The theorems must be proven from the postulates.

21
Identity a) x + 0 = x
b) x .1 = x
Commutative a) x + y = y + x
b) x .y = y.x
THEOREM 1: Distributive a) x.(y + z) = (x .y) + (x.z)
b) x + (y.z) = (x+y).(x+z)
IDEMPOTENCY Complement a) x + x’ = 1
b) x.x’ = 0

 For all elements a in B:


 a+a=a
 aa=a
 Proof
a + a= (a + a).1
= (a + a).(a + ā)
= a + a.ā
= a+0
= a

22
Identity a) x + 0 = x
b) x .1 = x
Commutative a) x + y = y + x
b) x .y = y.x
THEOREM 1: Distributive a) x.(y + z) = (x .y) + (x.z)
b) x + (y.z) = (x+y).(x+z)
IDEMPOTENCY Complement a) x + x’ = 1
b) x.x’ = 0

 For all elements a in B:


 a+a=a
 aa=a
 Proof
a.a = (a.a) + 0
= (a.a) + (a.ā)
= a.(a + ā)
= a .1
= a

23
Identity a) x + 0 = x
b) x .1 = x
THEOREM 2 Commutative a) x + y = y + x
b) x .y = y.x
Distributive a) x.(y + z) = (x .y) + (x.z)
 a + 1 = 1, for + operator b) x + (y.z) = (x+y).(x+z)
Complement a) x + x’ = 1
 a · 0 = 0, for · operator b) x.x’ = 0

 Proof:
a+1 = (a + 1).1

= 1.(a + 1)
= (a + ā).(a + 1)
= a + ā.1
= a+ā
= 1
a · 0 = 0 (By Duality) 24
Identity a) x + 0 = x
b) x .1 = x
Commutative a) x + y = y + x
b) x .y = y.x
Distributive a) x.(y + z) = (x .y) + (x.z)
b) x + (y.z) = (x+y).(x+z)
THEOREM 2 Complement a) x + x’ = 1
b) x.x’ = 0

 a + 1 = 1, for + operator
 a · 0 = 0, for · operator
 Proof:
a.0 = (a.0) + 0
= 0 + (a.0)
= (a.ā) + (a.0)
= a.(ā + 0)
= a.ā

= 0

25
THEOREM 3 - INVOLUTION

 a=a
 Proof:

a + ā = 1 and a ā = 0, (complements)
or ā + a = 1 and ā a = 0, (commutativity)
i.e., a is complement of ā
Therefore, a = a

26
THEOREM 4 - ABSORPTION
Identity a) x + 0 = x
b) x .1 = x
Commutative a) x + y = y + x
b) x .y = y.x
Distributive a) x.(y + z) = (x .y) + (x.z)
b) x + (y.z) = (x+y).(x+z)
 a+ab=a Complement a) x + x’ = 1
 a (a + b) = a b) x.x’ = 0

 Proof:
a + a.b = a.1 + a b
= a.(1 + b)
= a .1
= a

Similar proof for a.(a + b) = a (By Duality)

27
THEOREM 5 – DEMORGAN

(a+b)’ = a’.b’
(a.b)’ = a’+ b’
a b a+b (a+b) a’ b’ a’b’
’ 1 1 1
0 0 0 1 1 0 0
0 1 1 0 0 1 0
1 0 1 0 0 0 0
1 1 1 0

28
THEOREM 6 - ASSOCIATIVITY

a + (b + c) = (a + b) + c
a.(b.c) = (a.b).c

29
BOOLEAN FUNCTIONS
 Boolean functions, truth tables or logic diagrams can be generated from
each other

 Designers try to reduce complexity and number of gates to reduce circuit


cost

 Two different boolean functions may represent the same logic and truth
table

 A single variable in a boolean function is called literal

 Group of literals which forming an input to a gate are together called a


term
IMPLEMENTATION OF BOOLEAN FUNCTIONS

Draw the logic diagram for the following function: F = (a.b)+(b.c)

a
b
F

31
IMPLEMENTATION OF BOOLEAN FUNCTIONS

F1 = x + y ' z
Boolean Function expresses logical relationship between
binary variables

Boolean Function can be represented by a Truth Table

x
F1

y
z
IMPLEMENTATION OF BOOLEAN FUNCTIONS

Example 2: F2 = x' y ' z + x' yz + xy '


x

F2
z
IMPLEMENTATION OF BOOLEAN FUNCTIONS
▪ Try another implementation using a simplified F2:

F2 = x' y ' z + x' yz + xy '


= x' z ( y '+ y ) + xy ' Distributive Pos

= x' z (1) + xy ' Complement Pos

= x' z + xy '
x
y
F2

This implementation has fewer gates and fewer inputs to the gates (or wires) than the previous one.
SIMPLIFYING BOOLEAN FUNCTIONS
F3 = xy + x' z + yz
= xy + x' z + yz ( x + x' ) Identity .1 is same & Complement Pos (x.x’)=1

= xy + x' z + xyz + x' yz Distributed Pos

= xy + xyz + x' z + x' yz Rearrange order

= xy (1 + z ) + x' z (1 + y ) Distributed Pos

= xy + x' z Theorem 2 (X+1 =1)


x
y
F3

z
COMPLEMENT OF A FUNCTION
 DeMorgan’s Theorem

(x+y)’ = x.’y’
(x.y)’=x’+y’

(A+B+C+D+…+F)’= A’B’C’D’…. F’
(ABCD…F)’ = A’+B’+C’+D’+… + F’

The complement of a function can be obtained by interchanging AND and OR operators and
complementing each literal
COMPLEMENT OF A FUNCTION

 Example: Find the complement of:

F = x’yz’+x’y’z

F’ = (x’yz’+x’y’z)’
= (x’yz’)’.(x’y’z)’
=(x+y’+z).(x+y+z’)
COMPLEMENT OF A FUNCTION

 Example: Find the complement of F by taking its dual and complementing each
literal
F = x’yz’+x’y’z

Dual of F
= (x’+y+z’).(x’+y’+z)
Complement each literal
=(x+y’+z).(x+y+z’) = F’
COMPLEMENT OF A FUNCTION
 Example: Find the Complement of

F = ( AB '+C ) D '+ E
F ' = [( AB '+C ) D '+ E ]'
= [( AB '+C ) D ' ]' E '
= [( AB '+C )'+ D ' ' ]E '
= [( AB ' )' C '+ D ]E '
= ( A'+ B )C ' E '+ DE '
DEFINITIONS

 Product terms – AND → ĀBZ


 Sum terms – OR → X + Ā
MINTERMS AND
MAXTERMS

 n binary variables can be combined to form 2n terms (AND terms), called


Minterms or standard products.
 In a similar fashion, n binary variables can be combined to form 2n terms (OR
terms), called Maxterms or standard sums.

 Boolean Functions expressed in Sum of MinTerms or Product of MaxTerms are


said to be in Canonical Form
MINTERMS AND MAXTERMS
• Each Minterm is obtained from an AND term. Variable primed if
corresponding bit 0, vice versa
• Each Maxterm is obtained from an OR term. Variable primed if
corresponding bit 1, vice versa
x y z minterm maxterm
0 0 0 x’.y’.z’ x+y+z
0 0 1 x’.y’.z x+y+z’
0 1 0 x’.y.z’ x+y’+z
0 1 1 x’.y.z x+y’+z’
1 0 0 x.y’.z’ x’+y+z
1 0 1 x.y’.z x’+y+z’
1 1 0 x.y.z’ x’+y’+z
1 1 1 x.y.z x’+y’+z’
MINTERMS AND MAXTERMS

x y z minterm designation maxterm designation

0 0 0 x’.y’.z’ m0 x+y+z M0
0 0 1 x’.y’.z m1 x+y+z’ M1

0 1 0 x’.y.z’ m2 x+y’+z M2

0 1 1 x’.y.z m3 x+y’+z’ M3

1 0 0 x.y’.z’ m4 x’+y+z M4

1 0 1 x.y’.z m5 x’+y+z’ M5

1 1 0 x.y.z’ m6 x’+y’+z M6

1 1 1 x.y.z m7 x’+y’+z’ M7
MINTERMS AND MAXTERMS

 Each minterm can also be called a Standard Product

 Each maxterm can also be called a Standard Sum

 For n variables there are 2n minterms and maxterms

 Each maxterm is the complement of corresponding minterm and vice versa


mj = M j

m3 = XYZ = X + Y + Z = M 3
REPRESENTATION OF FUNCTIONS
Representation of Function in minterms m x y z F1 F2
0 0 0 0 0 0
F1 = x’y’z+x’yz+xyz = m1 + m4 + m7
1 0 0 1 1 0
F2 = x’yz+xy’z+xyz’+xyz = m3 + m5 + m6 + m7
2 0 1 0 0 0
3 0 1 1 0 1
Representation of Function in maxterms 4 1 0 0 1 0
F1 = (x+y+z).(x+y’+z).(x+y’+z’).(x’+y+z’).(x’+y’+z) 5 1 0 1 0 1
= M0 . M2 . M3 . M5 . M6
6 1 1 0 0 1
F2 = (x+y+z).(x+y+z’).(x+y’+z).(x’+y+z)
= M0 . M1 . M2 . M4 7 1 1 1 1 1

Boolean expression represented as sum of minterms or product of maxterms


are said to be in Canonical Form
SUM OF MINTERMS
x y z F1 F2
0 0 0 0 1
0 0 1 1 0
0 1 0 0 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 0

 Given the truth table, express F1 in sum of minterms

F1 ( x, y, z ) = (1,4,7) = m1 + m4 + m7
= ( x' y ' z ) + ( xy ' z ' ) + ( xyz )
PRODUCT OF MAXTERMS
x y z F1 F2
0 0 0 0 1
0 0 1 1 0
0 1 0 0 1
0 1 1 0 1
1 0 0 1 0
1 0 1 1 0
1 1 0 1 0
1 1 1 1 0

 Given the truth table, express F1 in Product of Maxterms

F1 ( x, y, z ) = (0,2,3) = M 0  M 2  M 3
= ( x + y + z )( x + y '+ z )( x + y '+ z ' )
Example: Sum of Minterms

Express the Boolean function F = x + y' z in a sum of


minterms.
AIM: Convert it to 3 variable AND Terms and take their SUM

x = x( y + y ' ) = xy + xy '
xy = xy ( z + z ' ) = xyz + xyz '
xy ' = xy ' ( z + z ' ) = xy ' z + xy ' z '
y ' z = y ' z ( x + x' ) = xy ' z + x' y ' z
Adding all terms and excluding recurring terms:

F ( x, y, z ) = x' y ' z + xy ' z '+ xy ' z + xyz '+ xyz


F ( x, y, z ) = m1 + m4 + m5 + m6 + m7 = (1,4,5,6,7)
Example: Product of Maxterms

Express the Boolean function F = xy + x' z in a Product of


product of Maxterms.

AIM: Convert it to 3 variable OR Terms and take their Product

F = xy + x ' z = ( xy + x ')( xy + z ) (Distributive law)

( xy + x ') = ( x + x ')( y + x ')


( xy + z ) = ( x + z )( y + z )

x'+ y + zz ' = ( x'+ y + z )( x'+ y + z ' )


x + z + yy ' = ( x + z + y )( x + z + y ' )
y + z + xx' = ( y + z + x)( y + z + x' ) (Remove any recurring terms)

F = ( x + y + z )( x + y '+ z )( x'+ y + z )( x'+ y + z ' )


M0M2M4M5 = F(x,y,z)=Π(0,2,4,5)
USING TRUTH TABLE
 Find Sum of Minterms and Product of MaxTerms of F=
xy+x’z
 Find Sum of Minterms & Product of Maxterms from truth
table
 F(x,y,z)= ∑(1,3,6,7)
 F(x,y,z)= П (0,2,4,5)
CONVERSION B/W CANONICAL FORMS

 Complement of a function expressed as sum of minterms equals sum of minterms


missing from the original function

F(A,B,C) = ∑(1,4,5,6,7)= m1+m4+m5+ m6+m7


 Complement is

F’(A,B,C)= ∑(0,2,3) = m0+m2+m3


 Complement of F’ is F

F = (m0+m2+m3)’ = = m’0. m’2 . m’3 = = M0.M2.M3= П(0,2,3)


STANDARD FORMS

 Sum of Products (SOP)

 F= y’ + xy+ x’yz’

 Sum denotes OR of these terms

 Product of Sums (POS)

 F= x(y’+z)(x+’y+z’)

 Product denotes AND of these terms


SUM OF PRODUCTS
F= y’ + xy+ x’yz’

x’
y
z’

y’
F

x
y
PRODUCT OF SUMS
F= x(y’+z)(x’y+z’)

x’
y
z’

x
F

y’
z

BE-26 C
NON STANDARD BOOLEAN FUNCTION
 Boolean Expression in non standard form F=AB+C(D+E)
 Neither SOP or POS
 Implemented in 3 levels
NON STANDARD BOOLEAN FUNCTION
 F=AB+C(D+E)
 Convert to Standard Form by distributive law
 F=AB+C(D+E) = AB+CD+CE
 Draw 2 Level Standard Sum of Product Circuit
TRUTH TABLE FOR 2 VARIABLES
2 = 1622

One can have 16 functions of two variables

f0 to f15

x y f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15


0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
TRUTH TABLE FOR 2 VARIABLES
x y f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

x.y x y x+y xy + x’y x+y’ x’+ y 1

0 x.y’ x’.y xy’+x’y (x+y)’ y’ x’ (xy)’


BOOLEAN EXPRESSIONS FOR THE 16 FUNCTIONS OF
TWO VARIABLES
DIGITAL LOGIC GATE
DIGITAL LOGIC GATE
DIGITAL LOGIC GATE

You might also like