Docsity

Boolean Algebra, Logic Functions, and Digital Logic Design - Prof. Vladimir Goncharoff, Study notes of Electrical and Electronics Engineering

Partial preview of the text

Download Boolean Algebra, Logic Functions, and Digital Logic Design - Prof. Vladimir Goncharoff and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Chapter 2: Boolean Algebra and Logic

Functions

CS 3402-- Digital Logic Design

Boolean Algebra

Algebraic structure consisting of:

  • a set of elements B
  • operations {AND, OR}

Notation: X AND Y X • Y XY

X OR Y X+Y

  • B contains at least two elements a & b such that ab

Note: switching algebra is a subset of Boolean algebra where B={0,

1}

Axioms of Boolean Algebra

1. Closure a , b in B ,

(i) a + b in B

(ii) a • b in B

2. Identities : 0, 1 in B

(i) a + 0 = a

(ii) a • 1 = a

3. Commutative Laws : a , b in B ,

(i) a + b = b + a

(ii) a • b = b • a

4. Associative Laws:

(i) a + (b+c) = (a+b)+c = a+b+c

(ii) a. (b.c) = (a.b).c = a.b.c

5. Distributive Laws :

(i) a + ( b • c ) = ( a + b ) • ( a + c )

(ii) a • ( b + c ) = ( a • b) + ( a • c)

6. Existence of the Complement :

exists a’ unique in B

(i) a + a’ = 1

(ii) a • a’ = 0

a’ is complement of a

Boolean Functions

A Boolean function consists of an algebraic expression formed

with binary variables, the constants 0 and 1, the logic operation

symbols, parenthesis, and an equal sign.

Example:

F(X,Y,Z) = X + Y’ Z or F = X + Y’ Z

X, Y and Z are Boolean variables

A literal: The appearance of a variable or its complement in a

Boolean expression

A Boolean function can be represented with a truth table

A Boolean function can be represented with a logic circuit

diagram composed of logic gates.

More than one way to map an expression to gates

E.g., Z = A' • B' • (C + D) = (A' • (B' • (C + D)))

From Boolean Expression to Gates

A

B

C

D

T

2

T

1

Z

Z

A

B

C

D

For each Boolean function, there is only one unique truth table

representation

=>Truth table is the unique signature of a Boolean function

Basic Logic Functions: NAND, NOR

NAND, NOR gates far outnumber AND, OR in typical designs

  • easier to construct in the underlying transistor technologies
  • they are functionally complete

Functionally Complete Operation Set:

  • A set of logic operations from which any Boolean function can be

realized (also called universal operation set)

  • E.g. {AND, OR, NOT} is functionally complete

The NAND operation is also functionally complete

  • => any Boolean function can be realized with one type of gate (the

NAND gate).

The NOR operation is also functionally complete

Basic Logic Functions: XOR, XNOR

XOR: X or Y but not both ("inequality", "difference")

XNOR: X and Y are the same ("equality", "coincidence")

(a) XOR (b) XNOR

Description

Z = 1 ifX has a different

value thanY

Gates

Truth Table

X

Y

Z X 0 0 1 1

Y

0

1

0

1

Z

0

1

1

0

Description

Z = 1 ifX has the same

value asY

Gates

Truth Table

X

Y

Z X 0 0 1 1

Y

0

1

0

1

Z

1

0

0

1

Simplification Using Boolean Algebra

Useful Theorems of Boolean Algebra:

1. Idempotency Theorem

a. X + X = X b. X • X = X

2. Null elements for + and • operators

a. X + 1 = 1 b. X. 0 = 0

3. Involution Theorem

(X’)’ = X

4. Absorption Theorem

a. X + XY = X b. X.(X+Y) = X

5. Simplification Theorem

a. XY + XY’ = X b. (X+Y).(X+Y’) = X

6. Another Simplification Theorem

a. X + X’Y = X + Y b. X.(X’ + Y) = X.Y

DeMorgan's Theorems

7. DeMorgan’s Theorem

a. (X+Y)’ = X’. Y’ b. (X.Y)’ = X’ + Y’

The complement of the sum is the product of the complements

The complement of the product is the sum of the complements

In general

a. (A+B+….+Z)’ = A’. B’. … .Z’

b. (A.B.C….Z)’ = A’ + B’ + ….+Z’

Truth Table (Unique representation)

Boolean Expressions

Logic Diagrams

From TO

Boolean Expression ==> Logic Diagram

Logic Diagram ==> Boolean Expression

Boolean Expression ==> Truth Table

Truth Table ==> Boolean Expression

Function Representations

Function Representations

F(X,Y,Z) = X + Y’Z + X’Y’Z + X’Y’Z’

Definitions:

Literal: A boolean variable or its complement

X X’ A B’

Product term: A literal or the logical product (AND) of multiple literals:

X XY XYZ X’YZ’ A’BC

Note: X(YZ)'

Sum term: A literal or the logical sum (OR) of multiple literals:

X X’+Y X+Y+Z X’+Y+Z’ A’+B+C

Note: X+(Y+Z)'

Product and Sum Terms --Definitions

SOP & POS -- Definitions

Sum of products (SOP) expression: The logic sum (OR) of multiple

product terms:

AB + A’C + B’ + ABC

AB’C + B’D’ + A’CD’

Product of sums (POS) expression: The logic product (AND) of multiple

sum terms:

(A+B).( A’+C).B’.( A+B+C)

(A’ + B + C).( C’ + D)

Note:

SOP expressions ==> 2-level AND-OR circuit

POS expressions ==> 2-level OR-AND circuit

Minterms

For functions of three variables: X, Y, and Z

Minterm Designation Bit Combination

X’Y’Z’

X’Y’Z

X’YZ’

X’YZ

XY’Z’

XY’Z

XYZ’

XYZ

m

m

m

m

m

m

m

m

The bit combination associated with each minterm is the only bit

combination for which the minterm is equal to1.

Example: X'Y'Z' = 1 iff X=0, Y=0, and Z=

Each bit represents one of the variables ( order is important) :

Un-complemented variable ==> 1

Complemented variable ==> 0

Maxterms

Maxterm Bit Combination Designmation

X + Y + Z

X + Y + Z’

X + Y’ + Z

X + Y’ + Z’

X’ + Y + Z

X’ + Y + Z’

X’ + Y’ + Z

X’ + Y’ + Z’

M

M

M

M

M

M

M

M

The bit combination associated with each

Maxterm is the only bit combination for which the

Maxterm is equal to 0.

Note: The i

th

Maxterm is the complement of

the i

th

minterm; That is M

i

= m

i