Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lecture 3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Lecture # 3

26 Aug 2021

Digital Design Google Classroom code:


nzdcewi
CS F215/ECE F215/EEE F215/INSTR F215
AUGUST 2021
I N S T R U C TO R : D R . M A N I S H
Consultation hours: Tue, Thu, Fri : 12 noon - 1 PM
https://meet.google.com/cfy-bmps-cib
Boolean Algebra
1. Basic definitions
2. Basic theorems and properties

Boolean algebra, named after George Boole, is a branch of algebra in


which variables hold values as either true or false value, usually
denoted as 1 and 0, respectively.

Best known for : The laws of thought,


a monograph on algebraic logic
Definitions
Set: A set of elements is any collection of objects that follow certain common rules or properties.
S = {1,2,3, .., n} for all n ∈ N
Binary Operator: A rule when applied to each pair of S produces a unique element from S.
Consider a*b = c; where * is the operator.
* is a binary operator if S = {a,b,c} i.e. (all elements a,b,c are in the same set S)
* is not a binary operator if S = {a,b} i.e. (output c is not in the set S)
Closure: A set S is closed if for every element of S, the binary operator produces a unique element
from S. Example: Set of natural numbers with respect to the binary operator +
S = {1,2,3, .., n} for all n ∈ N i.e. (A+B will always produce a unique elemenet from S)
This set is not closed with respect to operator – because A-B can produce negative numbers which are
not in S.
Laws
Associative law: A binary operator * on a set S is said to be associative if
(a*b)*c = a*(b*c) for all a,b,c ∈ S
Commutative law: A binary operator * on a set S is said to be commutative if
a*b = b*a for all a,b, ∈ S
Distributive law: If * and . are two binary operators on set S, * is said to be distributive over . if
a*(b.c) = (a*b).(a*c) for all a,b,c ∈ S
Identity element: An element e is said to be an identity element in S with respect to operator * if
e*a = a*e = a ; a,e∈ S
Inverse element: An element b is said to be an inverse of a with respect to binary operator * in the set S if
a*b = e ; a,b, e∈ S

A field is a set of elements which satisfy all above rules/properties. Example: A field of real numbers.
Postulates of Boolean Algebra
(a.k.a. Huntington Postulates)
Boolean algebra is an algebraic structure defined by a set B, together with two binary operator +
and . , provided following conditions are satisfied:
1. B is closed with respect to + and . operators
2. The + identity is 0 and the . identity is 1
3. Commutative property is satisfied for + and . operators
4. Distributive property is satisfied for + and . operators
4. For every element x ∈ B, there exists an element x’ ∈ B (called the complement of x) such that
(a) x + x’ =1 and (b) x . x’ = 0
5. There exists at least two elements x,y ∈ B such that x ≠ y

Although, associative law is not included in the postulates, it holds true and can be derived from other postulates
Differences with ordinary algebra
Boolean Algebra Ordinary Algebra
Distributivity of + over . : a + (b.c) = (a+b). (a+c) Not valid
No subtraction or division operations available Have subtraction (-) and division (/) operations
Have complements described in postulate 5 Not available
(a) x + x’ =1 and (b) x . x’ = 0
Two valued Boolean algebra
Defined on a set of two elements B ={0,1} with following rules for + and . Operators:

A B A+B (OR) A B A.B (AND)


0 0 0 0 0 0
0 1 1 0 1 0
1 0 1 1 0 0
1 1 1 1 1 1
Postulates:
Is the structure closed with + and .?
Identity elements 0 for + and 1 for .? A A’ (NOT)
Commutative law established from the 0 1
symmetry of the table?
Complements available? 1 0
Two non-identical elements present?
Distributive postulate
Justification from the truth table:
A B C A.(B+C) A.B + A.C
0 0 0 0 0
0 0 1 0 0
0 1 0 0 0
0 1 1 0 0
1 0 0 0 0
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1
Basic Theorems and Properties
Duality: Every algebraic expression remains valid if operators and identity elements are
interchanged.
i.e. we can interchange + to . and 0 to 1 / 1 to 0 and the new expression will be valid.
Basic Theorems:

Theorem 1 A+A =A A.A=A


Theorem 2 A+1=1 A.0=0
Theorem 3 (involution) (A’)’ =A
Theorem 4 (associative) A + (B+C) =(A+B)+C A(BC) =(AB)C
Theorem 5 (DeMorgan) (A+B)’ = A’B’ (AB)’ = A’ + B’
Theorem 6 (absorption) A + AB = A A(A+B) = A
Justifications with truth tables
Theorem 1
A A+A = A (OR) A.A = A (AND)
0 0+0 = 0.0 =
1 1+1 = 1.1 =
Theorem 2
A A+1 = 1 (OR) A.0 = 0 (AND)
0 0+1 = 0.0 =
1 1+1 = 1.0 =

Theorem 3
A (A’)’ = A (NOT)
Homework:
0 (0’)’ = We also represent Justify Theorem 4
1 (1’)’ = complement as 𝐴ҧ with truth table
Example: DeMorgan’s theorem Can easily validate
with truth table

Theorem: 𝐴. 𝐵 = 𝐴ҧ + 𝐵ത and 𝐴 + 𝐵 = 𝐴ഥ . 𝐵ത
Example:
Given F = 𝐴ҧ𝐵ത 𝐶ҧ + 𝐴ҧ𝐵𝐶 ҧ
ത + 𝐴𝐵𝐶, ത
find 𝐹? Write the same expression F in various forms:
Solution: 𝐹ത = 𝐴ҧ𝐵ത 𝐶ҧ + 𝐴ҧ𝐵𝐶 ҧ
ത + 𝐴𝐵𝐶
F = 𝐴ҧ𝐵ത 𝐶ҧ + 𝐴ҧ𝐵𝐶 ҧ
ത + 𝐴𝐵𝐶
= 𝐴ҧ𝐵ത 𝐶ҧ . 𝐴ҧ𝐵𝐶 ҧ
ത . 𝐴𝐵𝐶
(From theorem statement 2:
= 𝐴ҧ𝐵ത 𝐶ҧ . 𝐴ҧ𝐵𝐶 ҧ
ത . 𝐴𝐵𝐶 A+B = 𝐴ഥ . 𝐵)

= 𝐴 + 𝐵 + 𝐶 . 𝐴 + 𝐵 + 𝐶ҧ . (A + 𝐵ത + 𝐶)ҧ
= 𝐴 + 𝐵 + 𝐶 . 𝐴 + 𝐵 + 𝐶ҧ . A + 𝐵ത + 𝐶ҧ

= 𝐴 + 𝐵 + 𝐶 + 𝐴 + 𝐵 + 𝐶ҧ + A + 𝐵ത + 𝐶ҧ

= 𝐴ҧ𝐵ത 𝐶ҧ + 𝐴ҧ𝐵𝐶 ҧ
ത + 𝐴𝐵𝐶
Absorption Theorem
Statement: A + AB = A
Proof: LHS = A+AB
= A . (1+B)
= A.1 = A

Now by duality: A . (A+B) = A


More Identities
A + A’ = 1
A . A’ = 0
A + A’B = A+ B
A+A’B A+B
A B A’B (OR)
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 1

Homework:
Justify A’+AB = A’+B with truth tables
Operator precedence order
Anything within the parenthesis must be evaluated first
Then evaluate the NOT operator a.k.a. complement or prime
Then evaluate the AND operator
Then evaluate the OR operator
Example 1
Simplify the following
F = A’BC’ + A B’C’ + A B’C + ABC’ + ABC
= A’BC’ + AB’ (C’+C) + AB (C’+C)
= A’BC’ + AB’ . 1 + AB .1
= A’BC’ + A(B’+B)
= A’BC’ + A
= A+ A’BC’ (Now remember the identity: A+A’B = A + B)
= A + BC’
Example 2
Write Truth table for F = A+BC’

A B C C’ BC’ F = A+ BC’
0 0 0 1 0 0
0 0 1 0 0 0
0 1 0 1 1 1
0 1 1 0 0 0
1 0 0 1 0 1
1 0 1 0 0 1
1 1 0 1 1 1
1 1 1 0 0 1

You might also like