Presentation on theme: "Prof. Sin-Min Lee Department of Computer Science"— Presentation transcript:
1Prof. Sin-Min Lee Department of Computer Science CS147 Lecture 6POS, K-map and MultiplexerProf. Sin-Min LeeDepartment of Computer Science
2Karnaugh mapsLast 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.
3Review: Standard forms of expressions We can write expressions in many ways, but some ways are more useful than othersA sum of products (SOP) expression contains:Only OR (sum) operations at the “outermost” levelEach term that is summed must be a product of literalsThe advantage is that any sum of products expression can be implemented using a two- level circuitliterals and their complements at the “0th” levelAND gates at the first levela single OR gate at the second levelThis diagram uses some shorthands…NOT gates are implicitliterals are reusedthis is not okay in LogicWorks!f(x,y,z) = y’ + x’yz’ + xz
4Unsimplifying expressions xy + y’z + xz = (xy 1) + (y’z 1) + (xz 1)= (xy (z’ + z)) + (y’z (x’ + x)) + (xz (y’ + y))= (xyz’ + xyz) + (x’y’z + xy’z) + (xy’z + xyz)= xyz’ + xyz + x’y’z + xy’zYou can also convert the expression to a sum of minterms with Boolean algebra.Apply the distributive law in reverse to add in missing variables.Very few people actually do this, but it’s occasionally useful.In both cases, 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.
5K-maps from truth tables You can also fill in the K-map directly from a truth table.The output in row i of the table goes into square mi of the K-map.Remember that the rightmost columns of the K-map are “switched.”
6The Sum-of-Products (SOP) Form When two or more product terms are summed by Boolean addition
7Conversion of a General Expression to SOP Form Any logic expression can be change into SOP form by applying Boolean Algebra techniquesExample:Try This:
16The Karnaugh MapProvides a systematic method for simplifying Boolean expressionsProduces the simplest SOP or POS expressionSimilar to a truth table because it presents all of the possible values of input variables
24K-Map Simplification of SOP Expressions A group must contain either 1, 2, 4, 8 or 16 cells.Each cell in group must be adjacent to one or more cells in that same group but all cells in the group do not have to be adjacent to each otherAlways include the largest possible number 1s in a group in accordance with rule 1Each 1 on the map must be included in at least one group. The 1s already in a group can be included in another group as long as the overlapping groups include noncommon 1sGoal:To maximize the size of the groups and to minimize the number of groups
26Determining the minimum SOP Expression from the Map Groups the cells that have 1s. Each group of cells containing 1s create one product term composed of all variables that occur in only one form (either uncomplemented or complemented) within the group. Variable that occurs both uncomplemented and complemented within the group are eliminated. These are called contradictory variables.
27Example: Determine the product term for the K-Map below and write the resulting minimum SOP expression1
42MultiplexersA combinational circuit that selects info from one of many input lines and directs it to the output line.The selection of the input line is controlled by input variables called selection inputs.They are commonly abbreviated as “MUX”.
45Combinational circuit implementation using MUX We can use Multiplexers to express Boolean functions also.Expressing Boolean functions as MUXs is more efficient than as decoders.First n-1 variables of the function used as selection inputs; last variable used as data inputs.If last variable is called Z, then each data input has to be Z, Z’, 0, or 1.