31
ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

Embed Size (px)

Citation preview

Page 1: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 – Digital System Design

Basic Logic Functions,Truth Tables,

andStandard Logic Gates

Page 2: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 2

Basic Logic Functions

Page 3: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 3

Basic Logic Functions

AND Logical multiplication (product) A . B = AB = “A and B”

OR Logical addition (sum) A + B = “A or B”

NOT Logical complement A‘ = “not A”

Order of Precedence:1. NOT2. AND3. OR- can be modified by parenthesis

Page 4: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 4

Truth Table

Page 5: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 5

x 1 x 2

x n

x 1 x 2 x n + + + x 1 x 2

x 1 x 2 +

x 1 x 2

x n

x 1 x 2

x 1 x 2 x 1 x 2 x n

(a) AND gates

(b) OR gates

x x

(c) NOT gate

Logic Gates

Page 6: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 6

Additional Logic Functions NAND

F = (A . B)‘ = (AB)’ F = not (A and B) Compound logic function

NOR F = (A + B)’ F = not (A or B) Compound logic function

Not the same as F = A’ . B’

Not the same as F = A’ + B’

Page 7: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 7

Truth Tables

Exercise:

Derive the Truth Table for the NAND and NOR gates.

Page 8: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 8

x 1 x 2

x n

x 1 x 2 x n + + + x 1 x 2

x 1 x 2 +

x 1 x 2

x n

x 1 x 2

x 1 x 2 x 1 x 2 x n

(a) NAND gates

(b) NOR gates

Logic Gates

shorthand for a NOT gate

Page 9: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 9

Additional Logic Functions

Exclusive-OR F = (A.B') + (A'.B) Output = 1 iff one of the inputs is 1 (but not both). Inclusive-OR: F = A + B

Exclusive-NOR F = (A.B) + (A'.B') Output = 1 iff both input are 0 or both inputs are

1. Also known as the Equivalence function.

Page 10: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 10

Truth Tables

Exercise:

Derive the Truth Table for the XOR and XNOR gates.

Page 11: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 11

Additional Logic Operations

XOR gate

XNOR gate

A B

F = A xor B

F = A xnor B

Page 12: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 12

Truth Tables

Page 13: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 13

Truth Tables Used to describe the functional behavior of a Boolean

expression and/or Logic circuit. Each row in the truth table represents a unique

combination of the input variables. For n input variables, there are 2n rows.

The output of the logic function is defined for each row. Each row is assigned a numerical value, with the rows

listed in ascending order. The order of the input variables defined in the logic

function is important.

Page 14: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 14

3-input Truth Table

Page 15: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 15

4-input Truth Table

Page 16: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 16

Standard Logic Gates

Page 17: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 17

Standard Logic Gates

Discrete components used to build logic circuits. 74xx08 AND gate 74xx32 OR gate 74xx04 NOT gate 74xx00 NAND gate 74xx02 NOR gate 74xx86 XOR gate

Logic Families (TTL, LS-TTL, F, HC)

Page 18: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 18

Standard Logic Gates: Data sheets

Data sheets provide essential information: Logic Function Truth Table Pin-out Electrical Characteristics Timing Characteristics Package Description(s)

This information is necessary when building logic circuits from discrete components.

Each Logic Family has a unique set of characteristics.

Page 19: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 19

Logic Families TTL

Low-Power TTL (“L”) High-Speed TTL (“H”) Schottky (“S”) Low-Power Schottky (“LS”) Advanced Schottky (“AS”) Advanced Low-Power Schottky (“ALS”) Fast (“F”)

CMOS High-Speed CMOS (“HC”) Advanced CMOS (“AC”)

Page 20: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 20

Table E.4 (p. 916 of textbook)

Page 21: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 21

Combinational Logic Circuits

Page 22: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 22

Combinational Logic Circuits

Composed of an interconnected set of logic gates. Also known as Switching Circuits Logic circuits can be designed from

Truth tables Boolean expressions

Logic circuits realized through Interconnection of discrete components Synthesis from a Hardware Description Language

Page 23: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 23

Example:

Derive the Boolean expression and draw the circuit diagram for the following truth table:

Page 24: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 24

f

x 1

x 2

Example

F = x’1.x’

2 + x’

1.x

2 + x

1.x

2

Page 25: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 25

Example:

Derive the Boolean expression and draw the circuit diagram for the following truth table:

Page 26: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 26

Wiring Diagrams

Page 27: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 27

(a) Dual-inline package

(b) Structure of 7404 chip

V DD

Gnd

Standard Logic Gate: Pin-out

Page 28: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 28

Standard Logic Gate: Pin-out

Page 29: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 29

Standard Logic Gate: Pin-out

Page 30: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 30

Example:

Draw the circuit diagram and the wiring diagram for the following Boolean expression:

F = x’2.x

3 + x

1.x

2

Page 31: ECE 331 – Digital System Design Basic Logic Functions, Truth Tables, and Standard Logic Gates

ECE 331 - Digital System Design 31

V DD

x 1 x 2 x 3

f

7404

7408 7432

Example