Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2nd Distributive
(X + A)(X + B) = X + AB
DIGITAL
Simplification
Absorption
Y + XY = X + Y
YX + X = X
XY + XY = X
DeMorgan Simple
X + Y = XY
VLSI
XY=X+Y
DeMorgan General
If
DESIGN
Carleton University
2006
John Knight
Dig Cir II p. 0
Slide i
DeMorgans Theorem
Simple two variable forms
As equations and as gates with inverted inputs
Common Errors
Carleton University
Digital Circuits II p. 1,
John Knight
dig2DeMorganD.fm
Comment on Slide i
DeMorgans Law
DeMorgans Simple Form
Used To Find the Inverse of Expressions
DeMorgans Law
AB = A + B
(DeM)
D+E
Inverse
A + B = AB
A
0
0
1
1
B
0
1
0
1
1
0
1
0
DE = D + E
AB AB
A B A+B
1
1
0
0
(DeM)
DE
1
1
1
0
0
0
0
1
D
0
0
1
1
1
1
1
0
E D+E
0 1
1 0
0 0
1 0
D E DE
1
1
0
0
1
0
1
0
1
0
0
0
AND
= A+B
A
B
NAND
=
=
A
B
D+E
D
E
NOR
=
D
E
DE
G
NOR
A+B
D+E
D
E
AND
AND
OR
=
D
E
DE
F
OR
John Knight
Dig Cir II p. 2
Slide 2
DeMorgans Law
(DeM1)
(DeM2)
(Clear brackets)
(D1) xy + xz = x(y+z)
42. PROBLEM
Reduce
d(de) + (de)e to four letters with inversion bars over single letters only.
Changing everything into NOT and AND gates
It turns out that any logic circuit can be made from AND and NOT gates. DeMorgans law can be used to
transform the circuits.
43. PROBLEM
Convert ((rw + t)u + r)t into a function with only AND and NOT operations.
Carleton University
Digital Circuits II p. 3,
John Knight
dig2DeMorganD.fm
Comment on Slide 2
Transistor NOT
Two switches,
handles linked together
with stiff wire
+VDD
Small
Jolt JOLT
Small
Jolt
JOLT
FREE
FREE
+VDD
F
Q1
Q1
Transistor NAND
or OR gates directly.
VDD
EF
NOR
NAND
VDD
E and F=1
=>Output
Grounded
Output
Inverted
B or A=1
=>Output
Grounded
Output
Inverted
A+B
John Knight
Dig Cir II p. 4
Slide 3
How an OR
is made
a
b
How an AND
is made
ab
Thinking
Thinking in NAND-NOR logic is difficult. Just look at an industrial schematic used extensively for
maintenance. The margin will be full of 1s and 0s pencilled in by users.
Converting AND-OR into NAND-NOR is a straightforward mechanical process.
Much less error prone than doing logic with inverted signals 1 and NAND-NOR logic.
These Notes
1.
Carleton University
Digital Circuits II p. 5,
John Knight
dig2DeMorganD.fm
Comment on Slide 3
NOR
OR
NOR
OR
NAND
AND
AND
NAND
NOR
NAND
OR
AND
NAND
OR
c
d AND
F = (ab) (cd)
F = ab + cd
John Knight
Dig Cir II p. 6
Slide 4
DeMorgans Theorem
The two expressions for the circuit with real gates and the circuit with simple gates, are equivalent
ab + cd = F = (ab) (cd)
Thinking in nand-nor logic is difficult. Just look at any industrial schematic used extensively for
maintenance. The margin will be full of 1s and 0s pencilled in by users.
Converting between and-or and nand-nor is a straightforward mechanical process.
Much less error prone than doing logic with asserted low signals and nand-nor logic.
These Notes
If the logic is important ANDs and ORs will be used.
If the gate design is important, as when we talk about CMOS gates, NANDs and NORs will be used.
44. PROBLEM
Prove, using DeMorgans Theroem(s), that
Carleton University
Digital Circuits II p. 7,
ab + cd = (ab) (cd)
John Knight
dig2DeMorganD.fm
Comment on Slide 4
U1.1
PWR
Start_O-Train
U3.1
U1.3
AIR
DOOROPN1
DOOROPN2
U1.2
SW1PWR + AIR(DOOROPN1DOOROPN2) + WATER
WATER
Start_O-Train
SW1PWRAIR(DOOROPN1 + DOOROPN2)WATER
WATER
John Knight
Dig Cir II p. 8
Slide 5
1.
The O-Train is an Ottawa interurban train, which stops right outside the Engineering Building at Carleton University.
Carleton University
Digital Circuits II p. 9,
John Knight
dig2DeMorganD.fm
Comment on Slide 5
NAND
NAND
NAND
NAND
NAND
NAND
a
b AND
c
d AND
NAND
Inverting circles
cancel each other
F = (ab) (cd)
OR
F = ab + cd
Circuits meant for understanding the logic use ANDs and ORs.
- Draw your circuits with ANDs and ORs.
NAND
NAND
NAND
alternate
NAND
symbol
John Knight
Dig Cir II p. 10
Slide 6
Diagrams in this course will be drawn with ANDs and ORs as much as possible.
Diagrams for construction or maintainance, that want to show exactly what gates were used, will be
drawn with NANDs and NORs. This is particularly true of older diagrams.
A compromise method, which is almost as easy to follow, but shows
NOR
NAND
the real gates as used, is to make alternate gates with the alternate
symbols, the ones with the inverting circles on the inputs.
NOTE:
One output circle cancels all the input circles it feeds.
45. PROBLEM
Transform this circuit into simple gates.
a)
Carleton University
Digital Circuits II p. 11,
John Knight
dig2DeMorganD.fm
Comment on Slide 6
Rational
Some people still seem to prefer designing with NANDs and NORs
but not in this class
John Knight
Dig Cir II p. 12
Slide 7
46. PROBLEM
Transform this circuit into simple gates.
Carleton University
Digital Circuits II p. 13,
John Knight
dig2DeMorganD.fm
Comment on Slide 7
b
c
a
Example:
1. Start with AND/OR circuit
F = (a + c)(b + c) + cd
F
1)
skip
skip
2)
(c)
(b)
3)
(a)
(h)
4)
John Knight
Dig Cir II p. 14
Slide 8
AFTER
input
1
1
2
3)
Number of inversions
from input to this gate input
Carleton University
Digital Circuits II p. 15,
4)
Number of inversions
from input to this gate input
John Knight
dig2DeMorganD.fm
Comment on Slide 8
4)
fairly readable
5)
NOR
NOR
NAND
NAND
b
c
F
6)
John Knight
Dig Cir II p. 16
Slide 9
On previous slide
You must always add two inverting circles to a lead, or none. Never add just one circle, not even if one
exists already.
On this slide
5. Look at the gates. Conventional ones have circles on their outputs and are NANDs, NORs or NOTs.
The unconventional ones have circles on their inputs but are still NANDs, NORs or NOTs.
This step gives a circuit which is fairly easy to read because one can mentally cancel the back-to-back
circles. However it still represents a circuit you can build easily because it does not contain ANDs and
ORs.
6. If desired, one can replace the DeMorgan forms of NOR and NAND, the
ones with circles on the inputs, with the more standard forms with a circle on
the output.
Since NAND-NOR diagrams represent real gates, do not place a single circle on the input of a gate, as
was done in the theoretical AND-OR diagram.
47. PROBLEM:.
For the circuit on the right, find the NAND-NOR circuit when the
connection on the levels shown are selected.
A
B
C
D
E
H
Carleton University
Digital Circuits II p. 17,
48. PROBLEM
Find an AND-OR equivalent for the circuit on the left.
This requires working backwards.
John Knight
dig2DeMorganD.fm
Comment on Slide 9
b
c
a
d
1) AND/OR circuit;
F = (a + c)(b + c) + cd
a
d
Compromise Answer
Dig Cir II p. 18
Slide 10
Carleton University
Digital Circuits II p. 19,
John Knight
dig2DeMorganD.fm
Comment on Slide 10
Example I
F = ABC
F = {ABC}
Take dual
c) Change AND OR and OR AND
d) Clean brackets
Fdual = {A + B + C}
Fdual = A + B + C
F = {A + B + C}
John Knight
Dig Cir II p. 20
Slide 1
Carleton University
Digital Circuits II p. 21,
John Knight
dig2DeMorganD.fm
Comment on Slide 11
F = ABC + AB
{ABC} + {AB }
Take dual
Fdual = {A+B+C}{A+B }
Fdual = (A+B+C)(A+B )
Example III
a) Take any Boolean expression
John Knight
Dig Cir II p. 22
Slide 11
Carleton University
Digital Circuits II p. 23,
John Knight
dig2DeMorganD.fm
Comment on Slide 12
F = ABC + AB
{ABC} + {AB }
Fdual = {A+B+C}{A+B }
Fdual = (A+B+C)(A+B )
F = (A+B+C)(A+B)
Note:
Ignore any inverting overbars except over single letters
F = AB(C + AB)
Fdual = {A+B}+(C{A+B})
F = {A+B}+(C{ A+B })
John Knight
Dig Cir II p. 24
Slide 12
Carleton University
Digital Circuits II p. 25,
John Knight
dig2DeMorganD.fm
Comment on Slide 13
DeMorgan; Review
DeMorgans Theorems
Common Errors
A
B
A
B
DE
D
E
DE = D + E
A
B NAND
A
B
NAND
A + B = AB
D+E
AND
AND
NOR
D
E
H = ABC + D
AND
H = A+B+CD
D
E
D
E
OR
NOR
H = {A(BC)} + D
Hdual = {A+(B+C)}D
H = {A+(B+C)}D
F
NOR
General form:
F=a+bc
=a(b+c)
take dual
John Knight
Dig Cir II p. 26
Slide 13
DeMorgan; Review
http://www.rbs0.com/tw.htm#anchor580
Adapted from Ronald B. Standler's humorous and informative site about English, written by a real engineer and
a lawyer.1 The quoted text is directly from his work.
Most legal style manuals devote at least one page of diatribe to the meaning of and, or, and/or. I can only
conclude that the intensity of these attorneys' argumentation must compensate for their ignorance!
In English, there are two meanings for OR:
1) The inclusive OR which means A or B or both. It is better expressed as A AND/OR B
2) The exclusive OR which means A or B but not both. In English, it also means only one of A, B, C ... or D, as
opposed to logic where it means an odd number of the set must be true.
It is my impression that most physicists and mathematicians generally use or in the inclusive sense, and most
attorneys in the USA generally use or in the exclusive sense.
The people who write legal style manuals don't seem to notice that their assertion about or not only
contradicts the mathematical definition that is used in computer data bases, but also is a narrow-minded
approach to the English language.
His point is illustrated by a line from the Carleton University Health and Safety documentation.
Food and beverages are not permitted in the lab..."
Logically, if F=Food, and B=Beverage, this statement means the expression
~(F&B) must be true. Thus coffee with no food, or dry food only, is allowed.
Map of
No (F and B)
B
F 0 1
0 1 1
1 1 0
If one says no (food or beverage) is permitted in the lab, lawyers would mean ~(FB),
however engineers would mean ~(F+B), which is what is desired, provided the brackets are used to avoid ambiguity.
Using DeMorgans Theorem, one gets ~(F+B) = (~F)&(~B) ie. No food and no beverages are permitted.
Alternately, Sadler suggests a clearer English version, Neither food nor beverages are permitted.
1.
Sadlers article is much funnier than this adaptation, but he is a copyright lawyer, and I am not going to plagiarize his work here.
Carleton University
Digital Circuits II p. 27,
John Knight
dig2DeMorganD.fm
Comment on Slide 14
John Knight
Dig Cir II p. 28
Slide 14
Let = f = (b+c)(ac)(cd)
= (b+c)(ac)(cd)
Add brackets to be sure we know where the overbar ends
= [(b+c)(ac)](cd)
dual
Take dual
= [(bc)+(a+c)]+(c+d)
= [(b+c)(a+c)]+cd
Insert overbars
= f = [(b+c)(a+c)]+cd
Alternate Solution to #52.
f = (b+c)(ac)(cd)
DeM
f = (b+c)(ac)+(cd)
xz = x+z
DeM
xz = x+z
Swap
(x+c)(z+c) = xc + zc
f = (b+c)(a+c)+(cd)
f = bc + ac +(cd)
Carleton University
Digital Circuits II p. 29,
John Knight
dig2DeMorganD.fm
Comment on Slide 15