60
Gate-Level Minimization EE 200 Digital Logic Circuit Design Dr. Abdulaziz Tabbakh College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals

Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

Gate-Level Minimization

EE 200

Digital Logic Circuit Design

Dr. Abdulaziz Tabbakh

College of Computer Sciences and Engineering

King Fahd University of Petroleum and Minerals

Page 2: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 2

Outline

K-Map Method

Four-variable K-Map

POS Simplification

Don’t Care Conditions

NAND and NOR Implementation

Other Two-Level Implementations

Exclusives-OR Function

Page 3: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 3

Introduction

The design task of finding an optimal gate-level

implementation of the Boolean functions.

Page 4: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 4

The Map Method

The complexity of the digital circuit that implements a

Boolean function is related to the complexity of the

algebraic expression from which the circuit is

implemented.

Each Boolean function has:

Unique truth table

Many different, but equivalent, algebraic expression

The map is pictorial form of a truth table

It is known as the Karnaugh map or K-map

Page 5: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 5

K-map

A K-Map is a diagram made up of squares, with each

square representing one minterm of the function to be

minimized.

Adjacent minterms are combined to form simpler terms.

The map presents a visual diagram of all possible ways

a function may be expressed in standard form.

Page 6: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 6

K-map

The simplified expressions produced either SOP or POS

The simplest algebraic expression means:

Minimum number of terms ( minimum number of gates)

Smallest number of literals in each term ( less inputs to gates)

the simplest expression is not unique

Page 7: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 7

2-variable K-map

(a) F=m3

= xy

(b) F=m1+m2+m3

= x’y+xy’+xy

= x+x’y

= (x+x’)(x+y)

= x+y

Page 8: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 8

3-variable K-map

Any two adjacent squares in the map differ by only one

variable

𝑚5 +𝑚7 = 𝑥𝑦’𝑧 + 𝑥𝑦𝑧 = 𝑥𝑧(𝑦’ + 𝑦) = 𝑥𝑧

Any two minterms in adjacent squares (vertically or

horizontally, but not diagonally) can be grouped together to

remove the dissimilar variable

Page 9: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 9

Example

Simplify

F(x,y,z)= Ʃ(2,3,4,5)

F = xy’+x’y

Simplify :F(x,y,z)= Ʃ(3,4,6,7)

Page 10: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 10

Example

Simplify

F(x,y,z)= Ʃ(3,4,6,7)

F = xz’+yz

yz

x 00 01 11 10

0 1

1 1 1 1

ZY

X

Page 11: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 11

3-variable K-map

The number of adjacent squares that may be combined

must always represent a number that is a power of two

More adjacent squares product term with fewer

literals

One square represents one minterm (a term with three literals.)

Two adjacent squares represent a term with two literals

Four adjacent squares represent a term with one literal

Eight adjacent squares cover the entire map and produce a

function F=1.

Page 12: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 12

Example

Simplify

F(x,y,z)= Ʃ(0,2,4,5,6)

F = z’+xy’

yz

x 00 01 11 10

0 1 1

1 1 1 1

Z

Y

X

Page 13: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 13

Example

Let the Boolean function

F = AB + A’C + A’BC’

Express in Sum-Of-minterms

Minimize.

Convert to Canonical form

F = ABC + ABC’ + A’BC + A’B’C + A’BC’

Fill in the map

F= (1,2,3,6,7)

= B + A’C

Solve Example 3.4 page 95

bc

a 00 01 11 10

0 1 1 1

1 1 1

c

b

a

Page 14: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 14

4-variable K-map One square represents one minterm, giving a term with four literals.

Two adjacent squares represent a term with three literals.

Four adjacent squares represent a term with two literals.

Eight adjacent squares represent a term with one literal.

Sixteen adjacent squares produce a function that is always equal to

1

Page 15: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 15

Example

Simplify

F (w, x, y, z) = Ʃ(0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 14)

F = y’+w’z’+xz’

yz

wx 00 01 11 10

00 1 1 1

01 1 1 1

11 1 1 1

10 1 1

Z

Y

X

W

Page 16: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 16

Example

F = A’B’C’ + B’CD’ + A’BCD’ + AB’C’ = B’D’ + B’C’ + A’CD’

Page 17: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 17

Prime Implicants

In choosing adjacent squares in a map, we must ensure

that:

All minterms of the function are covered when we combine

squares

The number of terms in the expression is minimized

No redundant terms

Sometimes there might be two or more expressions

that satisfy the simplification criteria.

Page 18: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 18

Prime Implicant

The procedure for combining squares in the map may be

made more systematic if we understand the meaning of

two special types of terms

A prime implicant is a product term obtained by

combining the maximum possible number of adjacent

squares in a map.

If a minterm is covered by only one prime implicant, that

prime implicant is said to be essential prime implicant.

The prime implicants of a function can be obtained from

the map by combining all possible maximum numbers of

squares.

Page 19: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 19

Example

F(A, B, C, D) = ∑(0, 2, 3, 5, 7, 8, 9, 10, 11, 13, 15)

cd

ab 00 01 11 10

00 1 1 1

01 1 1

11 1 1

10 1 1 1 1

d

c

b

a

Page 20: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 20

Example

Page 21: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 21

Example

The simplified expression is obtained from the logical

sum of the two essential prime implicants and any two

prime implicants that cover minterms m3, m9, and m11

The simplified expression is obtained from the logical sum of

all the essential prime implicants, plus other prime

implicants that may be needed to cover any remaining

minterms not covered by the essential prime implicants.

Page 22: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 22

Product of Sums Simplification

When combining minterms, we get SOP out of the K-

MAP simplification process.

If we combine maxterms (0 squares) we get the

compliment of F (F’).

Using DeMorgan’s Theorems, we can get F as a product

of sums (POS)

Page 23: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 23

Example

F(A, B, C, D) = Σ(0, 1, 2, 5, 8, 9, 10)

F(A, B, C, D) = B’D’ + B’C’ + A’C’D

F’ = AB + CD + BD’

F’’= F = (A’ + B’)(C’ + D’)

(B’ + D)

Page 24: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 24

Gate-Level Implementation

the implementation of a function in a standard form is

said to be a two-level implementation. The two-level

implementation may not be practical, depending on the

number of inputs to the gates.

Page 25: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 25

The 1’s of the function represent the minterms and the

0’s represent the maxterms. The map for this function

For the sum of products,

we combine the 1’s to obtain:

F= x’z + xz’

For the product of sums,

we combine the 0’s to obtain:

F’=xz+x’z’ F = (x’+z’)(x+z)

Convert PO Maxterms to K-map

Page 26: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 26

K-map from POS

To enter a function expressed in product-of-sums form

into the map, use the complement of the function to find

the squares that are to be marked by 0’s.

Marking 0’s in the squares representing the minterms of

F’. The remaining squares are marked with 1’s.

Page 27: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 27

Don’t Care Conditions

Functions that have unspecified outputs for some input

combinations are called incompletely specified functions.

We DON’T CARE what value is assumed by the function

for the unspecified minterm.

call the unspecified minterms of a function don’t-care

conditions.

can be used on a map to provide further simplification of the

Boolean expression.

Don’t cares cannot be marked with ‘1’ or ‘0’ so they are

marked with ‘x’

Don’t cares can be assumed ‘1’ or ‘0’ to simplify the

function.

Page 28: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 28

Example

Simplify the Boolean Function

F(w, x, y, z) = (1, 3, 7, 11, 15)

Which has the don’t care conditions: d(w, x, y, z) = (0, 2, 5)

Sol: F = yz + w’x’

Or F = yz + w’z

yz

wx 00 01 11 10

00 x 1 1 x

01 x 1

11 1

10 1

Z

Y

X

W

Page 29: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 29

Simplification with Don’t Cares

To get the simplified expression in sum-of-products form,

we must include all 1’s in the map, but we may or may

not include any of the X’s

The two functions obtained are not algebraically equal,

but both cover the specified minterms but different

don’t care conditions (Both are VALID SOLUTIONS)!

It is also possible to obtain a simplified product-of-sums

expression.

Page 30: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 30

NAND and NOR Implementations

Digital circuits are frequently constructed with NAND or

NOR gates rather than with AND or OR gates.

NAND and NOR gates are easier to fabricate with

electronic components and are the basic gates used in

all IC digital logic families.

NAND and NOR is universal gates because any digital

system can be implemented with it.

Page 31: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 31

NAND Implementation

The basic AND, OR, and NOT gates can be

implemented using NAND gates only.

Page 32: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 32

NAND Implementation

A convenient way to implement a Boolean function with

NAND gates is to obtain the simplified Boolean function

in terms of Boolean operators and then convert the

function to NAND logic.

Two equivalent graphic symbols for a NAND gate

Page 33: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 33

NAND Implementation

The implementation of Boolean functions with NAND

gates requires that the functions be in sum-of-products

form.

Example:

Implement 𝐹 = 𝐴𝐵 + 𝐶𝐷 using NAND gates.

Page 34: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 34

Example

Implement F (x, y, z) = (1, 2, 3, 4, 5, 7) with NAND gates

Page 35: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 35

2-Level NAND Implementation

The procedure for implementing a two-level circuit with

NAND gates:

1. Simplify the function and express it in sum-of-products form.

2. Draw a NAND gate for each product term of the expression

that has at least two literals. The inputs to each NAND gate are

the literals of the term. This procedure produces a group of

first-level gates.

3. Draw a single gate using the AND-invert or the invert-OR

graphic symbol in the second level, with inputs coming from

outputs of first-level gates.

4. A term with a single literal requires an inverter in the first level.

However, if the single literal is complemented, it can be

connected directly to an input of the second level NAND gate.

Page 36: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 36

Multi-Level NAND Implementation

A logic diagram with a pattern of alternating levels of AND and OR gates

can easily be converted into a NAND circuit with the use of mixed notation

Page 37: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 37

Multi-Level NAND Implementation

The general procedure for converting a multilevel AND–

OR diagram into an all-NAND diagram using mixed

notation is as follows:

1. Convert all AND gates to NAND gates with AND-invert graphic

symbols.

2. Convert all OR gates to NAND gates with invert-OR graphic

symbols.

3. Check all the bubbles in the diagram. For every bubble that is

not compensated by another small circle along the same line,

insert an inverter (a one-input NAND gate) or complement the

input literal.

Page 38: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 38

Example

Page 39: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 39

NOR Implementation

The NOR operation is the dual of the NAND operation.

Therefore, all procedures and rules for NOR logic are the

duals of the corresponding procedures and rules

developed for NAND logic.

Page 40: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 40

NOR Implementation

A convenient way to implement a Boolean function with

NOR gates is to obtain the simplified Boolean function in

terms of Boolean operators and then convert the function

to NOR logic.

Two equivalent graphic symbols for a NOR gate

Page 41: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 41

NOR Implementation

The implementation of Boolean functions with NOR

gates requires that the functions be in product-of-sums

form.

Example: 𝐹 = (𝐴 + 𝐵)(𝐶 + 𝐷)𝐸

Page 42: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 42

Example

Page 43: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 43

Other Two-Level Implementations

Some (but not all) NAND or NOR gates allow the

possibility of a wire connection between the outputs of

two gates to provide a specific logic function. This type of

logic is called wired logic

Wired logic implements Boolean functions in other two-

level forms. Examples are open collector TTL NAND

gates and ECL NOR gates.

The wired-gate is not a physical gate, but only a symbol to designate the

function obtained from the indicated wired connection.

Page 44: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 44

Wired Logic

𝐹 = (𝐴𝐵)′ (𝐶𝐷)′ = (𝐴𝐵 + 𝐶𝐷)′ = (𝐴′ + 𝐵′)(𝐶′ + 𝐷′)

Called an AND–OR–INVERT function

𝐹 = (𝐴 + 𝐵)’ + (𝐶 + 𝐷)’ = [(𝐴 + 𝐵)(𝐶 + 𝐷)]’

called an OR–AND–INVERT function

The wired-logic gate does not produce a physical second level gate. since it is just a wire

connection. we will consider above circuits as two-level implementations.

Page 45: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 45

Nondegenerate Forms Considering 4 types of gates: AND, OR, NAND, NOR.

There are 16 combinations for two level forms,

8 combinations are degenerate (AND-AND, OR-OR, etc) that degenerate to a single operation. (Ex. F= (AB) (CD) )

8 are non-degenerate (produces SOP/POS):

AND-OR OR-AND

NAND-NAND NOR-NOR

NOR-OR NAND-AND

OR-NAND AND-NOR

Page 46: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 46

AND-OR-INVERT Implementation

The two forms NAND-AND and AND-NOR are equivalent

forms

The AND–OR–INVERT implementation is similar to AND-

OR (SOP), except for the inversion

Page 47: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 47

OR-AND-INVERT Implementation

The OR–NAND and NOR–OR forms perform the OR–

AND–INVERT function.

The OR–AND–INVERT implementation requires an

expression in POS form

Page 48: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 48

Summary

it is convenient to use the simplification of F’. When F’ is

implemented in one of these forms, we obtain the F in the

AND–OR (SOP) or OR–AND (POS) form.

Page 49: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 49

Example

Implement the function in the Map shown into AND-

NOR, NAND-AND, OR-NAND, NOR-OR forms.

Page 50: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 50

Example

The OR–AND–INVERT forms require a simplified

expression of the complement of the function in POS

form.

Page 51: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 51

Exclusive-OR Function

The exclusive-OR (XOR), denoted by the symbol ⨁, is a

logical operation that performs the following Boolean

operation: 𝑥⨁𝑦 = 𝑥’𝑦 + 𝑥𝑦’

The exclusive NOR, also known as equivalence,

performs the following Boolean operation (𝑥⨁𝑦)′ = 𝑥𝑦 + 𝑥′𝑦’

Page 52: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 52

Identities of XOR

The following identities apply to the exclusive-OR

operation:

Exclusive-OR operation is both commutative and

associative

It is possible to use exclusive-OR gates with three or more inputs.

Page 53: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 53

XOR Implementation

Multi-input XOR gates are difficult to fabricate with

hardware.

Even a two-input gate is usually constructed with other

types of gates.

It is particularly useful in

arithmetic operations and

error detection and

correction circuits.

Page 54: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 54

Odd Functions

The exclusive-OR operation with three or more variables

can be expressed as:

The multiple-variable exclusive-OR operation is defined

as an odd function (‘1’ when odd number of variables are

equal to 1)

001

010

100

111

Page 55: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 55

Odd and Even Functions

In general, an n-variable XOR function is defined as the

logical sum of the (2n/2) minterms whose binary

numerical values have an odd number of 1’s.

The complement of an odd function is an even function.

Page 56: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 56

Four-Inputs Odd Function

Consider now the four-variable exclusive-OR operation.

By algebraic manipulation, we can obtain the sum of

minterms for this function:

Page 57: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 57

Parity Generation and Checking

A parity bit is an extra bit included with a binary message

to make the number of 1’s either odd or even.

parity bit is used for the purpose of detecting errors

during the transmission of binary information.

The circuit that generates the parity bit in the transmitter

is called a parity generator.

The circuit that checks the parity in the receiver is called

a parity checker.

Page 58: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 58

Example (Parity Generation)

consider a three-bit message to be transmitted together

with an even-parity bit

Page 59: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 59

Parity Generation and Checking

The three bits in the message, together with the parity

bit, are transmitted.

The receiver at the destination checks for even number

of 1’s in the message and generates an error (C=1) if the

number of 1’s in the message is odd.

we can use the odd function (XOR) that produces an

output of 1 if odd number of inputs is equal to 1.

Page 60: Gate-Level Minimization · 2020. 3. 3. · K-map A K-Map is a diagram made up of squares, with each square representing one minterm of the function to be minimized. Adjacent minterms

EE 200– Digital Logic Circuit Design – KFUPM slide 60

Example (Parity Checking)

The output of the parity

checker, denoted by C, will

be equal to 1 if an error

occurs (odd number of 1’s

in the message)