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

Boolean Algebra

Boolean Algebra
> A Boolean algebra
= A set of operators (e.g. the binary operators: +, , INV) = A set of axioms or postulates

ENEE 644

Postulates
> Commutative > Distributive > Identities > Complement
Closure Associative x+y = y+x xy=yx x+(yz)=(x+y)(x+z) x(y+z)=xy+xz x+0=x x1=x x+x=1 xx=0 x+y xy (x+y)+z=x+(y+z) (xy)z=x(yz)
ENEE 644 3

Properties of Boolean Algebra


> Complement of a variable is unique. -- involution > (x) = x xx=x --idempotent > x+x = x x0=0 > x+1=1 x(x+y)=x -- absorption > x+xy=x (xy)=x+y -- DeMorgans Law > (x+y)=xy > xy+xz+yz = xy + xz
Duality: + and 0 1
ENEE 644 4

(x+y) (x+z) (y+z) = (x+y) (x+z) -- consensus

Proof of Consensus
> a <= b essentially implies that if a =1 then b =1 and if a = 0 then b
could be anything Theorem: In Consensus xy + xz + yz = xy + xz (How?) We Prove that xy + xz + yz >= xy + xz and xy + xz + yz <= xy + xz (This would imply equality and prove the theorem) Proof: First: xy + xz + yz >= xy + xz. Let xy + xz = a and yz = b; So we want to prove that a + b >= a which is true by definition of the inequality Second: xy + xz + yz <= xy + xz. This inequality could be split into xy + xz <= xy + xz and yz <= xy + xz All we need to do is to prove yz <= xy + xz

ENEE 644

Proof of Consensus
yz <= xy + xz We know that a <= b iff ab = 0 (How?) So if the above inequality is true yz(xy + xz) = 0 must be true. Which is always true. Hence Proved.

ENEE 644

Boolean Functions
> A Boolean function is a mapping f(x): Bn B.
= Constant function: f(x1,,xn) = b. = Projection (to the i-th axis): f(x1,,xn) = xi.

> A Boolean function is complete if f(x) is defined

for all xBn. Otherwise the point x that f(x) is not defined is called a dont care condition. > Operations on Boolean functions:
= Sum: = Product: = Complement: (f+g)(x) = f(x) + g(x) (fg)(x) = f(x)g(x) (f)(x) = (f(x))
ENEE 644 7

Representations of Boolean Functions


> Algebraic expressions
= f(x,y,z) = xy+z

> Tabular forms > Venn diagrams > Cubical


representations > Binary decision diagrams (BDD)

x 0 0 0 0 1 1 1 1

y 0 0 1 1 0 0 1 1

z 0 1 0 1 0 1 0 1

f 0 1 0 1 0 1 1 1

x y z y x
8

ENEE 644

Representations of Boolean Functions


> Algebraic expressions
= f(x,y,z) = xy+z

> Tabular forms > Venn diagrams > Cubical


representations > Binary decision diagrams (BDD)

x 0 0 0 0 1 1 1 1

y 0 0 1 1 0 0 1 1

z 0 1 0 1 0 1 0 1

f 0 1 0 1 0 1 1 1

x y z y x
9

ENEE 644

Booles Expansion Theorem


> The cofactor of f(x1,,xn) w.r.t. xi (or xi) is a
Boolean function f x ( or f x ) : B n 1 B , s.t.
i ' i

fx

/ x i'

( x1 , L , x i 1 , x i + 1 , L , x n )

= f ( x1 , L , x i 1 ,1 / 0 , x i +1 , L , x n ) > Booles Expansion Theorem:

f ( x1 , L , x i 1 , x i , x i + 1 , L , x n ) = x i f x i + x i, f x , = ( x i + f x , ) ( x i, + f x i )
i i

ENEE 644

10

Booles Expansion: Examples


> f(x) = x f(1) + x f(0)
= (x + f(0)) (x+f(1)) > f(x+y) f(x+y) = f(1) f(y) for single-variable x (from duality)

= Define g(x,y) = f(x+y)f(x+y) g(x,y) = xg(1,y) + xg(0,y) = xf(1)f(y) + xf(y)f(1) = f(1)f(y) = What if expand w.r.t variable y? f(x+y) f(x+y) =yf(1)f(1) + yf(x)f(x) = yf(1)+yf(1)f(0) = f(1)(yf(1) + yf(0)) =f(1)f(y)
ENEE 644 11

Booles Expansion: Examples

x y

x y

Hardware? Delay? 1 y

ENEE 644

12

Complete Expansion
f ( x1 , L , x n 1 , x n ) =
discriminants

f ( 0 , L ,0 ,0 ) x L x

' 1

' n 1

' n

minterms

' + f ( 0 , L , 0 ,1) x1' L x n 1 x n + L

+ f (1, L ,1,1) x1 L x n 1 x n

ENEE 644

13

Canonical Forms
> A form is called canonical if the representation of
the function in that form is unique. > Minterm Canonical Form
= AND-OR circuits

> Pro and Cons of Canonical Forms


= Unique up to permutation = Inefficient

ENEE 644

14

Normal (Standard) Forms


> SOP (Disjunctive Normal Form)
= A disjunction of product terms = A product term =0

> The Primary Objective During Logic Minimization


is to Remove the Redundancy in the Representation.

ENEE 644

15

Implicants
> An implicant of a function is a product term that is
included in the function. > An implicant is prime if it cannot be included in any other implicants. > A prime implicant is essential if it is the only one that includes a minterm. Example: f(x,y,z) = xy + yz xy(not I),xyz(I, not PI), xz(PI,not EPI), yz(EPI)
ENEE 644

xyz

xyz xyz

xyz

x
16

Specification for Incompleteness


> A Boolean function is incomplete if f(x) is NOT
defined for some xBn. Such point x is called a dont care condition. x y f > Tabular representation 0 0 0 > {1-set, 0-set, dont care set}
= 1-set = {xy} = 0-set = {xy} = Dont care set = {xy, xy} 0 1 1 1 0 1 1

ENEE 644

17

Dont Care Conditions


> Satisfiability dont cares of a subcircuit consist of
all input patterns that will never occur. > Observability dont cares of a subcircuit are the input patterns that represent situations when an output is not observed. Example:
{xy,xy} x y y=0
ENEE 644 18

{xy,xy}

You might also like