Representing Boolean functions Section 10.2 Representing Boolean functions
Boolean function representation: 2 important concepts Any Boolean function may be represented by a Boolean sum of Boolean products of the variables and their complements All Boolean functions can be represented using only 1 operator This section concerns itself with illustrating these concepts
Example 1 Construct Boolean expressions representing functions with the given values: x y z F G 1 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 F has value 1 only when x=1, y=1, and z=0; one such expression is the Boolean product xyz G has value 1 when either x and z are 1, y is 0 or when x and z are 0, y is 1 The first condition is met by xyz The second is met by xyz So G can be represented by the Boolean sum of the 2 products: x y z + x y z
Literals & minterms Literal: Boolean variable or its complement For Boolean variables x1, x2, … xn the minterm is a Boolean product y1y2…yn where yi = xi or yi = xi A minterm is a product of literals, with one literal for each variable
Minterms A minterm has value 1 for exactly one combination of values of its variables: Minterm y1y2…yn is 1 if and only if each yi=1 and this occurs if and only if xi = 1 when yi = xi and xi = 0 when yi = xi Example: find a minterm that equals 1 when x1 and x3 are 0 and x2, x4 and x5 are 1, and 0 otherwise Solution: x1x2x3x4x5
Sum of products expansion By taking Boolean sums of distinct minterms, we can build a Boolean expression with a specified set of values Boolean sum of minterms has value 1 when exactly one of the minterms in the sum has value 1, and 0 for all other combinations of values of the variables Given a Boolean function, a Boolean sum of minterms can be found with value 1 when the function is 1 and 0 when the function is 0; this is called the sum-of-products expansion or disjunctive normal form of the Boolean function
Example 2 Find the sum-of-products expansion for F(x,y,z) = (x+y)z is the Boolean sum of 3 minterms corresponding to the rows that show 1 for the values of F: xyz + xyz + xyz x y z x+y z (x+y)z 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 0 1 1 1 0 0 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 0 1 0
Conjunctive normal form Can find a Boolean expression that represents a Boolean function by taking a Boolean product of Boolean sums - this is the conjunctive normal form or product-of-sums expansion We can find the product-of-sums from sum-of-products by taking duals; for function on previous slide, product-of-sums is: (x + y + z)(x + y + z)(x + y + z)
Functional completeness Every Boolean function can be expressed as a Boolean sum of minterms Each minterm is the Boolean product of Boolean variables or their complements So every Boolean function can be represented using Boolean operators ., +, and _ We say that the set {., +, _} is functionally complete
Functional Completeness If one of the operators from the set {., +, _} can be expressed in terms of the other two, we can find a smaller set of functionally complete operators We can do this using DeMorgan’s law: x + y = x y (We obtain this by taking complements of both sides of DeMorgan’s second law, then applying double complementation)
Functional completeness Using DeMorgan’s law, as stated on the previous slide, we can eliminate sums; this means the set { ., _ } is functionally complete Using DeMorgan’s first law we can similarly show that the set { +, _ } is functionally complete
Functionally complete sets containing one operator 12/8/2018 Functionally complete sets containing one operator NAND: {|} (not and) 1|1 = 0, 1|0 = 1, 0|1 = 1, 0|0 = 1 NOR: {} (not or) 11 = 0, 10 = 0, 01 = 0, 00 = 1 NAND is functionally complete, since: { ., _ } is functionally complete and x = x|x and xy = (x|y)|(x|y) We can similarly show that NOR is functionally complete ch10.2