Docsity

Digital Logic Circuits: Logic Gates, Boolean Algebra, and Karnaugh Maps, Slides of Computer Architecture and Organization

Partial preview of the text

Download Digital Logic Circuits: Logic Gates, Boolean Algebra, and Karnaugh Maps and more Slides Computer Architecture and Organization in PDF only on Docsity!

١

Computer Organization

Computer Architectures Lab

Logic GatesBoolean AlgebraMap SpecificationCombinational CircuitsFlip-FlopsSequential CircuitsMemory ComponentsIntegrated Circuits

DIGITAL LOGIC CIRCUITS

Introduction

٢

Computer Organization

Computer Architectures Lab

Logic Gates

LOGIC GATES

Digital Computers

  • Imply that the computer deals with digital information, i.e., it deals

with the information that is represented by binary digits

  • Why

BINARY

? instead of Decimal or other number system?

  • Consider electronic signal

signalrange

0 1 2 3 4 5 6 7 8 9

0

0 1 2 3 4 5 6 7 8 9

1

1 2 3 4 5 6 7 8 9 10

2

2 3 4 5 6 7 8 9 1011

3

3 4 5 6 7 8 9 101112

4

4 5 6 7 8 9 10111213

5

5 6 7 8 9 1011121314

6

6 7 8 9 101112131415

7

7 8 9 10111213141516

8

8 9 1011121314151617

9

9 101112131415161718

76543210

binary

octal

  • Consider the calculation cost - Add

٤

Computer Organization

Computer Architectures Lab

COMBINATIONAL GATES

A

X

X = (A + B)’

B

Name

Symbol

Function

Truth Table

Logic Gates

AND

A

X = A • B

X

or

B

X = AB

0

0

0

0

1

0

1

0

0

1

1

1

0

0

0

0

1

1

1

0

1

1

1

1

OR

A

X

X = A + B

B

I

A

X

X = A

0

1

1

0

Buffer

A

X

X = A

A

X

0

0

1

1

NAND

A

X

X = (AB)’

B

0

0

1

0

1

1

1

0

1

1

1

0

NOR

0

0

1

0

1

0

1

0

0

1

1

0

XOR

Exclusive OR

A

X = A

⊕

B

X

or

B

X = A’B + AB’

0

0

0

0

1

1

1

0

1

1

1

0

A

X = (A

⊕

B)’

X

or

B

X = A’B’+ AB

0

0

1

0

1

0

1

0

0

1

1

1

XNOR

Exclusive NORor Equivalence

A

B

X

A

B

X

A

X

A

B

X

A

B

X

A

B

X

A

B

X

٥

Computer Organization

Computer Architectures Lab

BOOLEAN ALGEBRA

Boolean Algebra

  • Algebra with Binary(Boolean) Variable and Logic Operations* Boolean Algebra is useful in Analysis and Synthesis of

Digital Logic Circuits

  • Input and Output signals can be

represented by Boolean Variables, and

  • Function of the Digital Logic Circuits can be represented by

Logic Operations, i.e., Boolean Function(s)

  • From a Boolean function, a logic diagram

can be constructed using AND, OR, and I

Truth Table

  • The most elementary specification of the function of a Digital Logic

Circuit is the Truth Table

  • Table that describes the Output Values for all the combinations

of the Input Values, called

MINTERMS

  • n input variables

n

minterms

Boolean Algebra

٧

Computer Organization

Computer Architectures Lab

BASIC IDENTITIES OF BOOLEAN ALGEBRA

[1]

x + 0 = x

[3]

x + 1 = 1

[5]

x + x = x

[7]

x + x’ = 1

[9]

x + y = y + x

[11] x + (y + z) = (x + y) + z[13] x(y + z) = xy +xz[15] (x + y)’ = x’y’[17] (x’)’ = x

[2]

x • 0 = 0

[4]

x • 1 = x

[6]

x • x = x

[8]

x • X’ = 0

[10] xy = yx[12] x(yz) = (xy)z[14] x + yz = (x + y)(x + z)[16] (xy)’ = x’ + y’

[15] and [16] : De Morgan’s Theorem

Usefulness of this Table

  • Simplification of the Boolean function- Derivation of equivalent Boolean functions

to obtain logic diagrams utilizing different logic gates-- Ordinarily ANDs, ORs, and Inverters-- But a certain different form of Boolean function may be convenient

to obtain circuits with NANDs or NORs →

Applications of De Morgans Theorem

x’y’ = (x + y)’

x’+ y’= (xy)’

I, AND

NOR

I, OR

NAND

Boolean Algebra

٨

Computer Organization

Computer Architectures Lab

EQUIVALENT CIRCUITS

F = ABC + ABC’ + A’C

= AB(C + C’) + A’C

[13] ..…. (2)

= AB • 1 + A’C

[7]

= AB + A’C

[4] ...…. (3)

Many different logic diagrams are possible for a given Function

Boolean Algebra

ABC

F

AB C

F

F

A B C

١٠

Computer Organization

Computer Architectures Lab

SIMPLIFICATION

TruthTable

Boolean

Function

Unique

Many different expressions exist

Simplification from Boolean function

  • Finding an equivalent expression that is least expensive to implement- For a simple function, it is possible to obtain

a simple expression for low cost implementation

  • But, with complex functions, it is a very difficult task

Karnaugh Map (K-map) is a simple procedure for

simplifying Boolean expressions.

Truth Table

Booleanfunction

Karnaugh

Map

Simplified

Boolean

Function

Map Simplification

١١

Computer Organization

Computer Architectures Lab

KARNAUGH MAP

Karnaugh Map for an n-input digital logic circuit (n-variable sum-of-productsform of Boolean Function, or Truth Table) is

  • Rectangle divided into 2

n

cells

  • Each cell is associated with a

Minterm

  • An output(function) value for each input value associated with a

mintern is written in the cell representing the minterm

1-cell, 0-cell

Each Minterm is identified by a decimal number whose binary representationis identical to the binary interpretation of the input values of the minterm.

x

F

0

1

1

0

x 0

0

x 0

1

Karnaugh Map

valueof F

Identificationof the cell

x

y

F

0

0

0

0

1

1

1

0

1

1

1

1

x

y

0

1

2

3

x

y

F(x) =

F(x,y) =

1-cell

Map Simplification

١٣

Computer Organization

Computer Architectures Lab

MAP SIMPLIFICATION - 2 ADJACENT CELLS -

Adjacent cells

  • binary identifications are different in one bit

minterms associated with the adjacent

cells have one variable complemented each other

Cells (1,0) and (1,1) are adjacentMinterms for (1,0) and (1,1) are

x • y’ --> x=1, y=0x • y --> x=1, y=

F = xy’+ xy can be reduced to F = xFrom the map

Rule: xy’ +xy = x(y+y’) = x

x

y

F

(x,y)

2 adjacent cells xy’ and xy →

merge them to a larger cell x

= xy’+ xy= x

Map Simplification

١٤

Computer Organization

Computer Architectures Lab

MAP SIMPLIFICATION - MORE THAN 2 CELLS -

u’v’w’x’ + u’v’w’x + u’v’wx + u’v’wx’= u’v’w’(x’+x) + u’v’w(x+x’)= u’v’w’ + u’v’w= u’v’(w’+w)= u’v’

uv

wx

uv

wx

u

v

w

x

u

v

w

x

u’v’

uw

u’x’

v’x

vw’

u’v’w’x’+u’v’w’x+u’vw’x’+u’vw’x+uvw’x’+uvw’x+uv’w’x’+uv’w’x= u’v’w’(x’+x) + u’vw’(x’+x) + uvw’(x’+x) + uv’w’(x’+x)= u’(v’+v)w’ + u(v’+v)w’= (u’+u)w’ = w’

Map Simplification

u

v

w

x

uv

wx

u

v

uv

x

w’

u

V’

w

١٦

Computer Organization

Computer Architectures Lab

IMPLEMENTATION OF K-MAPS

  • Sum-of-Products Form -

Logic function represented by a Karnaugh mapcan be implemented in the form of I-AND-ORA cell or a collection of the adjacent 1-cells canbe realized by an AND gate, with some inversion of the input variables.

x

y

z

x’

y’ z’

x’

y

z’ x

y z’

F(x,y,z) =

x’

z’

y

z’

Map Simplification

x’

y

x

y z’

x’

y’ z’

F

x z y z

F

I

AND

OR

z’

١٧

Computer Organization

Computer Architectures Lab

IMPLEMENTATION OF K-MAPS

  • Product-of-Sums Form -

Logic function represented by a Karnaugh mapcan be implemented in the form of I-OR-ANDIf we implement a Karnaugh map using 0-cells,the complement of F, i.e., F’, can be obtained.Thus, by complementing F’ using DeMorgan’stheorem F can be obtainedF(x,y,z) = (0,2,6)

x

y

z

x

y’

z

F’ = xy’ + zF = (xy’)z’

= (x’ + y)z’

x

y z

F

I

OR

AND

Map Simplification

١٩

Computer Organization

Computer Architectures Lab

COMBINATIONAL LOGIC CIRCUITS

Half Adder

c

n

= xy + xc

n-

  • yc

n-

= xy + (x

y)c

n-

s = x’y’c

n-

+x’yc’

n-

+xy’c’

n-

+xyc

n-

= x

y

c

n-

= (x

y)

c

n-

x

y

c

n-

x

y

c

n-

c

n

s

Combinational Logic Circuits

x

y

x

y

c = xy

s = xy’ + x’y

= x

y

x y

c s

x y

c

n-

S c

n

Full Adder

x

y

c

s

x

y

c

n-

c

n

s

0 0 1

0

0

1 1 1

0 1 0 1

1

0 1 0

٢٠

Computer Organization

Computer Architectures Lab

COMBINATIONAL LOGIC CIRCUITS

Other Combinational Circuits

MultiplexerEncoderDecoderParity CheckerParity Generatoretc

Combinational Logic Circuits