24
Logic Gate Level Combinational Circuits, Part 1

Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

  • View
    222

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Logic Gate Level

Combinational Circuits, Part 1

Page 2: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Circuits

• Circuit: collection of devices physically connected by wires to form a network

• Net can be:– combinational: input

determines output– sequential: output not entirely

dependent on input• We will focus first on

combinational networks

Black box view of networkInputs: a, b, cOutputs: x, y

Page 3: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Describing combinational networks

• 3 common methods for describing combinational networks, ordered from most to least abstract:– Truth tables– Boolean expressions– Logic diagrams

Page 4: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Truth tables

• Most like black box view:– specifies what network does, not how– lists output for every possible combination of

input values

• Next slide illustrates truth table for a 3-input, 2-output combinational network

• Note that the table has 8 entries – in general, n inputs translates to 2n entries

Page 5: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Truth tablea b c x y

0 0 0 0 0

0 0 1 1 0

0 1 0 0 0

0 1 1 1 1

1 0 0 0 1

1 0 1 0 0

1 1 0 0 0

1 1 1 0 0

Page 6: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Boolean algebra

• A Boolean algebraic expression describes both what a network does and how it does it

• Boolean values:1 = true0 = false

• Binary operations in order of precedence: = AND (may be omitted; ab same as a b)+ = OR

• Unary operation: ’ = NOT

Page 7: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Fundamental properties of Boolean algebra

Commutative a + b = b + a ab =baAssociative (a + b) + c = a + (b + c) (ab)c = a(bc)Distributive a + (bc) = (a + b)(a + c) a(b + c) = ab + acIdentity a + 0 = a a 1 = aComplement a + a’ = 1 a a’ = 0

Note, in particular, how the distributive property of Boolean algebra differs from regular algebra – in regular algebra, multiplication (denoted with ) distibrutes over addition (+), but not vice versa, as the operations represented by these symbols (AND and OR) do in Boolean algebra

Page 8: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Duality

• Boolean algebra has symmetry that doesn’t exist in regular algebra: every property (and thus every expression) has a dualdual

• To construct the dual of an expression:– exchange + and operations– exchange 1 and 0

• Examples– the dual of c(a + b) is c + ab– the dual of x + 0 is x 1

Page 9: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Simplifying expressions

• Duality is a useful property in the simplification of expressions

• Associative properties also permit simplifications; when a single operator is involved in a compound expression, parentheses can be removed

• Example:– (a + b) + c = a + b + c

Page 10: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Idempotent property• Weird and fancy way to say that any value ORed with

itself yields the same value:x + x = x

• Proof:x + x = (x + x) 1 by the identity property(x + x) 1 = (x + x) (x + x’) by complement(x + x) (x + x’) = x + (x x’) by distributionx + (x x’) = x + 0 by complementx + 0 = x by identity

• Same sequence of steps can be used to prove the dual – so any value ANDed with itself will also yield the same value

Page 11: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Notes on proofs

• A proof is a sequence of statements in which substitutions based on the fundamental properties of Boolean algebra are used to demonstrate the validity of a theorem

• Once a theorem is proven, we can immediately assert that its dual is true

Page 12: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

More Boolean algebra properties

• Absorption:– x + 1 = 1– x 0 = 0– x + xy = x– x(x + y) = x

• DeMorgan’s Laws:– (ab)’ = a’ + b’– (a + b)’ = a’b’

Page 13: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

More Boolean algebra properties• To prove that one expression is the

complement of another, show that:– expr1 + expr2 = 1 and– expr1 expr2 = 0

• DeMorgan’s laws:– illustrate proving complements– generalize to more than two variables – e.g. (abc)’

= a’ + b’ + c’• Complements of complements:– (x’)’ = x– 1’ = 0– 0’ = 1

Page 14: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Another useful operation• Although any Boolean expression can be written as the

combination of AND, OR and NOT operations, other operations are common

• The XOR (exclusive or) operation, denoted by the symbol has the following truth table for 2 variables (and generalizes, as the other operations do, to more than 2):

a b a b1 1 01 0 10 1 10 0 0

• XOR takes precedence over OR, has lower precedence than AND

Page 15: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Logic diagrams

• Logic diagrams are drawings representing the most detailed version of a circuit

• Each Boolean operation (AND, OR, NOT) is represented by a gate symbol with multiple inputs and a single output

• The lines in the drawing represent the wires in the circuit

Page 16: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Three basic logic gates

Page 17: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Logic diagrams

• It is possible to read a logic diagram as a kind of blueprint for a circuit, and to construct physical circuits from such blueprints

• It is actually far more common to use a slightly different set of gates in physical circuits, as these are easier to construct

• The next slide illustrates three of the most common gates

Page 18: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Common logic gates

NAND and NOR gates are logically equivalent to AND and OR gates followed by inverters. Since NAND is actually easier to build, ANDs are often constructed as inverted NAND gates.

Page 19: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Relationship between various representations of combinational nets• As the illustration below suggests, there is a

one-to-one correspondence between a boolean expression and a logic diagram

• Each of these might correspond to a single line in a truth table

Page 20: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Constructing logic diagram from Boolean expression

• For every draw a

• For every + draw a

• For every ’ draw a • Show input(s) as line(s) coming into gate,

output as line coming out• Final output is output from final gate (not

connected to input of another)

Page 21: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Example: logic diagram for a + b’c

Page 22: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

More complicated expression

• The logic diagram above depicts ((ab + bc’)a)’• For a parenthesized expression, construct

parenthesized portion first• Note the connectors () used to indicate a

continuation of the same input (for a and b)

Page 23: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

Same expression, abbreviated

• Two inverters eliminated: first by including c’ as an input (instead of c) and second by making the third AND gate a NAND gate

• In this version, inputs a and b are shown multiple times – use same symbols, so we know they’re the same inputs

Page 24: Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –

One more example

• To translate logic diagram to Boolean expression:– label output of each gate (starting from left) with

appropriate sub-expression– output of last gate is full expression