COMP 541 Combinational Logic II Montek Singh Jan
COMP 541 Combinational Logic - II Montek Singh Jan 29, 2018 1
Today ã Digital Circuits (review) ã Basics of Boolean Algebra (review) l Identities and Simplification ã Basics of Logic Implementation l Minterms and maxterms l Going from truth table to logic implementation 2
Digital Circuits ã Digital Circuit = network that processes binary variables l one or more binary inputs l one or more binary outputs Ø inputs and outputs are called “terminals” l a functional specification Ø relationship between inputs and outputs l a timing specification Ø describes delay from inputs changing to outputs responding 3
Digital Circuits ã Inside the black box l subcircuits or components or elements l connected by wires l wires and terminals often called “nodes” Ø each node has a binary value Ø each node is an input, an output, or “internal” ã Example: l E 1, E 2, E 3 are elements l A, B, C are input nodes l Y, Z are output nodes l n 1 is an internal node 4
Types of circuits ã Two types: with memory and without l Combinational Circuit Ø output depends only on the current values of the inputs – provided enough time is given for output to respond Ø output does not depend on past inputs or outputs Ø called “memory-less” Ø example: AND gate l Sequential Circuit Ø anything not combinational is sequential Ø output 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
Combinational Circuits: Examples OR Adder Multi-output example Slash notation 6
Combinational Circuits ã Theorem: A circuit is combinational if: l every element is itself combinational l every node is either designated as an input, or connects to exactly one output terminal of an element Ø outputs of two elements are never “shorted together” Ø ensures that each node has a unique/unambiguous value l contains no cyclic paths Ø every path through the circuit visits each node at most once Ø no “feedback” ã Conditions above ensure that output is only a function of inputs l Proof: By induction Ø Let’s do it interactively 7
Combinational Circuits: Examples ã Which meet the conditions for combinational logic? 8
Identities in Boolean Algebra ã Use identities to manipulate functions ã Often used to simply a Boolean expression l e. g. , so can be implemented using fewer gates 9
Table of Identities 10
Duals ã Left and right columns are duals ã Replace ANDs and ORs, 0 s and 1 s 11
Single Variable Identities 12
Commutativity ã Operation is independent of order of variables 13
Associativity ã Independent of order in which we group ã So can also be simply written as: l X+Y+Z, and l XYZ 14
Distributivity 15
Substitution ã Can substitute arbitrarily large algebraic expressions for the variables l Distribute an operation over the entire expression l Example: X + YZ = (X+Y)(X+Z) Substitute ABC for X ABC + YZ = (ABC + Y)(ABC + Z) 16
De. Morgan’s Theorem ã Used a lot l NOR invert, then AND l NAND invert, then OR 17
Truth Tables for De. Morgan’s 18
De. Morgan’s Thm. : “Bubble Pushing” ã Bubble pushing: l imagine the bubble at the output is being pushed towards the inputs 1. it becomes a bubble at every input, and 2. the shape of the gate changes from AND to OR, and vice versa 19
Algebraic/Boolean Manipulation ã Apply algebraic and Boolean identities to simplify expression l example: 20
Simplification Example Apply 21
Fewer Gates 22
Consensus Theorem ã The third term is redundant l Can just drop third term (consensus term) ã Proof summary (for first version): l For third term to be true, Y & Z both must be 1 l Then one of the first two terms is already 1! ã Exercise: Provide a similar proof for the 2 nd version 23
Next Lecture ã Next Class: More on combinational logic l Commonly-used combinational building blocks 24
- Slides: 24