Lecture 8: Boolean Algebra
Based on Discrete Mathematics and Its Applications (opens in a new tab) by Kenneth H. Rosen, 7th Edition.
Boolean Operations
Remember, boolean is just a set of . The three operations in boolean algebra are:
Operation | Symbol | Name | Symbol in Algebra | Example |
---|---|---|---|---|
AND | Conjunction | |||
OR | Disjunction | |||
NOT | Negation |
Example
Find the value of the following expression:
Solution: Using the definitions of the operations, we get:
Boolean Expressions
A boolean expression is a combination of boolean variables and boolean operations. For example, is a boolean expression.
Boolean Functions
Let be the set of boolean values. Then, a boolean function is a function that takes in boolean variables and returns a boolean value. is also denoted as for . A function is called a boolean function of degree .
Example
Find the values of the following boolean functions:
Solution: We can find the values of the function by plugging in all possible values of into a table represented below:
n-cube representation
We can represent a boolean function of degree as an -cube. For example, the boolean function can be represented as a cube with vertices
The vertices that correspond to are
Number of Boolean Functions
Suppose that we have different boolean variables. Each of these variables can take on two values, or . Therefore, there are possible combinations of values for the variables. For each of these combinations, we can assign a value of or . Therefore, there are possible boolean functions of degree .
Table below shows the number of boolean functions for different values of :
Number of boolean functions | |
---|---|
Identities of Boolean Algebra
The identity of boolean algebra operation is just other forms of truth values operation and set operations.
Duality
The dual of a boolean function is the function obtained by interchanging the operations and and the constants and in . For example, the dual of is .
Exercises
- Find the sum-of-products expansion of the boolean function that has the value if and only if three or more of the variables have the value .
Representing Boolean Functions
Sum-of-products Expansions
Example
Find boolean expressions that represent the function and defined by the following tables:
Solution: We can find the boolean expressions by looking at the rows where the function is and then taking the product of the variables in the row. For example, for , we have:
Similarly, for , we have:
Actually, the is a function that determine whether the number of in the input is even or odd. If the number of is even, then the function is . Otherwise, the function is . The is a function that determine whether the number of in the input is odd. If the number of is odd, then the function is . Otherwise, the function is .
Minterm
A minterm is a product of literals in which each variable appears exactly once in either its complemented or uncomplemented form. For example, is a minterm. The minterm is also called standard product term.
Example
Find the minterm of the boolean function that takes 5 variables that return true if and only if the first, second, and fifth term are true.
Solution: The minterm is .
Logic Gates
Boolean algebra is used to model the circuitry of electronic devices.