Sie sind auf Seite 1von 26

Chapter 2 Boolean Algebra

Youngsoo Shin
KAIST Spring 2007

2.1 Introduction
Basic mathematics for logic design: Boolean algebra Switching algebra: two-valued Boolean algebra Boolean Variable: X, Y, can have only two Variable state values (0, 1) Boolean Operations
Binary op: AND (), OR (+) Unary op: NOT (`)
Youngsoo Shin/EE/KAIST 2

2.2 Basic Operations


NOT (complement, inverse)

0 = 1 X = 1 if X = 0

and and

1 = 0 X = 0 if X = 1

Gate Symbol

X
Youngsoo Shin/EE/KAIST

X
3

2.2 Basic Operations


AND

00 = 0
Truth Table

0 1 = 0
A B 0 0 1 1 0 1 0 1

10 = 0
C=AB 0 0 0 1

1 1 = 1

Gate Symbol

Youngsoo Shin/EE/KAIST

2.2 Basic Operations


OR

0+0 =0
Truth Table

0 +1 = 1
A B 0 0 1 1 0 1 0 1

1+0 =1
C=A+B 0 1 1 1

1 +1 = 1

Gate Symbol

Youngsoo Shin/EE/KAIST

2.2 Basic Operations


Apply to Switch

Youngsoo Shin/EE/KAIST

2.3 Boolean Expressions and Truth Tables


Boolean Expression:

AB + C

Circuit of logic gates:

Youngsoo Shin/EE/KAIST

2.3 Boolean Expressions and Truth Tables


Boolean Expression:
Circuit of logic gates:

[A(C+D)] + BE

Logic Evaluation : A=B=C=1, D=E=0

Youngsoo Shin/EE/KAIST

2.3 Boolean Expressions and Truth Tables


Literal: a variable or its complement in a Boolean expression
abc + ab + abc + bc

Youngsoo Shin/EE/KAIST

2.3 Boolean Expressions and Truth Tables


Truth Table

F = A + B

A B 0 0 1 1 0 1 0 1

A 1 1 0 0

F = A + B 1 1 0 1

Youngsoo Shin/EE/KAIST

10

2.3 Boolean Expressions and Truth Tables


Proof using Truth Table AB + C = (A+C)(B+C)
A B C 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1
11

AB

AB + C

A+C

B + C

(A + C) (B + C)

Youngsoo Shin/EE/KAIST

Digital System Design


System design Logic design Physical design

f = [A(C+D)] + BE

Youngsoo Shin/EE/KAIST

12

Digital System Design


Specifications Specifications High-level High-level Description Description
Behavioral VHDL, C

Functional Functional Description Description


Structural VHDL

Synthesis

Placed Placed & Routed & Routed Design Design


Packaging

Physical Design

Gate-level Gate-level Design Design

Technology Mapping

Logic Logic Description Description


X=(AB*CD)+ (A+D)+(A(B+C)) Y = (A(B+C)+AC+ D+A(BC+D))

Fabrication

Youngsoo Shin/EE/KAIST

13

2.4 Basic Theorems


Operations with 0, 1 Idempotent Laws Involution Laws Complementary Laws
Example

X+0=X X+1=1 X+X=X (X) = X X + X = 1

X1=X X0=0 XX=X

X X = 0

(AB + D)E + 1 = (AB + D)(AB+D) =

Youngsoo Shin/EE/KAIST

14

2.5 Commutative, Associative, and Distributive Laws


Commutative Laws: Associative Laws: XY = YX X+Y=Y+X (XY)Z = X(YZ) = XYZ (X + Y) + Z = X + (Y + Z) = X + Y + Z

Proof of Associative Law for AND

X 0 0 0 0 1 1 1 1
Youngsoo Shin/EE/KAIST

Y 0 0 1 1 0 0 1 1

Z 0 1 0 1 0 1 0 1

XY

YZ

(XY)Z

X(YZ)

15

2.5 Commutative, Associative, and Distributive Laws

3-input AND gate

ABC = 1

iff

A = B = C = 1

3-input OR gate

A + B + C = 0
Youngsoo Shin/EE/KAIST

iff

A = B = C = 0
16

2.5 Commutative, Associative, and Distributive Laws


Distributive Laws: X(Y + Z) = XY + XZ X + YZ = (X + Y)(X + Z)

Proof

Youngsoo Shin/EE/KAIST

17

2.6 Simplification Theorems


Useful Theorems for Simplification

XY + XY = X X + XY = X (X + Y)Y = XY

(X + Y)(X + Y) = X X(X + Y) = X XY + Y = X + Y

Proof

Youngsoo Shin/EE/KAIST

18

2.6 Simplification Theorems


Examples

F = A(A + B) = AB

Z = ABC + A Z = [A + BC + D + EF][A + BC + (D + EF)] Z = (AB + C)(BD + CE) + (AB + C)

Youngsoo Shin/EE/KAIST

19

2.7 Multiplying Out and Factoring


SOP (sum-of-products) form:
all products are the products of only single variables
Examples

AB + CDE + ACE ABC + DEFG + H A + B + C + DE (A + B)CD + EF


Distributive Laws X(Y + Z) = XY + XZ X + YZ = (X + Y)(X + Z)

Multiplying out to get SOP

(A + BC)(A + D + E)

Youngsoo Shin/EE/KAIST

20

2.7 Multiplying Out and Factoring


POS (product-of-sums) form:
all sums are the sums of single variables
Examples

(A + B)(C + D + E)(A + C + E) (A + B)(C + D + E)F ABC(D + E)


Distributive Laws X(Y + Z) = XY + XZ X + YZ = (X + Y)(X + Z)

Factoring to get POS

A + BCD AB + CD

Youngsoo Shin/EE/KAIST

21

2.8 DeMorgans Laws


DeMorgans Laws
Proof

(X + Y) = XY (XY) = X + Y

DeMorgans Laws for n variables

(X1 + X2 + X3 + + Xn) = X1X2X3Xn (X1X2X3Xn) = X1 + X2 + X3 + + Xn


Example

F = AB + AB
Youngsoo Shin/EE/KAIST

F =
22

2.8 DeMorgans Laws


Dual:
dual is formed by replacing AND with OR, OR with AND, 0 with 1, 1 with 0

(XYZ)D = X + Y + Z + (X + Y + Z + )D = XYZ (AB + C) = (AB)C = (A + B)C, so (AB + C)D = (A + B)C

Youngsoo Shin/EE/KAIST

23

Boolean Algebra
Boolean space: BN = {0, 1}N
N-dimensional cube (N-hypercube)

Boolean algebra
Boolean space Operations (+, )

B3={0,1}{0,1} {0,1} ={000, 001, 010, 011, 100, 101, 110, 111}
c 001 010 011 111

101 110

B4
000 b
Youngsoo Shin/EE/KAIST

100

24

Boolean Algebra
Consider Boolean expression f = ab + ac + bc + abc What do we want to achieve?
c 011 111

abc f 000 001 010 011 100 101 110 111


b
Youngsoo Shin/EE/KAIST

001 010

101 110

000

100

25

Summary
2.1 Boolean algebra, switching algebra 2.2 Boolean operations: NOT, AND, OR 2.3 Boolean expressions 2.4 Basic theorems
Operations w/ 0 and 1, idempotent laws, involution law, complementarity

2.5 Commutative, Associative, and Distibutive Laws 2.6 Simplification theorems 2.7 SOP, POS 2.8 DeMorgans laws

Youngsoo Shin/EE/KAIST

26

Das könnte Ihnen auch gefallen