Top Banner
1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014
24
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

1

COMP541

Combinational Logic - II

Montek Singh

Aug 27, 2014

Page 2: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

2

Today Digital Circuits (review)

Basics of Boolean Algebra (review) Identities and Simplification

Basics of Logic ImplementationMinterms and maxtermsGoing from truth table to logic implementation

Page 3: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

Digital Circuits Digital Circuit = network that processes binary

variablesone or more binary inputsone or more binary outputs

inputs and outputs are called “terminals”a functional specification

relationship between inputs and outputsa timing specification

describes delay from inputs changing to outputs responding

3

Page 4: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

Digital Circuits Inside the black box

subcircuits or components or elements

connected by wireswires and terminals often

called “nodes”each node has a binary

valueeach node is an input, an

output, or “internal”

Example:E1, E2, E3 are elementsA, B, C are input nodesY, Z are output nodesn1 is an internal node 4

Page 5: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

Types of circuits Two types: with memory and without

Combinational Circuitoutput depends only on the current values of the inputs

– provided enough time is given for output to respondoutput does not depend on past inputs or outputscalled “memoryless”example: AND gate

Sequential Circuitanything not combinational is sequentialoutput depends on not only current inputs, but also past

behavior– previous inputs and/or outputs affect behavior

has “memory”, or is “stateful”example: counter

5

Page 6: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

Combinational Circuits: Examples

6

Adder

OR

Multi-output exampleSlash notation

Page 7: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

Combinational Circuits Theorem: A circuit is combinational if:

every element is itself combinationalevery node is either designated as an input, or

connects to exactly one output terminal of an elementoutputs of two elements are never “shorted together”ensures that each node has a unique/unambiguous value

contains no cyclic pathsevery path through the circuit visits each node at most

onceno “feedback”

Conditions above ensure that output is only a function of inputsProof: By induction

7

Page 8: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

Combinational Circuits: Examples Which meet the conditions for combinational

logic?

8

Page 9: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

9

Identities in Boolean Algebra Use identities to manipulate functions You can use distributive law …

… to transform

ZY X F

))(( ZXY X F

))(( ZX YX YZ X

to

Page 10: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

10

Table of Identities

Page 11: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

11

Duals Left and right columns are duals Replace ANDs and ORs, 0s and 1s

Page 12: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

12

Single Variable Identities

Page 13: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

13

Commutativity Operation is independent of order of variables

Page 14: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

14

Associativity Independent of order in which we group

So can also be written asand

ZYX XYZ

Page 15: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

15

Distributivity

Page 16: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

Substitution Can substitute arbitrarily large algebraic

expressions for the variablesDistribute an operation over the entire expressionExample:

X + YZ = (X+Y)(X+Z)

Substitute ABC for X

ABC + YZ = (ABC + Y)(ABC + Z)

16

Page 17: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

17

DeMorgan’s Theorem Used a lot

NOR invert, then AND

NAND invert, then OR

Page 18: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

18

Truth Tables for DeMorgan’s

Page 19: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

19

Algebraic/Boolean Manipulation Apply algebraic and Boolean identities to

simplify expressionexample: XZZYX YZ X F

Page 20: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

20

Simplification Example

XZZYX YZ X F

XZZ Z YX F )(

XZYX F 1

XZYX F

Apply

Apply

Apply

Page 21: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

21

Fewer Gates

XZYX F

Page 22: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

22

Consensus Theorem

The third term is redundantCan just drop third term (consensus term)

Proof summary (for first version):For third term to be true, Y & Z both must be 1Then one of the first two terms is already 1!

Exercise: Provide a similar proof for the 2nd version

Page 23: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

23

Complement of a Function Definition: 1s & 0s swapped in truth table Mechanical way to derive algebraic form

Take the dualRecall: Interchange AND and OR, and 1s & 0s

Complement each literalx becomes x’ (x’ means complement of x)

Page 24: 1 COMP541 Combinational Logic - II Montek Singh Aug 27, 2014.

24

Next Lecture Next Class: More on combinational logic

Commonly-used combinational building blocks