You are on page 1of 4

Sum-of-Product & Product-of-Sum DeMorgan’s Law

X + Y = X ⋅Y
• Sum of Product
– see entries with value 1. • Thus, the inversion doesn’t distribute directly: it
– Ensure output 1 for those inputs. So OR also changes the “or” to an “and”
– A’B+AB’ A B A XOR B • Example:
0 0 0
• Product of Sum 0 1 1

– see entries with value 0


1
1
0
1
1
0
X ⋅Y = X + Y
– Ensure output 0 for those input. So AND
– (A+B)(A’+B’)

DeMorgan’s law on circuits Simplification

• You can do DeMorgan’s law directly on the • Some important rules for simplification (how do
circuit: you prove these?):
– AB + AB’ = A
– A + AB = A
• Note that you can use the rules in either direction,
to remove terms, or to add terms. Indeed,
sometimes you need to add some terms in order to
get to the simples solution.

Examples Examples (cont’d)


• Simplify: ab’c + abc + a’bc • Simplify:WX + XY + X’Z’ + WY’Z’
ab’c + abc + a’bc WX + XY + X’Z’ + WY’Z’
= ab’c + abc + abc + a’bc = ac + bc
= WX + XY + X’Z’ + WY’Z’X + WY’Z’X’
• Show that X + X’Y = X + Y
= WX(1 + Y’Z’) + XY + X’Z’(1 + WY’)
X + X’Y
= X(1 + Y) + X’Y
= WX + XY + X’Z’
= X + XY + X’Y
=X+Y

1
Examples (cont’d) Long example
• Prove the consensus theorem, which says:
• Simplify:
A’B’C’D’ + A’BC’D’ + A’BD + A’BC’D + ABCD + ACD’ + B’CD’
XY + X’Z + YZ = XY + X’Z = A’C’D’(B’ + B) + A’BD(1 + C’) + ABCD + ACD’ + B’CD’
• Solution: = A’C’D’ + A’BD + ABCD + ACD’ + B’CD’
XY + X’Z + YZ = A’C’D’ + BD(A’ + AC) + ACD’ + B’CD’
= A’C’D’ + BD(A’ + C) + ACD’ + B’CD’ (Since X + X’Y = X + Y)
= XY + X’Z + (X + X’)YZ
= A’C’D’ + A’BD + (BCD + ACD’) + B’CD’
= XY + X’Z + XYZ + X’YZ = A’C’D’ + A’BD + (BCD + ACD’ + ABC) + B’CD’
= XY + XYZ + X’Z + X’ZY (Added ABC by consensus)
= XY(1 + Z) + X’Z(1 + Y) = A’C’D’ + (A’BD + ABC + BCD) + (ABC + B’CD’ + ACD’)
= XY + X’Z = AC’D’ + A’BD + ABC + B’CD’

Cube Representation.
Karnaugh Maps
• Let’s draw a cube. Each vertex is a
possible term, AND two adjacent
• What was the idea in doing simplication? Well, vertices only differ in one variable. A’BC ABC

• Now, draw a dot for each term from


one of the ideas was to try to apply the unification our boolean expression, and group
A’BC’
ABC’

theorem (AB + AB’ = A). dots that are connected.


• What we’re looking for then are terms that differ • An edge that connects two dots means B A’B’C
C AB’C
that we can apply the unification
only in one variable. theorem to merge those two terms. A’B’C’ A AB’C’
The variable that differs is dropped.
• This can be difficult to do when there are many
• By applying the unification theorem The above cube shows the
terms and many variables. Let’s try to see if we twice, we can merge 4 vertices that are expression A’BC + ABC’ +
there is a graphical method that makes it easier. fully connected. ABC + AB’C + AB’C’.
It simplifies to:
A + BC’

Karnaugh Maps (cont’d) Karnaugh Maps (cont’d)


Cut here and unwind the cube to get the A’BC A’B’C AB’C ABC
bottom diagram
A’BC
ABC

A’BC’
ABC’
A’BC’ A’B’C’ AB’C’ ABC’

B A’B’C
C AB’C
A simpler drawing of this is given below. We call
A
this kind of table a Karnaugh map.
A’B’C’ AB’C’

AB 01 00 10 11
A’BC A’B’C AB’C ABC C
1 0 0 1 1
Note how, because we are
0 1 0 1 1
now in 2d, the lines kinda
wrap around.
A’BC’ A’B’C’ AB’C’ ABC’

2
Implicants Example of Implicants
AB 00 01 11 10
CD
• Implicant: A product term whose “oneness” • Implicants 00 0 1 1 0

implies the functions “oneness”. • Six Prime Implicants: 01 1 1 1 0


11 1 0 1 1
• Prime Implicant: Implicant that cannot be A’B’D, BC’, AC, A’C’D, 10 0 0 1 1

combined with another implicant. AB, B’CD


• Essential Prime Implicant: Implicant that • Essential PI: AC,BC’
covers an element of the on-set which is not • F=A’B’D+BC’+AC
covered by any other implicant.

K-map: SoP and PoS Proof of Duality


AB 00 01 11 10
• SoP: CD • Duality says: If you have an equation that holds, and you
00 0 1 0 0
A’BC’D’+A’B’C’D+ABC’D+AB’C’D+A’B’CD+AB’C
01 1 0 1 1
change all the ANDs to ORs, the ORs to ANDs, the 0’s to
D
11 1 0 0 1
1’s, and the 1’s to 0’s, then you get another equation that
• Minimized Exp 10 0 0 0 0 holds
A’BC’D’+B’D+AC’D • Example:
• PoS: – A + 1 = 1 That’s certainly true
(A+B+C+D)(A’+B’+C+D)(A’+B+C+D) (A+B’+C+D’) – Dual is: A . 0 = 0. Wow, This holds aswell!
….
• Alright, let’s prove that this is true.
• Minimized PoS
(B+D)(A’+D)(B’+C’)(A+B’+D’)

Proof of Duality (cont’d) Proof of Duality (cont’d)


• Definitions
– If E is an expression, let ED be the dual of D. • Now, we are equipped to prove the duality theorem.
• ie: f( A, B, C, …, 0, 1, +, • )D = f( A, B, C, …, 1, 0, •, + ) • Let’s say that the original equation is:
– If E is an expression, let EID be ED, but with all the variables inverted. – S = T, where S and T are expressions.
• ie: f( A, B, C, …, 0, 1, +, • )ID = f( A’, B’, C’, …, 1, 0, •, + ) – Let’s now invert both sides of our equation:
• Example: • S’ = T’
– (A + 1)D = A . 0, however (A + 1)ID = A’ . 0 – But inverting is the same as taking the ID, so
– (A + B)D = A . B, however (A + B)ID = A’ . B’ • SID = TID
– Now, let S = f( A, B, C, …, 0, 1, +,• ), and T = g( A, B, C, …, 0, 1, +,• )
• What is EID?
– Thus:
– Let’s take an example: (A + B)ID = A’ . B’ = (A + B)’ (By DeMorgan’s)
• f( A, B, C, …, 0, 1, +, • )ID = g( A, B, C, …, 0, 1, +, • )ID
– So, it would look like EID is just E’… Well, that’s true, and this is called the
generalized version of DeMorgan’s (proof is by induction, we won’t do it): – Or, by the definition of ID
• f( A’, B’, C’, …, 1, 0, •, +) = g( A’, B’, C’, …, 0, 1, •, +)
• f( A, B, C, …, 0, 1, +, • )’ = f( A’, B’, C’, …, 1, 0, •, + )

3
Proof of Duality (cont’d)

– Now, do variable replacement: a = A’, b = B’, etc. Thus:


• f( a, b, c, …, 1, 0, •, +) = g( a, b, c, …, 0, 1, •, +)
– Now, do another variable replacement: A = a, B = b, etc. Thus:
• f( A, B, C, …, 1, 0, •, +) = g( A, B, C, …, 0, 1, •, +)
– By the definition of dual, this is:
• f( A, B, C, …, 0, 1, +, • )D = g( A, B, C, …, 0, 1, +, • )D
– Or:
• S D = TD

You might also like