Representation of A Function • A function can be specified or represented in any of the following ways: • A truth table • A circuit • A Boolean expression • SOP (Sum Of Products) • POS (Product of Sums) • Canonical SOP • Canonical POS
CANONICAL and STANDARD FORMSMinterms: • A form is canonical, if representation of a function in this form is unique • Truth table iscanonical representation • Uses minterms as basic components. • Each minterm is obtained from an AND term of the n variables, with each variable being primed if the corresponding bit of the binary number is a 0 and unprimed if a 1 • A symbol for each minterm is also shown in the table and is of the form mj, where the subscript j denotes the decimal equivalent of the binary number of the minterm designated.
CANONICAL and STANDARD FORMSMaxterms: • In a similar fashion, n variables forming an OR term, with each variable being primed or unprimed, provide 2n possible combinations, called maxterms, or standard sums • It is important to note that • Each maxterms is obtained from an OR term of the n variables, with each variable being unprimed if the corresponding bit is a 0 and primed if a 1. • Each maxterms is the complement of its corresponding minterm and vice versa
CANONICAL and STANDARD FORMSExamples • A Boolean function can be expressed algebraically from a given truth table by forminga minterm for each combination of the variables that produces a 1 in the functionand then taking the OR of all those terms. • For example, the function f1 in tableisdetermined by expressing the combinations 001, 100, and 111 as x’y’z, xy’z’, and xyz,respectively. Since each one of these minterms results inf1= 1, we have f1=x’y’z + xy’z’ + xyz = m1 + m4 + m7 • Similarly, it may be easilyverifiedthat f2=x’yz + xy’z+ xyz’ + xyz = m3 + m5 + m6 + m7 These examples demonstrate an important property of Boolean algebra: Any Boolean function can be expressed as a sum of minterms (with “sum” meaning the ORing of terms).
CANONICAL and STANDARD FORMSExamples • Now consider the complement of a Boolean function. It may be read from the truth table by forming a minterm for each combination that produces 0 in the function and then ORing those terms. The complement of f1 is read as • These examples demonstrate a second property of Boolean algebra: Any Boolean functioncan be expressed as a product of maxterms (with “product” meaning the ANDingof terms). The procedure for obtaining the product of maxterms directly from the truthtable is as follows: Form a maxterm for each combination of the variables that producesa 0 in the function, and then form the AND of all those maxterms. Boolean functionsexpressed as a sum of minterms or product of maxterms are said tobe in canonical form . f1’=x’y’z’ + x’yz’ +x’yz + xy’z + xyz’ If we take the complement of f1’, we obtain The function f1: f1 =(x+y+z)(x+y’+z)(x’+y+z’)(x’+y’+z) =M0.M2.M3.M5.M6 f2= ?
Sum of Minterms Example: An alternative procedure for deriving the minterms of a Boolean function is to obtain the truth table of the function directly from the algebraic expression and then read the minterms from the truth table. Consider the Boolean function given in previous example: F=A+B’C The truth table shown in table can be derived directly from the algebraic expression by listing the eight binary combinations under variables A, B, and C and inserting 1’s under F function.
Product of Maxterms To express a Boolean function as a product of maxterms, it must first bebrought into a form of OR terms. This may be done by using the distributivelaw,x + yz = (x + y)(x + z).Then any missing variable x in each OR term is ORed withxx’. The procedure is clarified in the following example. Example: Express the Boolean function F=xy + x’z as a product of maxterms. First, convert the function into OR terms by using the distributive law: F=xy + x’z=(xy+x’)(xy+z) =(x+x’)(y+x’)(x+z)(y+z) =(x’+y)(x+z)(y+z) The function has three variables:x,y, and z. Each OR term is missing one variable therefore, x’+y=x’+y+zz’=(x’+y+z)(x’+y+z’) x+z =x+z+yy’=(x+y+z)(x+y’+z) y+z =y+z+xx’=(x+y+z)(x’+y+z) Combining all the terms and removing those which appear more than once, we finally obtain F=(x+y+z)(x+y’+z)(x’+y+z)(x’+y+z’) =M0M2M4M5 A convenient way to Express this function is :
Standart forms The two canonical forms of Boolean algebra are basic forms that one obtains from readinga given function from the truth table. These forms are very seldom the ones with theleast number of literals, because each minterm or maxterm must contain, by definition,all the variables, either complemented or uncomplemented. Another way to express Boolean functions is in standard form. In this configuration,the terms that form the function may contain one, two, or any number of literals. Thereare two types of standard forms: the sum of products and products of sums. The sum of products is a Boolean expression containing AND terms, called productterms, with one or more literals each. The sum denotes the ORing of these terms. Anexample of a function expressed as a sum of products is • F1=? • F2=?
Three- and two-level implementation • Difference?
OTHER LOGIC OPERATIONS • When the binary operators AND and OR are placed between two variables, x and y,they form two Boolean functions, x .y and x + y, respectively. Previously we stated thatthere are 22nfunctions for n binary variables. Thus, for two variables, n = 2, and thenumber of possible Boolean functions is 16. Therefore, the AND and OR functionsare only 2 of a total of 16 possible functions formed with two binary variables. It wouldbe instructive to find the other 14 functions and investigate their properties. • The truth tables for the 16 functions formed with two binary variables are listed in
Gate-Level Minimization Mano & Ciletti Chapter 3
Outline • Intro to Gate-Level Minimization • The Map Method • 2-3-4-5 variable map methods • Product-of-Sums Method • Don’t care Conditions • NAND and NOR Implementations
Gate-Level Minimization • Finding an optimal gate-level implementation of Boolean functions. • Difficult to perform manually. • Can use computer-based logic synthesis tool • Exp: espresso logic minimization software • Karnough Map (K-map) can be used for manual design of digital circuits.
The Map Method • The truth table representation of a function is unique. • But, not the algebraic expression • Several versions of an algebraic expression exist. • Difficult to minimize algebraic functions manually. • The map method is a simple procedure to minimize Boolean functions. • Pictorial form of a truth table. • Called Karnough Map or K-Map.
Two-Variable Map • Four Minterms • Two variables • Four squares for four minterms • Figure b shows the relationship between the squares and the variables x and y.
Two-Variable Map (Cont.) • May only be useful to represent 16 Boolean functions. • Exp: If m1=m2=m3=1 then m1+m2+m3=x’y+xy’+xy=x+y (OR function)
Three-Variable Map • There are 8 minterms for 3 variables. • So, there are 8 squares. • Minterms are arranged not in a binary sequence, but in sequence similar to the Gray code.
Three-Variable Map (Cont.) • The square for square m5 corresponds to row 1 and column 01 (101). • Another look to m5 is m5=xy’z. • When variables are 0, they are primed (ex: x’). Otherwise not primed (x).
Three-Variable Map (Cont.) • Two adjacent squares differs one variable (one primed other is not). • So, they can be minimized • Ex: m5+m7=xy’z+xyz=xz(y’+y)=xz • So, try to cover as many adjacent squares as possible by the orders of two. • 1,2,4,8… squares that has the logical value1.
Example 1 • Simplify the Boolean function F(x,y,z)=Σ(2,3,4,5) F(x,y,z)=x’y+xy’
Adjacent squares • Some adjacent squares don’t touch each other. • m0 is adjacent to m2 and m4 is adjacent to m6. • m0+m2=x’y’z’+x’yz’=x’z’(y’+y)=x’z’ • m4+m6=xy’z’+xyz’=xz’(y’+y)=xz’
Example 2 • Simplfy the Boolean function F(x,y,z)=Σ(3,4,6,7) F(x,y,z)=yz+xz’
Example 3 • Simplfy the Boolean function F(x,y,z)=Σ(0,2,4,5,6) F(x,y,z)=z’+xy’
Example 4 • F=A’C+A’B+AB’C+BC • Express F as a sum of minterms. • F(A,B,C)=Σ(1,2,3,5,7) • Find the minimal sum-of-products expression • F=C+A’B
Four-Variable Map • 16 minterms (and squares) for 4 variables.
Example 5 • Simplify F(w,x,y,z)=Σ(0,1,2,4,5,6,8,9,12,13,14) F(w,x,y,z)=y’+w’z’+xz’
Example 6 • Simplfy F=A’B’C’+B’CD’+A’BCD’+AB’C’ F=B’D’+B’C’+A’CD”
Prime Implicant In choosing adjacent squares in a map, we must ensure that • all the minterms of thefunction are covered when we combine the squares • the number of terms in theexpression is minimized • there are no redundant terms (i.e., minterms alreadycovered by other terms) A product term obtained by combining the maximum possible number of adjacent squares. If a minterm is covered by only one prime implicant, that prime implicant is said to be essential.
Example • F(A,B,C,D)=Σ(0,2,3,5,7,8,9,10,11,13,15)
Example • F=BD+B’D’+CD+AD=BD+B’D’+CD+AB’ =BD+B’D’+B’C+AD=BD+B’D’+B’C+AB’
Five-Variable Map • Not simple, is not usually used. 5 variables, 32 squares.
Example 7 • Simplfy F(A,B,C,D,E)=Σ(0,2,4,6,9,13,21,23,25,29,31) F=A’B’E’+BD’E’+ACE
Product-of-Sums Simplification • Mark the empty squares by 0’s. • Combine them (as we did for sum-of-products) • We obtain F’ (complement of the function) • Take the complement of F’ ((F’)’) to obtain F.
Example 8 • Simplfy F(A,B,C,D)=Σ(0,1,2,5,8,9,10) F=B’D’+B’C’+A’C’D F’=AB+CD+BD’ => F=(A’+B’)(C’+D’)(B’+D)
Example 8 gate impl. • Two different implementations of the same function.