View
221
Download
2
Category
Preview:
Citation preview
E1.2 Digital Electronics 1 4.1 23 October 2008
Lecture 4: Boolean Algebra
Dr Pete Sedcole
Department of E&E Engineering
Imperial College London
http://cas.ee.ic.ac.uk/~nps/
(Floyd 4.2 – 4.5, 5.2 – 5.4)
(Tocci 3.10 – 3.14)
E1.2 Digital Electronics 1 4.2 23 October 2008
In this lecture:
• Theorems and rules in Boolean algebra
• DeMorgan’s Theorems
• Universality of NAND and NOR gates
• Active LOW & active HIGH
• Digital Integrated Circuits
E1.2 Digital Electronics 1 4.3 23 October 2008
Laws of Boolean Algebra
• Commutative Laws
• Associative Laws
• Distributive Law
E1.2 Digital Electronics 1 4.4 23 October 2008
Commutative Laws of Boolean Algebra
A + B = B + A
A • B = B • A
E1.2 Digital Electronics 1 4.5 23 October 2008
Associative Laws of Boolean Algebra
A + (B + C) = (A + B) + C
A • (B • C) = (A • B) • C
E1.2 Digital Electronics 1 4.6 23 October 2008
Distributive Laws of Boolean Algebra
A • (B + C) = A • B + A • C
A(B + C) = AB + AC
E1.2 Digital Electronics 1 4.7 23 October 2008
Rules of Boolean Algebra
E1.2 Digital Electronics 1 4.8 23 October 2008
Rules of Boolean Algebra 1–4
OR Truth Table
AND Truth Table
Rule 1
Rule 2
Rule 3
Rule 4
E1.2 Digital Electronics 1 4.9 23 October 2008
Rules of Boolean Algebra 5–8
OR Truth Table
AND Truth Table
Rule 5
Rule 6
Rule 7
Rule 8E1.2 Digital Electronics 1 4.10 23 October 2008
Rules of Boolean Algebra 9–10
AND Truth Table OR Truth Table
Rule 9
Rule 10: A + AB = A
E1.2 Digital Electronics 1 4.11 23 October 2008
Rules of Boolean Algebra 11–12 Rule 11: A + AB = A + B
Rule 12: (A + B)(A + C) = A + BC
E1.2 Digital Electronics 1 4.12 23 October 2008
Simplifying Boolean expressions: examples
• Simplify
• Simplify
• Simplify
BAy =
DBADBAy +=
( )( )BABAz ++=
BCDAACDx +=
Bz =
BCDACDx +=
E1.2 Digital Electronics 1 4.13 23 October 2008
Review questions
CAy =
CABCAy +=
DCBADCBAy +=
ABDDAy +=
DBAy =
BDDAy +=
• Simplify
• Simplify
• Simplify
E1.2 Digital Electronics 1 4.14 23 October 2008
DeMorgan’s Theorems
• Theorem 1:
• Theorem 2:
( ) yxyx ⋅=+
( ) yxyx +=⋅
Remember:
“break the bar, change the operator”
• DeMorgan’s Theorems are very useful in digital circuit design
• It allows AND gates to be exchanged with ORs by using inverters
• DeMorgan’s Theorems can be extended to any number of variables
E1.2 Digital Electronics 1 4.15 23 October 2008
Example of DeMorgan’s Theorem
QPYX
QPYXF
+++=
+= .. ← 2 NAND plus 1 OR
← 1 OR with some
input inverters
E1.2 Digital Electronics 1 4.16 23 October 2008
Example
• Simplify the expression
to one having only single variables inverted.
( ) ( )DBCAz +⋅+=
DBCAz +=
E1.2 Digital Electronics 1 4.17 23 October 2008
Using DeMorgan’s Theorems on logic gates
E1.2 Digital Electronics 1 4.18 23 October 2008
Using DeMorgan’s Theorems on logic gates
E1.2 Digital Electronics 1 4.19 23 October 2008
Example
• Determine the output expression for the circuit below
and simplify it using DeMorgan’s Theorem
E1.2 Digital Electronics 1 4.20 23 October 2008
Review questions
• Using DeMorgan’s Theorem, convert the expressions on
the left into ones that have only single-variable inversions:
( ) CBAz ⋅+=
QTSRy +=
DCBAy ++=
CBAz +=
QTSRy )( ++=
)( DCBAy +=
E1.2 Digital Electronics 1 4.21 23 October 2008
Universality of NAND gates
Any logic circuit can be implemented using only NAND gates
E1.2 Digital Electronics 1 4.22 23 October 2008
Universality of NOR gates
Any logic circuit can be implemented using only NOR gates
E1.2 Digital Electronics 1 4.23 23 October 2008
Basic Characteristics of Digital ICs
• Digital Integrated Circuits (ICs or chips): a collection of resistors, diodes and transistors fabricated on a single piece of semiconductor material
• The semiconductor is usually silicon (Si)
• Dual-in-line package(DIP) is a common type of packaging
7
E1.2 Digital Electronics 1 4.24 23 October 2008
Example DIP logic packages
E1.2 Digital Electronics 1 4.25 23 October 2008
The logic for x can be
constructed from 2 DIPs
It can also be built from
NAND gates only – using
only one DIP
E1.2 Digital Electronics 1 4.26 23 October 2008
Alternative logic-gate representations
E1.2 Digital Electronics 1 4.27 23 October 2008
Bubble notation
• A bubble (small circle) on an input or output of a gate is equivalent to an inverter
• To find the alternative logic symbol from the standard
symbol:
– Add bubbles to inputs and outputs that don’t have
them already
– Remove bubbles that are already there
– Swap AND ↔ OR
E1.2 Digital Electronics 1 4.28 23 October 2008
Things to notice:
• Alternative symbols can be extended to gates with any number of inputs
• The standard symbols never have bubbles on their inputs
• The alternative ones always have bubbles on their inputs
• The standard and alternative symbols represent the
same physical circuit
E1.2 Digital Electronics 1 4.29 23 October 2008
Active HIGH and active LOW
• An input or output that has a bubble on it is said to be
active-high
• An input or output that has no bubble on it is said to be
active-low
E1.2 Digital Electronics 1 4.30 23 October 2008
Interpretation of two NAND gate symbols
E1.2 Digital Electronics 1 4.31 23 October 2008
Interpretation of two NOR gate symbols
E1.2 Digital Electronics 1 4.32 23 October 2008
Equivalency of three circuits
E1.2 Digital Electronics 1 4.33 23 October 2008
Better diagram
Which circuit diagram should be used?
• Whenever possible, choose gate symbols so that nonbubble outputs are connected to nonbubble inputs, and bubble outputs are connected to bubble inputs
• This makes sure that the active-high / active-low interpretations are consistent
Output
active-low
Input
active-high
E1.2 Digital Electronics 1 4.34 23 October 2008
Active-high and active-low representations
E1.2 Digital Electronics 1 4.35 23 October 2008
More terminology
• When a logic signal is in its active state, it is said to be
asserted
• When a logic signal is not in its active state, it is said to be inactive or unasserted
• An overbar can be used to emphasise when a signal is active-low
1
01
A is asserted
Z is unasserted
Z
E1.2 Digital Electronics 1 4.36 23 October 2008
Summary
• How can we represent basic logic functions?
– Logical statements in our own language
– Truth tables
– Traditional graphic logic symbols
– Boolean algebra expressions
– Timing diagrams
E1.2 Digital Electronics 1 4.37 23 October 2008
Summary• Boolean algebra: a mathematical tool that is very useful for
analysing and designing digital circuits
– Using the rules and theorems of Boolean algebra can lead to a simpler way of implementing the circuit
• AND, OR, NOT: basic Boolean operations
– OR: HIGH when any input is HIGH
– AND: HIGH when all inputs are HIGH
– NOT: output is opposite of input
• NAND and NOR: can be used to implement any of the basic Boolean operations
– NOR: like OR with the output connected to an inverter
– NAND: like AND with the output connected to an inverter
Recommended