Sie sind auf Seite 1von 30

Boolean Algebra

CDAC Mumbai

Boolean Algebra
provides the operations and the rules for working with the set {0, 1}. Operations
Sum Product Complement These are the rules that underlie electronic circuits
CDAC Mumbai 2

Operations
Sum / Or
Denoted by + 1+1 = 1, 1+0 = 1, 0+1 = 1, 0+0 = 0

Product / And
Denoted by . 1.1 = 1, 1.0 =0, 0.1 = 1, 0.0 = 0

Compliment / Negation
Denoted by ` 1` = 0, 0` = 1
CDAC Mumbai 3

Truth Tables
x 0 0 1 1 y 0 1 0 1 x+y 0 1 1 1 x 0 1
CDAC Mumbai

x 0 0 1 1 x` 1 0

y 0 1 0 1

x.y 0 0 0 1

Laws of Boolean Algebra


Double Complement
(x`)` = x

Idempotent
x+x=x, x.x=x x.1=x

Domination
x+1=1,

CDAC Mumbai

Laws of Boolean Algebra


Commutative
x+y=y+x, x.y=y.x x . ( y . z) = (x . y) . z

Associative
x + ( y + z) = (x + y) + z ,

Absorption
x . ( x + y) = x , x+(x.y)=x

CDAC Mumbai

Laws of Boolean Algebra


Unit Property x + x` = 1 Zero Property x . x` = 0 De Morgans Laws (x + y)` = x` . y`, (x . y)` = x` + y`

CDAC Mumbai

Duality
Swapping Products and Sums and 1s and 0s produces a valid expression e.g. x . (x + y) = x (? Property) x+(x.y)=x x + 1 = 1 (? Property) x.0 =0
CDAC Mumbai 8

Boolean Expression
If B = {1,0} Then, B^n = { (x1, x2, x3, xn) | xi B for 1<= I <= n } gives all possible n-tuples from B for order n e.g. n = 2 B^2 = {(0,0), (0,1), (1,0), (1,1)}
CDAC Mumbai 9

Boolean Function
f : Bn -> B f is a Boolean function that maps Boolean expressions of order n to set B e.g. x y f 0 0 0 0 1 1
CDAC Mumbai

1 0 1

1 0 0

How many different functions are possible for an order n ?


10

Boolean Function
Boolean functions can be represented using expressions made up of the variables and Boolean operations
x 0 0 1 1
CDAC Mumbai

y 0 1 0 1

f 0 1 0 0

x`y` x`y xy` xy


11

f = x`y

Boolean Function
Two Boolean functions f and g are equal, if and only if, f (b1,b2,,bn) = g (b1,b2,,bn) for every bi B

CDAC Mumbai

12

Representation
Sum-of-Products
Minterm : Product of Boolean Variables Sum of the Minterms x 0 0 1 1 y 0 1 0 1 f 0 1 0 1

x`y` x`y xy` xy


13

f = x`y + xy

MumbaiDisjunctive Normal form alsoCDAC called

Representation
Product-of-Sums
Maxterm : Product of Boolean Variables Product of the Maxterms x 0 0 1 1 y 0 1 0 1 f 0 1 0 1

x`y` x`y xy` xy


14

f ` = (x + y`) . (x + y)`

MumbaiConjunctive Normal form alsoCDAC called

Functional Completeness
A set of Boolean functions is functionally complete, if all other Boolean functions can be constructed from this set on a set of input variables provided {., +, `} is functionally complete x + y = (x` . y`)` and x . y = (x` + y`)` Hence, {., `} and {+,` } are also functionally complete
CDAC Mumbai 15

Functional Completeness
NAND Operator Denoted by | x . y = (x | y) | (x | y) x` = (x | y) Verify x . y
x 0 0 1 1 y 0 1 0 1 NAND 1 1 1 0

x 0 0 1 1

y 0 1 0 1

x|y

x|y

(x | y) | (x | y)

x.y

CDAC Mumbai

16

Functional Completeness
Verify x` x 0 1 x 0 1 x|x 1 0 x`

| can replace ` and . Hence, { | } is functionally complete

CDAC Mumbai

17

Functional Completeness
NOR Operator
Denoted by
x 0 0 1 1 y 0 1 0 1 NOR 1 0 0 0

Verify Functional Completeness of NOR and find the expressions equivalent to (x . y) or (x + y) and x`
CDAC Mumbai 18

De Morgans Theorem
Any Boolean equation can be written as either Product-of-Sums or Sum-of-Products form How to Demorganize
Complement each variable and whole expression Swap + and . Clear all double complements e.g. x + y` = (x` . (y`)`)` = (x` . y )`

CDAC Mumbai

19

Logic Gates & Circuits


AND Gate OR Gate Invert Gate

f = x` . y + x . y
x y x y x.y x` y f x` . y

The minimum the number of operations, the simpler the circuit


CDAC Mumbai 20

Application of Boolean Algebra


To find an absolute minimum of hardware to do a specific job by Boolean Manipulations To compare 2 expressions
Complexity Index = (No. of terms + No. of Variables) / Inverters e.g. Complexity Index of (x + y` + z) . (x` + y + z`) = (2+6) / 3 = 8 / 3

CDAC Mumbai

21

Synthesis of a Circuit
Specify what it has to do Construct a truth table Write Boolean Equation for the table Simplify Analyze for correctness

CDAC Mumbai

22

Simplification
Principle
Unit property x + x` = 1

Terms can be combined when,


two terms are exactly same two terms are same, but for a variable, which is complemented in one term and not complemented in the other e.g. (x . y . z`) + (x . y . z) = (x . y)
CDAC Mumbai 23

Karnaugh Map
A.B C C` A . B` A` . B` A` . B

A.B C.D C . D` C` . D` C` . D
CDAC Mumbai

A . B`

A` . B`

A` . B

24

Karnaugh Map
Groups of cells that are having 1 and forming groups of powers of 2 will together lead to a single term. Overlapping of groups is allowed
One cell can participate in multiple groups

Groups may wrap around

CDAC Mumbai

25

Simplification
Expression from truth table:
ABCD + ABC`D + AB`CD` + A`B`CD` + AB`C`D + A`B`C`D`
A.B C.D C . D` C` . D` C` . D 1 1 1 1 1 1 1 A . B` A` . B` A` . B

f = B` . D` + A . B . D + A`. C`. D`
CDAC Mumbai 26

Dont care conditions


Some combination of input might never go to the circuit
A.B C.D C . D` C` . D` C` . D 1 1 1 1 1 1 x 1 A . B` A` . B` A` . B

f = B` . D` + A . B . D + A`. D`
CDAC Mumbai 27

Common Hazards
Correct but unnecessary loops More than one solution, but solutions differ in the number of inverters and in turn in the Complexity Index

CDAC Mumbai

28

Summary
Boolean Variables Boolean Expressions Functional Completeness Logic Gates Simplification of circuits

CDAC Mumbai

29

Problems
Prove functional completeness of NOR operator Exercises behind Boolean Algebra chapter in Kenneth Rosen

CDAC Mumbai

30

Das könnte Ihnen auch gefallen