Boolean Functions
Introduction to Boolean Algebra Motivated by electronic circuits Boolean algebra is a set of operators applicable to elements from the set {0, 1}: complement: 0 = 1, 1 = 0 Boolean product: 1 1 = 1, 1 0 = 0, 0 1 = 0, 0 0 = 0 Boolean sum: 1 + 1 = 1, 1 + 0 = 1, 0 + 1 = 1, 0 + 0 = 0 Example: Find the value of 1 0 + (0+1) Solution : 1 0 + (0+1) = 0 + 1 = 0 + 0 = 0
Boolean Expressions and Functions Let B={0,1}. A Boolean variable x has only values from B A Boolean expression is built up recursively from 0, 1, Boolean variables/expressions, using Boolean operators Bn = {(x1,x2,…,xn) | xi ∈ B for 1≤ i ≤ n } is the set of all possible n-tuples of 0s and 1s Boolean function F of degree n is a mapping from Bn to B F can be represented by a Boolean expression Example: F(x, y) = xy + 𝑥 𝑦 from the set of ordered pairs of Boolean variables to the set {0, 1} is a Boolean function of degree 2
Boolean Expressions and Functions Example: Find the values of the Boolean function F(x, y, z) = xy + 𝑧
Boolean Functions There are 𝟐 𝟐 𝒏 different Boolean functions of degree n because: with n variables there are 2n different n-tuples of 0s and 1s each tuple is assigned 0 or 1 Example: there are 16 Boolean functions of degree 2
Identities Boolean identities correspond to identities of propositional logic and of set identities All identities (except the first) come in pairs. Each element of the pair is the dual of the other
Identities of Boolean Algebra Identities can be proven using tables analogous to truth tables of logic Example: Prove the distributive law x(y+z) = xy+xz