XOR Operator - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

XOR Operator

Description:

XOR Operator A short digression to introduce another Boolean operation: exclusive-OR (XOR) A B A + B 0 0 0 XOR 0 1 1 1 0 1 1 1 0 – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 26
Provided by: call102
Category:

less

Transcript and Presenter's Notes

Title: XOR Operator


1
XOR Operator
  • A short digression
  • to introduce another Boolean operation
    exclusive-OR (XOR)

A B A B
0 0 0
0 1 1
1 0 1
1 1 0
2
XOR Operator
  • Also referred to as an odd function since it
    returns a 1 only when an odd number of 1s are
    input

A B C ABC
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
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 Im not one
  • Fortunately, theres another way

4
Karnaugh Maps
  • Also known as K-Map
  • Recall that an expression can be written in the
    form
  • F(A,B,C) S(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) S(0,2,4,5,6) is called a sum of
    minterms representation
  • The expression for such a representation is
  • F(A,B,C) ABC ABC ABC ABC ABC
  • We could simplify this via the axioms, right?
    (assuming we were that special kind of person)
  • Its painful!!!

6
K-Maps
  • A K-Map is a grid (map) where each square
    corresponds to a minterm

Note the ordering here is Gray code, not binary
7
K-Maps
  • Notice how neighboring squares (minterms) differ
    by a single bitthis is the key to the whole
    thing
  • Consider minterms 1 and 3
  • 1 ABC
  • 3 ABC
  • If we were to OR these together
  • (ABC ABC) would simplify to AC via the
    axioms

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

9
K-Maps
  • Notes
  • Adjacencies wrap top-to-bottom and left-to-right
  • 1s can be part of more than one group
  • When you are grouping adjacent squares youre
    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)
  • Heres a little insight that no one ever taught
    me
  • F(x, y, z) xyz xyz xyz
  • Notice how the middle term shares two elements
    with each of the others
  • Using association, distribution, and inverse
  • F(x, y, z) yz xyz
  • One more application of distribution
  • F(x, y, z) z(y xy)
  • We could have arrived at a similar solution by
    grouping the 2nd two terms

11
Simplification via Axioms(aka Proofs)
  • But, can we do better?
  • Notice that we use the minterm xyz in two
    groupings
  • What does that mean in terms of an axiomatic
    proof?

F(x, y, z) yz xz z(x y)
12
Simplification via Axioms(aka Proofs)
  • It means exactly this
  • F(x, y, z) xyz xyz xyz
  • F(x, y, z) xyz xyz xyz xyz
  • 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?

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

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

16
Example Sum-of-Products
  • F(A,B,C,D) S(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
F
C
A
D
18
Example Product-of-Sums
  • F(A,B,C,D) S(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 Morgans
  • Draw the schematic diagram

19
Example Product-of-Sums
B
D
A
F
C
D
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
22
Combinational Circuits
  • Definition A connected arrangement of logic
    gates with a set of inputs and outputs
  • Specifically, they have no memory!
  • Basically, its the stuff weve 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

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

25
Homework
  • Pages 37, 38 1-8, 1-9, 1-10, 1-12, 1-13
  • Due Thursday (next lecture)
Write a Comment
User Comments (0)
About PowerShow.com