Você está na página 1de 53

2-1

( x  y)  z ! x  ( y  z ) x y ! yx

e x ! xe ! x , x y ! e

x  ( y z ) ! ( x  y) ( x  z )

2-2
1.(a) (b) 2. (a) (b) 3. (a) (b) + + + 0 1
x0 ! 0 x ! x x 1 ! 1 x ! x
x y ! yx x y ! y x

4.(a) + x ( y  z) ! ( x y)  ( x z) (b) + x  ( y z ) ! ( x  y )( x  z ) xd B 5. xB ( ) (a). x  xd 1 ! x (b). x x ! 0 x{ y x, y B 6.

2-3
x x ! x (b) x 1 (a)  x ! x x 0 ! 0 (b) 2 (a)x  1 ! 1 ( xd! x )d 3 4

x  ( y  z) ! ( x  y)  z (a) (b) x( yz ) ! ( xy ) z

5 (x ! yd (a) y )d xd ( xy !  (b) )d xd yd 6 x (a) xy ! x x( (b) x  y ) ! x

Boolean Laws
Name Identity law Null law Idempotent law Inverse law Associative law Distributive law Absorption law DeMorgans law AND form 1A = A 0A = 0 AA = A AA = 0 (AB)C = A(BC) A(A+B) = A AB = A + B OR form 0+A=A 1+A= 1 A+A=A A+A= 1 A+ B = B +A (A+B)+C = A+(B+C) A + AB = A A + B = AB

Commutative law AB = BA

A+BC = (A+B)(A+C) A(B+C) = AB + AC

Why do we need boolean laws?


These laws allow us to simplify expressions. The has the effect of Making the expression smaller and easier to manipulate Removing redundancy from expression Using fewer logic gates
This usually translates into smaller hardware However, not logic structures cannot take advantage of simplification May wish to reduce other metric like packages

Examples of application of boolean laws


Simplify the following expression:

A B C  A B C  B (A  A) B C  B 1 B C  B BC  B B (C 1) B

2-4
---1 0

z z 1. xy  xd yz ! xy  xd   2. ( x  y )( xd z )( y  z ) ! ( x  y )( xd z )

! B C .... 1. ( A  B  C  ....  F )d Addd F d !    2. ( ABC....F )d Ad Bd C d ....  F d

2-5

(minterm)

(maxterm)

(Sum of Products) (Product of Sums)

(minterm)
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 xyz xyz xyz xyz xyz xyz xyz xyz m0 m1 m2 m3 m4 m5 m6 m7

(maxterm)

x+y+z x+y+z x+y+z x+y+z x+y+z x+y+z x+y+z x+y+z

M0 M1 M2 M3 M4 M5 M6 M7

Truth Tables
Truth tables show all possible inputs of a function and the values that the output takes for all those inputs. Given n inputs, there are 2n possible input combinations. Order the rows of the table in increasing order for binary word of n bits.
A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 f(A,B,C) 0 0 0 1 0 1 1 1

From Truth Tables to Min Term Expressions


It is trivial to convert a truth table to a min term expression. The individual parts of a min term expression (the AND parts) describe when the function will be one. Any one of the and parts will cause the expression to be true. At all other times the expression is false. Only one AND term can be true for any given input set.

Forming min term expressions


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 f(A,B,C) 0 0 0 1 0 1 1 1
A B C

A B C A B C A B C

Expression is one here

Therefore the following expression totally captures the function


M ! A B C  A B C  A B C  A B C

Implementing this with logic


ABCABC ABC

ABC

M
ABC

ABC

Dont Care cases in Boolean expressions


A 0 0 0 1 X 1 B 0 1 X 0 0 1 C 0 0 1 0 1 X f(A,B,C) 0 0 1 0 1 1 Therefore the following expression totally captures the function Expression is one here
AC

B C
A B

M ! A C  BC  A B

Implementing any boolean function


1 2 3 4 5 Write down the truth table for the function Provide inverters to generate the complement of each input Draw an AND gate for each term with a 1 in the result column Wire the AND gate to the appropriate input lines Feed the output of all and gates into an OR gate

Convert the following truth table to a boolean expression


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 f(A,B,C) 1 0 1 0 0 0 1 1

Some examples ....


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 f(A,B,C) 1 0 1 0 0 0 1 1
f=

A B C 

Some examples ....


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 f(A,B,C) 1 0 1 0 0 0 1 1
f=

B C  A B C 

Some examples ....


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 f(A,B,C) 1 0 1 0 0 0 1 1
f=

A B C  A B C  A B C 

Some examples ....


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 f(A,B,C) 1 0 1 0 0 0 1 1
f=

A B  A B  A B  A B

Implement it with logic devices

Implement it with logic devices

Implement it with logic devices

Implement it with logic devices


A B

A B

A B

A B

Design of logic from Truth Table to NAND gates


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 f(A,B,C) 0 1 0 1 0 1 1 0
A B C

From Truth Table to NOR gates


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 f(A,B,C) 0 1 0 1 0 1 1 0
A B C

Sum-of-Products (Minterms)
An expression is on a sum-of-products form if it is formed by the sum of products, and all the products are formed by single variables only. Examples:
AB + CDE + ACE ABC + DEFG + H A + B + C + DE

The following expressions are not sum-of-products:


(A+B)CD + EF (X + Y)(X + Z)

Product-of-Sums (Maxterms)
Similarly, a product-of-sums is formed by the product of sums in which all the sums are formed by single variables only. Examples:
(A + B)(C + D + E)(A + C + E) (A + B)(C + D +E)F ABC(D + E)

The following expressions are not sum-of-products:


(A+B)CD + EF A + B + C + DE

Max Term expressions


Min term expressions have terms which describe when the function is true. Oring these terms together means the function becomes true when any of them is true Max term expressions have terms which describe when a function is false These terms are Anded together which means that the expression if false if any one of the terms is false
f ! (......) (......) (......) (......)
All terms must be true

Why use Max term expressions?


If there are more 0s in the function than 1s, then the Max term expression is smaller. Each term is built as an OR expression Max term expressions use different gates. Sometimes there are spare gates of a paricular type available and these can be used

From Truth Table to Max term expression


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 f(A,B,C) 0 0 0 1 0 1 1 1 Expression is false here

A BC A BC A BC

A BC
Therefore the following expression totally captures the function

! ( A  B  C) ( A  B  C) ( A  B  C) ( A  B  C

Which expressions is smaller?


A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 f(A,B,C) 1 1 1 1 1 1 1 0

As a Min term expression: M ! A B C  A B C  A B C


A B C  A B C A B C  A B C

As a Max term expression:


M ! A BC

As a complemented Min term expression M ! A BC M ! A BC

Cost of Implementing a Logic Circuit

The cost of implementing a logic circuit is related to the number of gates used and with the number of inputs in each gate. A literal is a boolean variable or its complement.

Cost of Implementing a Logic Circuit


The cost of a boolean equation Bi represented in a sum-of-products form is given by:
k 1

C ( Bi ) !
j !0

Bi  Bi

Bi is related to the number o terms in Bi , and j Bi is related to the number o literals in the

here k is the number o terms in Bi ,

j th term o Bi .

Cost of Implementing a Logic Circuit


C ( Bi ) ! Pj Bi  O Bi
j !0 k 1

m Pj Bi ! 0 m O Bi ! 0

if the j th term of Bi has m literals if the j th term of Bi has 1 literals if Bi has m terms if Bi has 1 term.

Cost of a Logic Circuit Examples


C ( Bi ) ! Pj Bi  O Bi
j !0 k 1

What is the cost of the following boolean equations?


f1(w,x,y,z) = wxyz + wxyz C(f1) = 4+4+2=10 f2(w,x,y,z) = w + x + yz + yz C(f2) = 0+0+2+2+4=8
g1(XYZ) = XY + XZ + YZ C(g1) = 2+2+2+3=9 g2(XYZ) = XY + XZ C(g2) = 2+2+2=6 h1(a,b) = ab C(h1) = 2 + 0 = 2 h2(a,b) = b C(h2) = 0 + 0 = 0

m Pj Bi ! 0 m O Bi ! 0

if the j th term of Bi has m literals if the j th term of Bi has 1 literals if Bi has m terms if Bi has 1 term.

Ex:

( A, B, C ) ! (1,4,5,6,7) d , B, C ) ! (0,2,3) ! m0  m2  m3 (A Fd F ! (m0  m2  m3 )d m0 m2 m3 ! d d d ! M 0 M 2 M 3 ! (0,2,3) mj ! M j

F1 ! yd xy  xd d  yz

F ! x ( yd z )( xd y  zd   )

2-6
16 1. F0 ! 0 F1 ! xy 2.AND( ) F2 ! xyd 3.Inhibition( ) F3 ! x 4.Transfer( ) F4 ! xd y 5.Inhibition( ) F5 ! y 6.Transfer( )  y 7. Exclusive-OR( - ) F6 ! xyd xd 8. OR( ) F7 ! x  y

9.NOR( ) 10.Equivalence( 11.Complement( 12.Implication( 13.Complement( 14.Implication( 15.NAND( ) 16.Identity(

F8 ! ( x  y )d yd ) F9 ! xy  xd

) F10 ! yd
F11 ! x  yd ) F12 ! xd  ) F13 ! xd y F14 ! ( xy )d

F15 ! 1

2-7

2-8
(SSI) (MSI) (LSI) (VLSI)

TTL ECL MOS CMOS -

Você também pode gostar