Vous êtes sur la page 1sur 36

DIGITAL LOGIC DESIGN

(DLD)
NAYAB SHAHID (070)
TAMIA RAFIQUE (078)
SAIMA NAZ (094)

Lecture # 5
Boolean Algebra

BOOLEAN ALGEBRA

1854: Logical algebra was published by


George

Boole

known

today

as

Boolean Algebra

Its a convenient way and systematic way of


expressing and analyzing the operation of
logic circuits.

1938: Claude Shannon was the first to


apply Booles work to the analysis and
design of logic circuits.
2

BOOLEAN ALGEBRA

Boolean algebra is a mathematical system


for the manipulation of variables that can
have one of two values.

In formal logic, these values are true and


false.
In digital systems, these values are on
and off, 1 and 0, or high and low.

Boolean expressions are created by


performing
operations
on
Boolean
variables.

Common Boolean operators include AND,


OR, and NOT.
3

BOOLEAN PRODUCT

A Boolean operator can be


completely described using a
truth table.

The truth table for the


Boolean operators AND is
shown at the right.

The AND operator is also


known
as
a
Boolean
product.

BOOLEAN SUM

A Boolean operator can be


completely described using a
truth table.

The truth table for the


Boolean operators OR is
shown at the right.

The OR operator is also


known as Boolean sum.

BOOLEAN ALGEBRA

The truth table for the


Boolean NOT operator is
shown at the right.

The NOT operation is most


often designated by an
overbar. It is sometimes
indicated by a prime mark
( ) or an elbow ().

BOOLEAN ALGEBRA

A Boolean function has:

At least one Boolean variable,


At least one Boolean operator, and
At least one input from the set {0,1}.

It produces an output that is also a member of


the set {0,1}.

BOOLEAN OPERATIONS & EXPRESSIONS

Variable a symbol used to represent a


logical quantity.

Complement the inverse of a variable and


is indicated by a bar over the variable.

Literal a variable or the complement of a


variable.

BOOLEAN ADDITION

Boolean addition is equivalent to the OR


operation
0+0=0

0+1=1

1+0=1

1+1=1

A sum term is produced by an OR


operation
with
A B, A
B , Ano
BAND
C , Aops
B involved.
CD

i.e.
A sum term is equal to 1 when one or more of
the literals in the term are 1.
A sum term is equal to 0 only if each of the
literals is 0.
9

BOOLEAN MULTIPLICATION

Boolean multiplication is equivalent to the


AND operation
00=0

01=0

10=0

11=1

A product term is produced by an AND


operation with no OR ops involved.

i.e. AB, AB , ABC , A BC D


A product term is equal to 1 only if each of the
literals in the term is 1.
A product term is equal to 0 when one or more
of the literals are 0.
10

LAWS & RULES OF BOOLEAN ALGEBRA

The basic laws of Boolean algebra:

The commutative laws

The associative laws

The distributive laws

11

COMMUTATIVE LAW FOR ADDITION

The commutative law of addition for


two variables is written as:
A+B = B+A
A
B

A+B

B
A

B+A

12

COMMUTATIVE LAW FOR


MULTIPLICATION

The commutative law of


multiplication for two variables is
written as: AB = BA
A
B

AB

BA

13

ASSOCIATIVE LAW OF ADDITON

The associative law of addition for 3


variables is written as: A+(B+C) =
(A+B)+C
A

B
C

A+(B+C)
B+C

B
C

A+B

(A+B)+C

14

ASSOCIATIVE LAW FOR MULTIPLICATION

The associative law of multiplication for


3 variables is written as: A(BC) = (AB)C

A
B
C

A(BC)
BC

A
B
C

AB
(AB)C

15

DISTRIBUTIVE LAWS

The distributive law is written for 3


variables as follows: A(B+C) = AB + AC
A

B+C

A
C

X=A(B+C)

AB

AC

X=AB+AC

16

RULES OF BOOLEAN ALGEBRA


1. A 0 A

7. A A A

2. A 1 1
3. A 0 0
4. A 1 A
5. A A A

8. A A 0

6. A A 1

9. A A
10. A AB A
11. A A B A B
12.( A B )( A C ) A BC

___________________________________________________________
A, B, and C can represent a single variable or a combination of variables.
17

DEMORGANS THEOREMS

DeMorgans theorems provide mathematical


verification of:

the equivalency of the NAND and negative-OR


gates

the equivalency of the NOR and negative-AND


gates.
18

DEMORGANS THEOREMS
NAND

Negative-OR

X Y X Y

The complement of two or more ANDed variables


is equivalent to the OR of the complements of
the individual variables.

19

DEMORGANS THEOREMS

The complement of two or more ORed variables


is equivalent to the AND of the complements of
the individual variables.

NOR

Negative-AND

X Y X Y
20

DEMORGANS THEOREMS

21

DEMORGANS THEOREMS

22

DEMORGANS THEOREMS
(EXERCISES)

Apply DeMorgans theorems to the


expressions:

X Y Z

X Y Z
X Y Z
W X Y Z
23

DEMORGANS THEOREMS
(EXERCISES)

Apply DeMorgans theorems to the


expressions:

( A B C)D
ABC DEF

AB C D EF
A BC D ( E F )
24

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

Example 2:

F2 x' y ' z x' yz xy'

x
y

F2

BOOLEAN ANALYSIS OF LOGIC CIRCUITS

Boolean algebra provides a concise


way to express the operation of a logic
circuit formed by a combination of logic
gates

so that the output can be determined for


various combinations of input values.

27

BOOLEAN EXPRESSION FOR A LOGIC CIRCUIT

To derive the Boolean expression for a


given logic circuit, begin at the leftmost inputs and work toward the final
output, writing the expression for each
gate.C
CD
D

B+CD
B

A(B+CD)

28

CONSTRUCTING A TRUTH TABLE FOR A LOGIC CIRCUIT

Once the Boolean expression for a


given logic circuit has been
determined, a truth table that shows
the output for all possible values of the
input variables can be developed.

Lets take the previous circuit as the


example:
A(B+CD)
There are four variables, hence 16 (24)
combinations of values are possible.
29

CONSTRUCTING A TRUTH TABLE FOR A LOGIC CIRCUIT

Evaluating the expression

To evaluate the expression A(B+CD), first


find the values of the variables that make
the expression equal to 1 (using the rules
for Boolean add & mult).
In this case, the expression equals 1 only if
A=1 and B+CD=1 because
A(B+CD) = 11 = 1

30

CONSTRUCTING A TRUTH TABLE FOR A LOGIC CIRCUIT

Evaluating the expression (cont)

Now, determine when B+CD term equals 1.


The term B+CD=1 if either B=1 or CD=1
or if both B and CD equal 1 because
B+CD = 1+0 = 1
B+CD = 0+1 = 1
B+CD = 1+1 = 1

The term CD=1 only if C=1 and D=1


31

CONSTRUCTING A TRUTH TABLE FOR A LOGIC CIRCUIT

Evaluating the expression (cont)

Summary:
A(B+CD)=1

When A=1 and B=1 regardless of the values of


C and D
When A=1 and C=1 and D=1 regardless of the
value of B

The expression A(B+CD)=0 for all other


value combinations of the variables.

32

CONSTRUCTING A TRUTH TABLE


FOR A LOGIC CIRCUIT
Putting the results
in truth table
format
A(B+CD)=1

When A=1
and B=1
regardless
of the
When
valuesA=1
of Cand
C=1
and D=1
and D
regardless of the
value of B

INPUTS

OUTPUT
OUTPUT

A
A

B
B

C
C

D
D

A(B+CD)
A(B+CD)

0
0
0
0

0
0
0
0

0
0
0
1

1
1
1
0

0
0
0
0
0

0
0
1
0
0
1

1
1
0
1
1
0

1
0
0
0
1
1

0
0
0
0
0
1
0
1
0
0
1

1
1
1
1
1
0
1
0
1
1
0

1
0
0
1
0
0
0
0
1
1

0
0
0
1
1
0
1
1
0
0

0
1
0
1
1
1
1
1
1

1
0
1
1
0
1
0
1
0

1
1
0
0
0
0
1
0

1
1
0
0
1
0
0
1

1
1

0
1
0

033
1
1

1
0

0
0
0
0
0
0
0
1
1
1

SIMPLIFICATION USING BOOLEAN ALGEBRA

A simplified Boolean expression uses


the fewest gates possible to implement
a given expression.
A

AB+A(B+C)
+B(B+C)

34

SIMPLIFICATION USING BOOLEAN ALGEBRA

AB+A(B+C)+B(B+C)
A

(distributive law)

(rule 7; BB=B)

AB+AB+AC+B+BC
AB+AC+B+BC

(rule 10; B+BC=B)

AB+A(B+C)+B(B+C)

(rule 5; AB+AB=AB)

AB+AB+AC+BB+BC B

AB+AC+B

(rule 10; AB+B=B)

B+AC

A
C

B+AC
35

THANK YOU

36

Vous aimerez peut-être aussi