chapter 11_1 (chap 10 ed 8) digital logic. irvine, kip r. assembly language for intel-based...

50
Chapter 11_1 (chap 10 ed 8) Digital Logic

Upload: clemence-bryan

Post on 16-Dec-2015

227 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Chapter 11_1 (chap 10 ed 8)

Digital Logic

Page 2: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003.

2

• NOT• AND• OR• XOR• NAND• NOR• Truth Tables

Boolean Operators

Page 3: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003.

3

• NOT A = Ā • A AND B = AB• A OR B = A + B• A XOR B = 1 if and only if

one of A or B is 1

• A NAND B = NOT ( A AND B)• NOR = NOT (A OR B)• Truth Tables

Boolean Operators

Page 4: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003.

4

Boolean Algebra• Based on symbolic logic, designed by George

Boole• Boolean expressions created from:– NOT, AND, OR

Page 5: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003.

5

NOT• Inverts (reverses) a boolean value• Truth table for Boolean NOT operator:

NOT

Digital gate diagram for NOT:

Page 6: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003.

6

AND• Truth table for Boolean AND operator:

AND

Digital gate diagram for AND:

Page 7: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003.

7

OR• Truth table for Boolean OR operator:

OR

Digital gate diagram for OR:

Page 8: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003.

8

Operator Precedence• Examples showing the order of operations:

Page 9: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003.

9

Truth Tables (1 of 3)• A Boolean function has one or more Boolean

inputs, and returns a single Boolean output.• A truth table shows all the inputs and outputs

of a Boolean function

Example: X Y

Page 10: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003.

10

Truth Tables (2 of 3)• Example: X Y

Page 11: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003.

11

Truth Tables (3 of 3)• Example: (Y S) (X S)

muxX

Y

S

Z

Two-input multiplexer

Page 12: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Basic Identities of Boolean AlgebraBasic Postulates

A • B = B • A A + B = B + A Commutative Laws

A • (B + C) = (A • B) + (A • C) A + (B • C) = (A + B) • (A + C) Distributive Laws

1 • A = A 0 + A = A Identity Elements

A • = 0 A + = 1 Inverse Elements

Other Identities

0 • A = 0 1 + A = 1

A • A = A A + A = A

A • (B • C) = (A • B) • C A + (B + C) = (A + B) + C Associative Laws

DeMorgan's Theorem

A A

A B A B A B A B

Page 13: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

De Morgan’s Theorem

• A NOR B = (NOT A) AND (NOT B)• A NAND B = (NOT A) OR (NOT B)

Page 14: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Basic Logic Gates

Page 15: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

NAND Gates

Page 16: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

NOR Gates

Page 17: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Functionally complete set

• AND, OR and NOT can be implemented fully with NAND gates or NOR gates

• Thus it is called a functionaly complete set.

Page 18: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Sum-of-Products Implementation of Table 11.3

Page 19: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Sum of products

F = ABC + ABC + ABC

Page 20: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Product-of-Sums Implementationof Table 11.3

Page 21: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Product of sums

(XYZ) = X + Y + Z (De Morgan)

Page 22: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Simplification of Boolean expression

• Algebraic simplification• Karnaugh maps• Quine McKluskey Tables

Page 23: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Algebraic simplification

Show how to simplifyF = ABC + ABC + ABC

To become

F = AB + BC= B(A + C)

Page 24: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Impementation of F

F = ABC + ABC + ABC

Page 25: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Simplified implementation of F = ABC + ABC + ABC = B(A + C)

Page 26: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Karnaugh Maps

Page 27: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

The use of Karnaugh maps

Page 28: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Overlapping groups F = ABC + ABC + ABC

= B(A + C)

Page 29: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

The Quine-McKluskey Method

Page 30: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

2nd stageAll pairs that differ in one variable

Page 31: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Last stage

Page 32: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Final stage

• Circle each x that is alone in a column.• Then place a square around each X in any row

in which there is a circled X. • If every column now has either a squared or a

circled X, then we are done, and those row elements whose Xs have been marked constitute the minimal expression.

ABC + ACD + ABC + ACD

Page 33: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

A B C F

0 0 0 0

0 0 1 0

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 0

1 1 0 1

1 1 1 0

Table 11.3 A Boolean Function of Three Variables

Page 34: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

NAND

Page 35: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

MultiplexorS2 S1 F

0 0 D0

0 1 D1

1 0 D2

1 1 D3

Page 36: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Multiplexor implementation

Page 37: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Decoder

Page 38: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Use of decoders

To address 1K byte memory using four 256 x 8 bit RAM chips

Page 39: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Small-scale integration

• Early integrated circuit provided from one to ten gates on a chip.

• The next slide shows a few examples of these SSI chips.

Page 40: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean
Page 41: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Programmable Logic Array (PLA)

Page 42: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Programmable Logic Array (PLA)

Page 43: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Read-only memory

Page 44: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

A 64 bit ROM

Page 45: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Binary Addition Truth Tables

Table 11.9 Binary Addition Truth Tables

Page 46: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

4-Bit Adder

Page 47: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Implementation of an Adder

Page 48: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Multi-output adder

The output from each adder depends on the output from the previous adder.

Thus there is an increasing delay from the least significant to the most significant bit.

For larger adders the accumulated delay can become unacceptably high.

Page 49: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

32-Bit Adder using 8-Bit Adders

Page 50: Chapter 11_1 (chap 10 ed 8) Digital Logic. Irvine, Kip R. Assembly Language for Intel-Based Computers, 2003. 2 NOT AND OR XOR NAND NOR Truth Tables Boolean

Carry look ahead