Presentation is loading. Please wait.

Presentation is loading. Please wait.

XOR Operator A short digression… … to introduce another Boolean operation: exclusive- OR (XOR) ABA + B 000 011 101 110 XOR.

Similar presentations


Presentation on theme: "XOR Operator A short digression… … to introduce another Boolean operation: exclusive- OR (XOR) ABA + B 000 011 101 110 XOR."— Presentation transcript:

1 XOR Operator A short digression… … to introduce another Boolean operation: exclusive- OR (XOR) ABA + B 000 011 101 110 XOR

2 XOR Operator Also referred to as an “odd” function since it returns a 1 only when an odd number of 1’s are input ABCA+B+C 0000 0011 0101 0110 1001 1010 1100 1111

3 Simplification Using the axioms to “prove” that a simplified version of a circuit is equivalent to the complex version takes a special kind of person… –…of which I’m not one Fortunately, there’s another way…

4 Karnaugh Maps Also known as K-Map Recall that an expression can be written in the form F(A,B,C) = Σ(0,2,4,5,6) Which means the functional value is 1 at binary input patterns 0, 2, 4, 5, 6 and 0 at all other input patterns –What does the truth table look like?

5 K-Maps F(A,B,C) = Σ(0,2,4,5,6) is called a “sum of minterms” representation The expression for such a representation is F(A,B,C) = A’B’C’ + A’BC’ + AB’C’ + AB’C + ABC’ We could simplify this via the axioms, right? (assuming we were that special kind of person) It’s painful!!!

6 K-Maps A K-Map is a grid (map) where each square corresponds to a minterm 0132 4578 12131514 891110 AB CD 00 01 11 10 00011110 01 32 0 1 10 A B 01 10 A 0132 4578 A 0 1 00011110 BC Note the ordering here is Gray code, not binary

7 K-Maps Notice how neighboring squares (minterms) differ by a single bit…this is the key to the whole thing –Consider minterms 1 and 3 1: A’B’C 3: A’BC –If we were to OR these together (A’B’C + A’BC) would simplify to A’C via the axioms

8 K-Maps Great, now what do we do with them? Place 1’s on the squares that correspond to minterms in the truth table Place 0’s on all other squares Group adjacent 1’s into the largest group whose size is a power of 2

9 K-Maps Notes: –Adjacencies wrap top-to-bottom and left-to- right –1’s can be part of more than one group –When you are grouping adjacent squares you’re essentially applying axiom 4 (x + x’ = 1) so the variable that is being “spanned” can be removed from the minterm

10 Simplification via Axioms (aka Proofs) Here’s a little insight that no one ever taught me F(x, y, z) = xy’z + x’y’z + x’yz Notice how the middle term shares two elements with each of the others Using association, distribution, and inverse: F(x, y, z) = y’z + x’yz One more application of distribution F(x, y, z) = z(y’ + x’y) We could have arrived at a similar solution by grouping the 2 nd two terms

11 Simplification via Axioms (aka Proofs) But, can we do better? Notice that we use the minterm x’y’z in two groupings What does that mean in terms of an axiomatic proof? 0110 0100 x yz 00011110 0 1 F(x, y, z) = y’z + x’z = z(x’ + y’)

12 Simplification via Axioms (aka Proofs) It means exactly this… F(x, y, z) = xy’z + x’y’z + x’yz F(x, y, z) = xy’z + x’y’z + x’y’z + x’yz …by idempotence over OR Now we can form two associative groupings and arrive at the same answer that the Karnaugh Map gave us

13 Karnaugh Maps What is the truth-table? What is the expression in sum-of-minterms form? What is the simplified expression? What is the (schematic) logic gate implementation? 1010 0000 0000 1010 00011110 00 01 11 10 AB CD

14 Sum-of-Products This is what we previously called the “sum-of-minterms” Form the largest power-of-two groupings of 1’s on the K-map Create the schematic

15 Product-Of-Sums Instead of forming large adjacent groups of 1’s (on the K-map), form large adjacent groups of 0’s –What does this mean in terms of the original expression/truth-table? –It means you have simplified F’, instead of F –To “fix” what you’ve done you need only negate the final result them apply De Morgan’s theorem

16 Example – Sum-of-Products F(A,B,C,D) = Σ(0,1,2,5,8,9,10) Form the truth-table Form the K-map Simplify the K-map using sum-of- products Formulate the boolean expression Draw the schematic diagram

17 Example – Sum-of-Products B’ D’ C’ A’ D F

18 Example – Product-of-Sums F(A,B,C,D) = Σ(0,1,2,5,8,9,10) Form the truth-table Form the K-map Simplify the K-map using product-of- sums Formulate the boolean expression Negate, apply De Morgan’s Draw the schematic diagram

19 Example – Product-of-Sums B’ D A’ C’ D’ F

20 So What? As it turns out, the sum-of-products can be easily implemented with NAND gates Similarly, the product-of-sums can be easily implemented with NOR gates This may greatly simplify the design thus saving us money!

21 NAND/NOR Implementations B’ D A’ C’ D’ B’ D’ C’ A’ D

22 Combinational Circuits Definition: A connected arrangement of logic gates with a set of inputs and outputs Specifically, they have no memory! Basically, it’s the stuff we’ve been working on so far

23 Combinational Circuit Design Design a Half-Adder –A combinational circuit that adds 2 bits Input 1 is call the “Augend” Input 2 is called the “Addend” Output 1 is called the “Sum” Output 2 is called the “Carry” Augend Addend Sum Carry Half-Adder

24 Combinational Circuit Design Design a Full-Adder –A combinational circuit that adds 3 bits Input 1 is call the “Augend” Input 2 is called the “Addend” Input 3 is call the “Carry-in” Output 1 is called the “Sum” Output 2 is called the “Carry-out” Augend Addend Sum Carry-out Full-Adder Carry-in

25 Homework Pages 37, 38: 1-8, 1-9, 1-10, 1-12, 1-13 Due Thursday (next lecture)


Download ppt "XOR Operator A short digression… … to introduce another Boolean operation: exclusive- OR (XOR) ABA + B 000 011 101 110 XOR."

Similar presentations


Ads by Google