Chapter - 2 - Boolean Algebra and Logic Gates-Part - 1
Chapter - 2 - Boolean Algebra and Logic Gates-Part - 1
Engineering
ECE203
Digital Logic Design
Chapter 2
Boolean Algebra and Logic Gate
◼ What is an algebra?
Mathematical system consisting of
❑
❑ Set of elements
❑ Set of operators
❑ Axioms or postulates
◼ Why is it important?
❑ Defines rules of “calculations”
◼ Example: arithmetic on natural numbers
❑ Set of elements: N = {1,2,3,4,…}
❑ Operator: +, –, *
❑ Axioms: associativity, distributivity, closure, identity elements, etc.
◼ Note: operators with two inputs are called binary
❑ Does not mean they are restricted to binary numbers!
❑ Operator(s) with one input are called unary
5. Inverse: a set having the identity element e with respect to the binary
operator to have an inverse whenever, for every xS, there exists an
element yS such that
◆ x*y=e
» The operator + over I, with e = 0, the inverse of an element a is (-a), since a+(-a)
= 0.
6. Distributive law: if * and .are two binary operators on a set S, * is said
to be distributive over . whenever
◆ x * (y.z) = (x * y).(x * z)
Terminology:
◆ Literal: A variable or its complement
◆ Product term: literals connected by •
◆ Sum term: literals connected by +
Algebra
Engineering
AND OR NOT
x y x.y x y x+y x x'
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
1. Closure (+ and‧)
2. The identity elements
(1) +: 0
(2).: 1
Algebra
Engineering
Huntington postulates:
Theorem 2(a): x + 1 = 1
Post. 2: (a) x+0=x, (b) x·1=x
x + 1 = 1.(x + 1) by 2(b) Post. 3: (a) x+y=y+x, (b) x·y=y·x
=(x + x')(x + 1) 5(a) Post. 4: (a) x(y+z) = xy+xz,
(b) x+yz = (x+y)(x+z)
= x + x' 1 4(b) Post. 5: (a) x+x’=1, (b) x·x’=0
Th. 1: (a) x+x=x
= x + x' 2(b)
=1 5(a)
Theorem 2(b): x.0 = 0 by duality
Theorem 3: (x')' = x
◆ Postulate 5 defines the complement of x, x + x' = 1 and x x' = 0
◆ The complement of x' is x is also (x')'
0 0 1 1 0 1 1 0 1 1
0 1 1 0 1 0 0 0 1 1
1 0 0 1 1 0 0 0 1 1
1 1 0 0 1 0 0 1 0 0
1. xy + x’z + yz = xy + x’z
2. (x+y)•(x’+z)•(y+z) = (x+y)•(x’+z) -- (dual)
Proof:
xy + x’z + yz = xy + x’z + (x+x’)yz
= xy + x’z + xyz + x’yz
= (xy + xyz) + (x’z + x’zy)
= xy + x’z
QED (2 true by duality).
A Boolean function
◆ Binary variables
◆ Binary operators OR and AND
◆ Unary operator NOT
◆ Parentheses
Examples
◆ F1= x y z'
◆ F2 = x + y'z
◆ F3 = x' y' z + x' y z + x y'
◆ F4 = x y' + x' z
x y z F1 F2 F3 F4
0 0 0 0 0 0 0
0 0 1 0 1 1 1
0 1 0 0 0 0 0
0 1 1 0 0 1 1
1 0 0 0 1 1 1
1 0 1 0 1 1 1
1 1 0 1 1 0 0
1 1 1 0 1 0 0
Two Boolean expressions may specify the same function
◆ F3 = F4
F2 = x + y'z
F4 = x y' + x' z