## Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

Last time we saw applications of Boolean logic to circuit design. ² The basic Boolean operations are AND, OR and NOT. ² These operations can be combined to form complex expressions,

which can also be directly translated into a hardware circuit. ² Boolean algebra helps us simplify expressions and circuits. Today we·ll look at a graphical technique for simplifying an expression into a minimal sum of products (MSP) form: ² There are a minimal number of product terms in the expression. ² Each term has a minimal number of literals. Circuit-wise, this leads to a minimal two-level implementation.

February 2, 2004

CS 231

1

**Review: Standard forms of expressions
**

We can write expressions in many ways, but some ways are more useful

than others A sum of products (SOP) expression contains: ² Only OR (sum) operations at the ´outermostµ level ² Each term that is summed must be a product of literals f(x,y,z) = y· + x·yz· + xz

** The advantage is that any sum of products expression can be
**

implemented using a two-level circuit ² literals and their complements at the ´0thµ level ² AND gates at the first level ² a single OR gate at the second level This diagram uses some shorthands« ² NOT gates are implicit ² literals are reused ² this is not okay in LogicWorks!

CS 231 2

February 2, 2004

has 23 = 8 minterms: x·y·z· xy·z· Minterm x·y·z· x·y·z x·yz· x·yz xy·z· xy·z xyz· xyz February 2. y=1. z=1 . z=1 x=1. y=1. y=1. z=0 x=1. z=1 x=1. y=0. such as f(x. z=1 x=0.z). in which each input variable appears exactly once. y=1.Terminology: Minterms A minterm is a special product of literals. A function with n variables has 2n minterms (since each variable can appear complemented or not) A three-variable function. y=0. z=0 x=1. 2004 x·y·z xy·z x·yz· xyz· x·yz xyz Shorthand m0 m1 m2 m3 m4 m5 m6 m7 CS 231 3 Each minterm is true for exactly one combination of inputs: Is true when« x=0.y. y=0. y=0. z=0 x=0. z=0 x=0.

2.1. you can write a sum of minterms expression just by picking out the rows of the table where the function output is 1. x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 f(x. which is a special kind of sum of products form The sum of minterms form for any function is unique If you have a truth table for a function.5.6) f· = xy·z· + xy·z + xyz = m4 + m5 + m7 = 7m(4.7) f· contains all the minterms not in f February 2.y.3.z) 1 1 1 1 0 0 1 0 f·(x. 2004 CS 231 4 .y.Terminology: Sum of minterms form Every function can be written as a sum of minterms.z) 0 0 0 0 1 1 0 1 f = x·y·z· + x·y·z + x·yz· + x·yz + xyz· = m0 + m1 + m2 + m3 + m6 = 7m(0.

2004 CS 231 5 .Re-arranging the truth table A two-variable function has four possible minterms. ² Minterms in the top and bottom rows contain x· and x respectively. x 0 0 1 1 y 0 1 0 1 minterm x·y· x·y xy· xy X 0 1 0 x·y· xy· Y 1 x·y xy Now we can easily see which minterms contain common literals. ² Minterms on the left and right sides contain y· and y respectively. We can re-arrange these minterms into a Karnaugh map. Y 0 X 0 1 x·y· xy· 1 x·y xy X· X Y· x·y· xy· Y x·y xy February 2.

which means that they both contain the literal x·. 2004 CS 231 6 . x·y· xy· x·y xy What happens if you simplify this expression using Boolean algebra? x·y· + x·y = x·(y· + y) = x· y 1 = x· [ Distributive ] [ y + y· = 1 ] [xy1=x] February 2.Karnaugh map simplifications Imagine a two-variable sum of minterms: x·y· + x·y Both of these minterms appear in the top row of a Karnaugh map.

More two-variable examples Another example expression is x·y + xy. ² Both minterms appear in the right side. ² There·s also x·y + xy in the right side. corresponding to y. ² Thus. ² This whole expression can be reduced to x· + y. where y is uncomplemented. x·y· xy· x·y xy How about x·y· + x·y + xy? ² We have x·y· + x·y in the top row. we can reduce x·y + xy to just y. 2004 CS 231 7 . corresponding to x·. x·y· xy· x·y xy February 2.

the arrangement of minterms is more tricky: Z 0 1 00 x·y·z· xy·z· 01 x·y·z xy·z 11 x·yz xyz 10 x·yz· xyz· 00 0 1 m0 m4 01 m1 Z 11 m3 ¡ 10 m2 ¢ m m m Another way to label the K-map (use whichever you like): x·y·z· xy·z· x·y·z xy·z Z x·yz xyz x·yz· xyz· Z February 2. y. 2004 CS 231 ¢ ¡ m0 m4 m1 m m3 m m2 m 8 . z.A three-variable Karnaugh map For a three-variable expression with inputs x.

February 2. x·y·z + x·yz = x·z(y· + y) = x·z y 1 = x·z x·y·z· xy·z· x·y·z xy·z Z x·yz xyz x·yz· xyz· ´Adjacencyµ includes wrapping around the left and right sides: x·y·z· xy·z· x·y·z xy·z Z x·yz xyz x·yz· xyz· = = = = x·y·z· + xy·z· + x·yz· + xyz· z·(x·y· + xy· + x·y + xy) z·(y·(x· + x) + y(x· + x)) z·(y·+y) z· We·ll use this property of adjacent squares to do our simplifications.Why the funny ordering? With this ordering. 2004 CS 231 9 . 4 or 8 adjacent squares on the map contains common literals that can be factored out. any group of 2.

z) 0 1 0 0 0 1 1 1 f(x.y. ² ou can either write out the literals or use the minterm shorthand.y. if it·s not already. you should convert the expression into a sum of minterms form.z) = x·y·z + xy·z + xyz· + xyz = m1 + m5 + m6 + m7 February 2.Example K-map simplification Let·s consider simplifying f(x. Here is the truth table and sum of minterms for our example: x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 f(x. ² The easiest way to do this is to make a truth table for the function. and then read off the minterms.z) = xy + y·z + xz. First. 2004 CS 231 10 .y.

² Very few people actually do this. but it·s occasionally useful. February 2. 2004 CS 231 11 .Unsimplifying expressions ou can also convert the expression to a sum of minterms with Boolean algebra. ² Apply the distributive law in reverse to add in missing variables. we·re actually ´unsimplifyingµ our example expression. ² The resulting expression is larger than the original one! ² But having all the individual minterms makes it easy to combine them together with the K-map. xy + y·z + xz = (xy y 1) + (y·z y 1) + (xz y 1) = (xy y (z· + z)) + (y·z y (x· + x)) + (xz y (y· + y)) = (xyz· + xyz) + (x·y·z + xy·z) + (xy·z + xyz) = xyz· + xyz + x·y·z + xy·z In both cases.

In our example. the resulting K-map is shown below.y.y. ² Put 1s in the map for each minterm. and 0s in the other squares. we can write f(x.Making the example K-map Next up is drawing and filling in the K-map.y.z) = m1 + m5 + m6 + m7 m0 m4 m1 m5 m3 m7 m2 m6 X X In either case.z) = x·y·z + xy·z + xyz· + xyz x·y·z· xy·z· x·y·z xy·z x·yz xyz x·yz· xyz· f(x. 2004 CS 231 12 . ² ou can use either the minterm products or the shorthand to show you where the 1s and 0s belong. 0 0 1 1 0 1 0 1 X February 2. f(x.z) in two equivalent ways.

y.K-maps from truth tables ou can also fill in the K-map directly from a truth table. 2004 ¥ ¤ £ X .z) 0 1 0 0 0 X 0 1 1 0 1 0 1 1 1 1 1 0 0 1 1 0 1 0 1 0 1 1 1 CS 231 13 February 2. ² The output in row i of the table goes into square mi of the K-map.µ m0 m4 m1 m m3 m m2 m x 0 0 0 0 y 0 0 1 1 z 0 1 0 1 f(x. ² Remember that the rightmost columns of the K-map are ´switched.

² All of the 1s in the map should be included in at least one rectangle. to minimize the number of literals in each term. to minimize the number of ² ² products in the final expression. Make each rectangle as large as possible. For the simplest result: ² Make as few rectangles as possible. February 2. It·s all right for rectangles to overlap. if that makes them larger. ² Do not include any of the 0s. ² Make rectangles around groups of one. two. 2004 CS 231 14 .Grouping the minterms together The most difficult step is grouping together all the 1s in the K-map. Y X 0 0 1 1 0 1 0 1 Each group corresponds to one product term. four or eight 1s.

2004 CS 231 15 .Reading the MSP from the K-map Finally. (This is one of the additional algebraic laws from last time. you can find the MSP. ² Each rectangle corresponds to one product term.) February 2. we find that xy + y·z + xz = y·z + xy. 0 0 1 1 Z 0 1 0 1 x·y·z· xy·z· x·y·z xy·z Z x·yz xyz x·yz· xyz· For our example. ² The product is determined by finding the common literals in that rectangle.

Practice K-map 1 Simplify the sum of minterms m1 + m3 + m5 + m6. Z m0 m4 m1 m5 Z m3 ¦ m2 m6 m February 2. 2004 CS 231 16 .

February 2. 2004 CS 231 17 . with all groups shown.Solutions for practice K-map 1 Here is the filled in K-map. Minterm m6 is in a group all by its lonesome. which makes each of them ² as large as possible. ² The magenta and green groups overlap. Y X 0 0 1 1 1 0 0 1 The final MSP here is x·z + y·z + xyz·.

this ensures that adjacent squares have common literals. 2004 CS 231 18 © wx·y·z· wx·y·z wx·yz wx·yz· W m8 m m11 § wxy·z· wxy·z wxyz wxyz· X m12 m13 m1 ¨ § w·x·y·z· w·xy·z· w·x·y·z w·xy·z w·x·yz w·xyz w·x·yz· w·xyz· m0 m4 m1 m m3 m m2 m6 m14 m10 X . 4. and in the third and ² fourth rows. Again. W Grouping minterms is similar to the three-variable case. 8 or 16 minterms. February 2. but: ² ou can have rectangular groups of 1. 2. ² ou can wrap around all four sides.Four-variable K-maps We can do four-variable expressions too! ² The minterms in the third and fourth columns. are switched around.

resulting in the MSP x·z· + xy·z.Example: Simplify m0+m2+m5+m8+m10+m13 The expression is already a sum of minterms. 2004 CS 231 m13 m1 m14 m10 m1 m m3 m m2 m 19 . so here·s the K-map: 1 0 W 0 1 0 1 1 0 Z 0 0 0 0 1 0 0 1 W m0 m4 m12 m m9 Z m11 We can make the following groups. 1 0 W 0 1 0 1 1 0 Z 0 0 0 0 1 0 0 1 W w·x·y·z· w·xy·z· wxy·z· wx·y·z· w·x·y·z w·xy·z wxy·z wx·y·z Z w·x·yz w·xyz wxyz wx·yz w·x·yz· w·xyz· wxyz· wx·yz· February 2.

Y 0 X 0 1 1 0 1 1 1 Y 0 X 0 1 1 0 1 1 1 X 0 0 1 1 0 1 Y 1 1 y·z + yz· + xy y·z + yz· + xz Remember that overlapping groups is possible. 2004 CS 231 20 . because there are two possible ways to include minterm m7. as shown above. February 2.K-maps can be tricky! There may not necessarily be a unique MSP. The K-map below yields two valid and equivalent MSPs.

- Sapiens
- Yes Please
- The Unwinding
- The Innovators
- Elon Musk
- Dispatches from Pluto
- John Adams
- Devil in the Grove
- The Prize
- Grand Pursuit
- This Changes Everything
- A Heartbreaking Work Of Staggering Genius
- The Emperor of All Maladies
- Team of Rivals
- The New Confessions of an Economic Hit Man
- Rise of ISIS
- The Hard Thing About Hard Things
- Smart People Should Build Things
- The World Is Flat 3.0
- Bad Feminist
- How To Win Friends and Influence People
- Angela's Ashes
- Steve Jobs

- The Silver Linings Playbook
- Leaving Berlin
- Extremely Loud and Incredibly Close
- The Sympathizer
- The Light Between Oceans
- The Incarnations
- You Too Can Have a Body Like Mine
- Life of Pi
- The Love Affairs of Nathaniel P.
- The Rosie Project
- The Blazing World
- We Are Not Ourselves
- The First Bad Man
- Brooklyn
- The Flamethrowers
- A Man Called Ove
- The Master
- Bel Canto
- Interpreter of Maladies
- The Kitchen House
- Beautiful Ruins
- The Art of Racing in the Rain
- Wolf Hall
- The Wallcreeper
- A Prayer for Owen Meany
- The Cider House Rules
- The Bonfire of the Vanities
- Lovers at the Chameleon Club, Paris 1932
- The Perks of Being a Wallflower
- Slaughterhouse-Five

- Wind Meter
- Chapter 04
- 2009-10 T.Y.B.sc. Computer Science
- Vending machine code in verilog hdl
- Sedra - Microelectronic Circuits 5th Ed. - Solution Manual
- Control Systems Engineering 4th Ed Norman S Nise
- Laser Speed Gun
- Modern Digital and Analog Communication Systems 3rd Ed. by Lathi Tc
- Debate Skills
- Osprey Essential Histories 059 Plains Wars 1757 1900
- Sub Netting Exercises Solutions
- Essential Physics 1
- DCmotor
- Numerical Analysis
- (c++ examples)51 TO 108 PROGRAME (EE01083101)
- Integral Formula
- Engineer's Mini-Notebook - Digital Logic Circuits
- Transformers
- Bread Board 1
- L7 - Flip-Flops and Sequential Circuit Design [PDF Search Engine]
- Adv Fluid Handout(1)
- 13748878 Solutons Gaonkar Microprocessor
- Basic Motor Theory
- Bread Board 1
- bernouli's equ
- Stop Watch in verilog hdl
- Area Triangle Formulas

Sign up to vote on this title

UsefulNot usefulClose Dialog## Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

Loading