Docsity

Digital Logic Circuits - Computer Architecture - Lecture Slides, Slides of Computer Architecture and Organization

Partial preview of the text

Download Digital Logic Circuits - Computer Architecture - Lecture Slides and more Slides Computer Architecture and Organization in PDF only on Docsity!

Logic Gates

Boolean Algebra

Map Specification

Combinational Circuits

Flip-Flops

Sequential Circuits

Memory Components

Integrated Circuits

DIGITAL LOGIC CIRCUITS

Introduction

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

signal range

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

6 5 4 3 2 1 0

binary octal

  • Consider the calculation cost - Add

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 NOR or Equivalence

A B X

A B X

A X

A B X

A B X

A B X

A B X

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 → 2 n^ minterms

Boolean Algebra

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

EQUIVALENT CIRCUITS

F = ABC + ABC’ + A’C .......…… (1)

= 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

A B C F A B

C F

F

A B

C

SIMPLIFICATION

Truth Table

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

Boolean function

Karnaugh Map

Simplified Boolean Function

Map Simplification

KARNAUGH MAP

Karnaugh Map for an n-input digital logic circuit (n-variable sum-of-products

form of Boolean Function, or Truth Table) is

  • Rectangle divided into 2n^ 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 representation

is identical to the binary interpretation of the input values of the minterm.

x F 0 1 1 0

x 0 1

0 1

x 0 1

1

Karnaugh Map value of F

Identification of the cell

x y F 0 0 0 0 1 1 1 0 1 1 1 1

x

y (^0 )

0 1

0 1 2 3

x

y 0 1 0 1

F(x) =

F(x,y) = ∑ (1,2)

1-cell

Map Simplification

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 adjacent Minterms for (1,0) and (1,1) are x • y’ --> x=1, y= x • y --> x=1, y=

F = xy’+ xy can be reduced to F = x From the map

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

x

y 0 1

0

1 1 1

F(x,y) =^ ∑^ (2,3)

2 adjacent cells xy’ and xy → merge them to a larger cell x

= xy’+ xy = x

Map Simplification

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

w V’

IMPLEMENTATION OF K-MAPS - Sum-of-Products Form -

Logic function represented by a Karnaugh map

can be implemented in the form of I-AND-OR

A cell or a collection of the adjacent 1-cells can

be 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) = ∑ (0,2,6)

x’

z’

y z’

Map Simplification

x’ y

x y z’

x’ y’ z’ F

x z

y z

F

I AND OR

z’

IMPLEMENTATION OF K-MAPS - Product-of-Sums Form -

Logic function represented by a Karnaugh map

can be implemented in the form of I-OR-AND

If we implement a Karnaugh map using 0-cells,

the complement of F, i.e., F’, can be obtained.

Thus, by complementing F’ using DeMorgan’s

theorem F can be obtained

F(x,y,z) = (0,2,6)

x

y

x z y’

z

F’ = xy’ + z

F = (xy’)z’ = (x’ + y)z’

x y

z

F

I OR AND

Map Simplification

COMBINATIONAL LOGIC CIRCUITS

Half Adder

cn = xy + xcn-1+ yc (^) n- = xy + (x ⊕ y)c (^) n- s = x’y’c (^) n-1+x’yc’ (^) n-1+xy’c’ (^) n-1+xyc (^) n- = x ⊕ y ⊕ cn-1 = (x ⊕ y) ⊕ c (^) n-

x

y

cn- x

y

c (^) n-

cn s

Combinational Logic Circuits

x

y

x

y

c = xy s = xy’ + x’y = x ⊕ y

x y

c

s

x y

cn-

S

cn

Full Adder

x y c s 0 1

x y cn-1 cn s 0

0

1 0

0

1

1 1

0

1

0

1

1

0

1 0

COMBINATIONAL LOGIC CIRCUITS

Other Combinational Circuits

Multiplexer Encoder Decoder Parity Checker Parity Generator etc

Combinational Logic Circuits