1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Digital design lec3 boolean and switching algebra

46 157 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 46
Dung lượng 170,05 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Boolean algebra, like any other axiomatic mathematical structure or algebraic system, can be characterized by specifying a number of fundamental things: 1. The domain of the algebra, that is, the set of elements over which the algebra is defined 2. A set of operations to be performed on the elements 3. A set of postulates, or axioms, accepted as premises without proof 4. A set of consequences called theorems, laws, or rules, which are deduced from the postulates

Trang 1

www.uet.vnu.edu.vn/~tutx

Trang 2

CÔNG

H Ọ C

NGH Ệ History

 in his book (a treatise): “An Investigation of the Laws of Thought”

 no application was made of Boolean Algebra until the late 1930s

 Nakashima in Japan (1937) and Shannon at MIT (1938), each

independently applied the algebra of Boole to the analysis of networks of relays (in telephone systems)

Trang 3

 In 1904, Huntington found that

 all of the results and implications of the algebra described by Boole could

be derived from only six basic postulates.

 B is the set of elements or constants of the algebra

 the symbols + and · are two binary operators(*)

 the overbar ¯ is a unary operator(*)

is a Boolean algebra if the following hold true:

(*) The terms binary operator and unary operator refer to the number of arguments

involved in the operation: two or one, respectively.

Trang 4

 There exists a 0 element in B such that

for every element a in B, 0 + a = a + 0 = a

 There exists a 1 element in B such that

for every element a in B, a = a · 1 = a

Trang 5

3. Commutativity (giao hoán)

Trang 6

CÔNG

H Ọ C

NGH Ệ The Huntington postulates

5.a B, there exists an element a-bar in the set B such that

a a

Switching algebra is a Boolean algebra in which the number of

elements in the set B is precisely 2.

Trang 7

 is a Boolean algebra in which the number of elements in the set B is

precisely 2

 The two binary operators, represented by the signs + and ·, are called

the OR and the AND, respectively.

 The unary operator, represented by the overbar ¯ , is called the NOT or

the complement operator.

Trang 8

a a

a

=

= +

a

a

a a

a a

a

a a a

a

a a

a

a a

a a a

a a

a a

a a

=

+

=

⋅ +

=

+

⋅ +

=

⋅ +

=

0

P-5(i)P-4(ii)P-5(ii)P-2(i)

Proof

(i)

(ii)

Trang 9

 Theorem 2

1 1

1

0 0

0

= +

= +

a a

) 0 (

0

0 0

=

⋅ +

=

a a

a a

a a

a

P-5(ii)P-4(i)P-2(i)P-5(ii)

P-2(ii)P-5(i)P-4(ii)P-2(ii)P-5(i)

Trang 10

Assume that a has 2 distinct

complements (not equal), a-bar and b

Then by P-5, we must have that:

0

and

0 and

1

and

= +

a a b

a

a a

b

a

b a

b a

b a a

a

b a

a a

=

⋅ +

=

⋅ +

b a

a b

a b a

b

a a

b b

=

⋅ +

=

⋅ +

P-4(i)

P-2(i)

Trang 11

 From this point, we will restrict our attention to switching algebras only.

 Switching algebra is basically a two-element Boolean algebra which,

obviously, has the two elements 0 and 1.

1 1

1

0 0

1

0 1

0

0 0

0

z = x · y y

x

Theorem 1(ii)Theorem 2(i)Postulate 3(ii)Theorem 1(ii)

Trang 12

1 0

1

1 1

0

0 0

0

z = x + y y

1 0

Trang 13

 NAND operation

0 1

1

1 0

1

1 1

0

1 0

0

z = x · y y

1

0 0

1

0 1

0

1 0

0

z = x + y y

Trang 14

1 0

1

1 1

0

0 0

0

z = x y y

x y

x

- Construct XOR gate from NOT, AND, and OR ?

Trang 15

 NXOR operation

1 1

1

0 0

1

0 1

0

1 0

0

z = x y y

x y

x

- Construct NXOR gate from NOT, AND, and OR ?

Trang 16

01

0

x ( ) x

Since the left column is identical to the right column and we have listed all possibilities, we have proved the result

Trang 17

 Theorem 5

Let x and y be two switching variables Then

( x y ) x x

x y

x

x

= +

+ 1

1 1

1

1 0

+ 1

0 0

1

0 0

+ 0

0 1

0

0 0

+ 0

0 0

0

+

Trang 18

x z

y

x

+ +

= +

y x

y x

x

= +

+

=

⋅ +

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

z x y

x z

y z

x y

x

+

⋅ +

= +

⋅ +

⋅ +

⋅ +

=

⋅ +

⋅ +

(i) (ii)

(i) (ii)

(i) (ii)

Trang 19

y x

Proof

This theorem may easily verified by complete enumeration

Exercise for Students

Trang 20

CÔNG

H Ọ C

NGH Ệ Algebra Implications – De Morgan’s Theorem

x y

x

w z

y x

w z

y x

w z

y x

w z

y x

⋅ +

=

⋅ +

=

⋅ +

=

+ +

Trang 21

 Corollary of De Morgan’s Theorem

n n

x x

x x

x x

x x

x x

x x

+ +

+

+

L L

L L

21

21

21

21

Expand the following function:

( xy + zy + wzx + z )

Trang 22

each assignment This list is called Truth Table.

 For example,

z y x

z y x

F ( , , ) = +

Trang 23

0 1

1 1

1 0

1 1

0 1

0 1

0 0

0 1

1 1

1 0

1 0

1 0

1 1

0 0

1 0

0 0

F (x, y, z) z

y x

z y x

z y x

- Write the Truth Table for the following switching function: F (x, y, z) = xyz + xy

2n assignment

possibilities

Trang 24

0 0

1

0 1

0

0 0

0

F (x, y) y

x

F (x, y) ???

Trang 25

 Alternatives to the tabular representation

 To list only the assignments for which a function is 1 or,

 To list those for which the function is 0

 F = 1 whenever x = 1 and y = 1

1 1

1

0 0

1

0 1

0

0 0

0

F (x, y) y

x

xy y

x

F ( , ) =

Trang 26

CÔNG

H Ọ C

NGH Ệ Canonical forms: Minterm - Maxterm

0 1

1 1

0 0

1 1

1 1

0 1

0 0

0 1

0 1

1 0

1 0

1 0

1 1

0 0

0 0

0 0

F (x, y, z) z

y x

+ +

=

If a product term involves all the variables of a function, it

is referred to as a Minterm

A SOP is made of minterms only

is called a canonical minterm expression or expansion of the

function F(x, y, z)

Trang 27

 Sum of Products (SOP) expression

0 1

1 1

1 0

1 1

0 1

0 1

0 0

0 1

1 1

1 0

1 0

1 0

1 1

0 0

1 0

0 0

F (x, y, z) z

y x

z y x

z y yz

x y

x

x x

z y yz

x z

z y x

z xy yz

x z

y x z

y x z

y x

z y x F

+

=

+ +

=

+ +

+ +

=

+ +

+ +

=

=

) (

) (

) , , (

Write the SOP expression and simplify the function !

Trang 28

CÔNG

H Ọ C

NGH Ệ Canonical forms: Minterm - Maxterm

0 1

1 1

1 0

1 1

0 1

0 1

0 0

0 1

1 1

1 0

1 0

1 0

1 1

0 0

1 0

0 0

F (x, y, z) z

y x

xyz z

y x z

y x z

y x

z y

x z

y x

z y

x

xyz z

y x z y x

xyz z

y x z

y x

z y x F z

y x F

+ +

+ +

+ +

=

=

=

) )(

)(

(

) , , ( )

, , (

Trang 29

 Product of Sums (POS) expression

0 1

1 1

1 0

1 1

1 1

0 1

0 0

0 1

0 1

1 0

0 0

1 0

1 1

0 0

0 0

0 0

F (x, y, z) z

y x

) )(

(

) )(

)(

(

) , , ( )

, , (

z y

x z y

x

z y

x z y

x z y

x

xyz z

y x yz

x z

y x z

y x

z y x F z

y x F

+ +

+ +

+ +

+ +

+ +

=

+ +

+ +

Trang 30

A C

B A

F ( , , ) = +

C B A ABC

C B A BC

A

C B B

A C

C B

A

C A

B

A

+ +

+

=

+ +

+

=

⋅ +

=

) (

) (

1 1

] [concensus

) )(

(

) )(

)(

(

) )(

)(

( 1

) )(

)(

)(

(

) )(

(

C A

B A

C B

C A

B A

C B

C A

B A

B C

A C

B A

A A

C B

A A B

A

AC B

A

+ +

=

+ +

+

=

+ +

+

=

+ +

+ +

=

+ +

=

+

=

4(ii)-P ))(

C C B A

B A

B

A

+++

+

=

++

=

++

=

+

+ +

+ +

+ +

+ +

=

Trang 31

10/8/2010 Xuan-Tu Tran 31

A + B + C = M 0

A B C =m 7 C

B A

A + B + C = M 1

A B C =m 6 C

B A

A + B + C = M 2

A B C =m 5 C

B A

A + B + C = M 3

A B C =m 4 C

B A

A + B + C = M 4

A B C =m 3 C

B A

A + B + C = M 5

A B C =m 2 C

B A

A + B + C = M 6

A B C =m 1 C

B A

A + B + C = M 7

A B C =m 0 C

B A

C B

A

Maxterm (M) Minterm (m)

Variable

M = m

Trang 32

A C

B A

C B A ABC

C B A BC

A

C B B

A C

C B

A

C A

B

A

+ +

+

=

+ +

+

=

⋅ +

=

) (

) (

1 1

) )(

)(

)(

( ) , ,

) 5 7 2 3 (

M m

Trang 33

 Construct a XOR gate from NOR and NOT

gates ?

 Construct a XOR gate from NAND and

NOT gates ?

y x y

x y

x

Trang 34

CÔNG

H Ọ C

NGH Ệ Simplification of Switching Functions

 Related to the number of terms and the number of literals in each term of the expression

 The complexity of an equation should be reduced

expressions

 Use postulates and other results to reduce the form of an expression

algebraically (require a good deal of experience)

 Use Karnaugh map (group of minterms are easily identified, limited

variables)

Trang 35

 Algebraic Manipulation

 Simplified expression: contains a minimal number of literals and terms

 Minimal SOP, Minimal POS

 All theorems and postulates are used to find the minimal form

 Depend on your experience !!!

 3 basic results are usually used for minimizing SOP expressions:

xy z

x yz

xy z

x

y x

y x x

y y

x xy

+

= +

+

+

= +

= +

: 3 Result

: 2 Result

: 1 Result (Verified using Distributivity)

Theorem 6, part 2(i)

Theorem 6, part 3(i) (consensus)

Trang 36

CÔNG

H Ọ C

NGH Ệ Simplification of Switching Functions

 Example:

wxy xyz

xz w z

x w z

y x w

wxy z

w

xy z

xy w

z w

wxy xyz

z w x z

w x

+

=

+ +

=

+ +

+

=

) (

) (

) (

) (

xy z

x yz xy

z x

y x y x x

y y x xy

+

= +

+

+

= +

= +

: 3 Result

: 2 Result

: 1 Result

Trang 37

 Algebraic Manipulation (cont’d)

 Example (for students):

D C B A CD

A BCD

ABC C

AB D

C B A

D C A CD

A AB

D C A CD

B CD

A B

A

CD A

BCD D

C A AB

CD A

BCD D

C B

A

CD A

BCD D

C B B

A

D C B A CD

A BCD

AB

D C B A CD

A BCD

C AB C

AB

+ +

=

+ +

+

=

+ +

+

=

+ +

+

=

+ +

+

=

+ +

+

=

+ +

+ +

=

)]

( )

( )

( [

] [

)]

( [

] ) (

) [(

xy z

x yz xy

z x

y x y x x

y y x xy

+

= +

+

+

= +

= +

:

3

Result

:

Trang 38

CÔNG

H Ọ C

NGH Ệ Simplification of Switching Functions

 Algebraic Manipulation (cont’d)

 Example:

z z

w y

z x

z z

w y y

z x x

z x z

w y z

y

x

+ +

+ +

+

=

+ +

+ +

+

= +

+ +

+

+

)]

( [

) (

) (

None of the listed results can be applied for the above expression

It’s OK or NOT yet ?

xy z

x yz xy

z x

y x y x x

y y x xy

+

=+

+

+

=+

=+

Trang 39

 Prime implicants

 An implicant is a "covering" (sum term or product term) of one or more

minterms in a sum of products (or maxterms in a product of sums) of a boolean function

 In an SOP expression, each of the product terms  an implicant of the function if it implies the function (e.g., if the product term is 1 then the

function is also 1).

Trang 40

xyz yz

x w xyz

yz x

w

+

=

+ +

+

= ( ) ( )

wxyz yz

x w xyz

w yz

x w z

y x w

 Each of the minterm is an implicant

 Each of these products is also an implicant

yz

=  is also an implicant.

Smaller in term of the number of literals

A prime implicant of a function is an implicant that cannot be covered by a

Trang 41

 Minimal expression

 Any other expression having fewer terms and literals will not represent the original function

Trang 42

 M Karnaugh published an article describing a geometrical method for

finding a minimal closed cover (1953)  Karnaugh map method

 Based on mapping minterms onto a surface in such a way that minterms that differ in one literal are adjacent to each other on the surface

 Reason: when 2 minterms differ in one literal, they can be combined to form

a product term which has this literal missing

 For example, Ā BC and ABC differ in only one literal ( Ā and A)  the sum reduces to A BC + ABC = BC

Trang 43

 Karnaugh map

 All minterms in the column labeled B contain the

literal B, all those in the other column contain

B-bar Similar for the rows

 1 in each square corresponds to a minterm of the

function f

 Prime implicants can be found by grouping the 1

cells into as large a block of adjacent cells as possible.

 For example, the pair of cells and

group together to give

B A

B

) , ( A B f

B A

B A

A A

B

B A B

Trang 44

 1-cube: a single square

 2-cube: two adjacent squares are taken together

 4-cube: two adjacent 2-cubes or two 2-cubes

have a long edge in common.

 The largest cube of 1s represent the prime

B A

B A

B A

f ( , ) = +

A

Trang 45

 Karnaugh map for 3 variables

 Two 2-variable Karnaugh map are placed side by side

after reflecting one of the two 2-variable maps  get a 3-variable map

z y x

z xy

xyz z

y x

z y x

Trang 46

CÔNG

H Ọ C

NGH Ệ Simplification of Switching Functions

 Karnaugh map for 4 variables

 Two 3-variable Karnaugh map are

placed side by side after reflecting one of the two 3-variable maps 

get a 4-variable map

 How to find prime implicants for the

w

y

Ngày đăng: 30/04/2018, 13:56

TỪ KHÓA LIÊN QUAN