basic logic operations and standard logic gates (lecture #1) ece 331 – digital system design

34
Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Upload: sherman-tucker

Post on 02-Jan-2016

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Basic Logic Operationsand

Standard Logic Gates

(Lecture #1)

ECE 331 – Digital System Design

Page 2: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 2

What is an analog signal?

Page 3: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 3

Analog Signal

An analog signal is a signal that can take on a continuous range of values.

Page 4: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 4

Analog Signal

Most, if not all, physical (naturally occurring) quantities are analog values.

Time Temperature Pressure

Page 5: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 5

What is an digital signal?

Page 6: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 6

Digital Signal

An digital signal is a signal that can take on only discrete (specific) values.

Page 7: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 7

What is an binary signal?

Page 8: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 8

Binary Signal

An binary signal is a signal that can take on only two values.

Typically represented by 0 and 1.

Page 9: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 9

Can a binary number be used to represent an analog value?

What about accuracy (or is it precision)?

Page 10: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 10

Can a binary number be used to represent an digital value?

How many bits are required?

Page 11: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 11

Processing Physical Quantities

The analog signal (representing the physical quantity) must be sampled at specific instances in time.

The sampled values must be digitized. The digital value must be encoded in binary.

SampleandHold

ADC BinaryEncoder

analog sampled digital binary

Page 12: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 12

Basic Logic Operations

Page 13: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 13

AND

Definition: the output is true (1) iff both inputs are true (1).

F = A.B = AB = “A and B”Boolean expression

logical operator

A B A . B

0 0 0

0 1 0

1 0 0

1 1 1

Truth tableF

Symbol (aka. logic gate)

Page 14: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 14

OR

Definition: the output is true (1) if either or both inputs are true (1).

F = A+B = “A or B”Boolean expression

logical operator

A B A + B

0 0 0

0 1 1

1 0 1

1 1 1

Truth table

Symbol

F F

Page 15: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 15

NOT

Definition: the output is true (1) if the input is false (0).

F = A' = “ not A”Boolean expression

logical operator

A A'

0 1

1 0

Truth table

Symbol

A F = A'

Page 16: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 16

Order of Precedence

The order of precedence of the basic logic operations is defined as follows:

– NOT– AND– OR

The order of precedence can be modified by using parenthesis.

Page 17: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 17

Functionally Complete

The AND, OR, and NOT operations comprise a functionally complete set.

All logic functions can be expressed in terms of these logic operations.

All logic circuits can be realized using the associated logic gates.

Page 18: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 18

NAND

Definition: the output is false (0) iff both inputs are true (1).

F = (A.B)' = “not (A and B)”Boolean expression

A B (A . B)'

0 0 1

0 1 1

1 0 1

1 1 0

Truth tableF = (A.B)'

Symbolshorthand for inversion

Page 19: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 19

NOR

Definition: the output is false (0) if either or both inputs are true (1).

F = (A+B)' = “not (A or B)”Boolean expression

A B (A+B)'

0 0 1

0 1 0

1 0 0

1 1 0

Truth table

Symbol

F FFF = (A+B)'

shorthand for inversion

Page 20: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 20

XOR

Definition: the output is true (1) if either but not both inputs are true (1).

F = A xor BBoolean expression

A B A xor B

0 0 0

0 1 1

1 0 1

1 1 0Truth table

Symbol

logical operator

Page 21: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 21

XNOR (aka. Equivalence)

Definition: the output is false (0) if either but not both inputs are true (1).

F = A xnor BBoolean expression

A B A xnor B

0 0 1

0 1 0

1 0 0

1 1 1

Truth tableSymbol

logical operator

Page 22: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 22

Logic Circuits Logic circuits are realized through the

interconnection of logic gates. Each logic gate represents a logical operation.

This can be done using discrete components

Standard Logic Gates programmable devices

Read-only Memories (ROM) Programmable Logic Devices (PLD) Field Programmable Gate Arrays (FPGA)

Page 23: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 23

Standard Logic Gates

Page 24: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 24

Standard Logic Gates

Device Logic Gate

74xx08 Quad 2-input AND gate

74xx32 Quad 2-input OR gate

74xx04 Hex Inverter (NOT gate)

74xx00 Quad 2-input NAND gate

74xx02 Quad 2-input NOR gate

74xx86 Quad 2-input XOR gate

Note: “xx” refers to the logic family

Page 25: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 25

Standard Logic Gates 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 26: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 26

Standard Logic Gates: 74xx08

pin-out

Truth table

Page 27: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 27

Standard Logic Gates: 74xx32

pin-out

Truth table

Page 28: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 28

Standard Logic Gates: 74xx04

pin-out

Truth table

Page 29: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 29

Building a Logic Circuit

CircuitDiagram

B

C

A

Finputs output

F = B'.C + A.BBoolean

Expression

74xx08

74xx08

74xx3274xx04

Page 30: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 30

Building a Logic CircuitV DD

7404

7408 7432

ABC F

components

wires

inputs

output

WiringDiagram

Page 31: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 31

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

F = A'.B + A.B'

Example

Page 32: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 32

Example

(circuit diagram)

Page 33: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 33

Example

Page 34: Basic Logic Operations and Standard Logic Gates (Lecture #1) ECE 331 – Digital System Design

Spring 2011 ECE 331 - Digital Systems Design 34

Questions?