Download Boolean Algebra - Discrete Structures - Lecture Slides and more Slides Discrete Structures and Graph Theory in PDF only on Docsity!
Yes, No, Maybe...
• Boolean
Algebra
Boolean Algebra
- Boolean algebra provides the operations and the rules for working with the set {0, 1}.
- These are the rules that underlie electronic circuits , and the methods we will discuss are fundamental to VLSI design.
- We are going to focus on three operations:
- Boolean complementation,
- Boolean sum, and
- Boolean product
Boolean Functions and Expressions
- Definition: Let B = {0, 1}. The variable x is called a Boolean variable if it assumes values only from B.
- A function from B n^ , the set {(x 1 , x 2 , …, x (^) n ) |x (^) i∈B, 1 ≤ i ≤ n}, to B is called a Boolean function of degree n.
- Boolean functions can be represented using expressions made up from the variables and Boolean operations.
Boolean Functions and Expressions
- The Boolean expressions in the variables x 1 , x 2 , …, x (^) n are defined recursively as follows:
- 0, 1, x 1 , x 2 , …, xn are Boolean expressions.
- If E 1 and E 2 are Boolean expressions, then (-E 1 ), (E 1 E 2 ), and (E 1 + E 2 ) are Boolean expressions.
- Each Boolean expression represents a Boolean function. The values of this function are obtained by substituting 0 and 1 for the variables in the expression.
Boolean Functions and Expressions
- Example: Give a Boolean expression for the Boolean function F(x, y) as defined by the following table:
x y F(x, y) 0 0 0 0 1 1 1 0 0 1 1 0
Possible solution: F(x, y) = (-x)⋅y
Boolean Functions and Expressions
- Another Example: (^) Possible solution I:
F(x, y, z) = -(xz + y)
F(x, y, z)
z
x y
Possible solution II: F(x, y, z) = (-(xz))(-y)
Boolean Functions and Expressions
- Consider F(x,y,z) again: (^) F(x, y, z) = 1 if and
only if: x = y = z = 0 or x = y = 0, z = 1 or x = 1, y = z = 0 Therefore, F(x, y, z) = (-x)(-y)(-z) + (-x)(-y)z + x(-y)(-z)
F(x, y, z)
z
x y
Boolean Functions and Expressions
- Definition: The Boolean functions F and G of n variables are equal if and only if F(b 1 , b 2 , …, bn ) = G(b 1 , b 2 , …, bn ) whenever b 1 , b 2 , …, bn belong to B.
- Two different Boolean expressions that represent the same function are called equivalent.
- For example, the Boolean expressions xy, xy + 0, and xy⋅ 1 are equivalent.
Boolean Functions and Expressions
- Question: How many different Boolean functions of degree 1 are there?
- Solution: There are four of them, F 1 , F 2 , F 3 , and F 4 :
x F 1 F 2 F 3 F 4 0 0 0 1 1
1 0 1 0 1
Boolean Functions and Expressions
- Question: How many different Boolean functions of degree 2 are there?
- Solution: There are 16 of them, F 1 , F 2 , …, F 16 :
F 2
F 1
x y F 3
F 8
F 7
F 9
F 5
F 4
F 6
F 11
F 10
F 12
F 1 4
F 1 3
1 1 0
F 1 5
F 16
Duality
- There are useful identities of Boolean expressions that can help us to transform an expression A into an equivalent expression B (see Table 5 on page 597 in the textbook).
- We can derive additional identities with the help of the dual of a Boolean expression.
- The dual of a Boolean expression is obtained by interchanging Boolean sums and Boolean products and interchanging 0s and 1s.
Duality
The dual of x(y + z) is x + yz.
The dual of -x⋅1 + (-y + z) is (-x + 0)((-y)z).
The dual of a Boolean function F represented by a Boolean expression is the function represented by the dual of this expression.
This dual function, denoted by Fd^ , does not depend on the particular Boolean expression used to represent F.
Definition of a Boolean Algebra
- All the properties of Boolean functions and expressions that we have discovered also apply to other mathematical structures such as propositions and sets and the operations defined on them.
- If we can show that a particular structure is a Boolean algebra, then we know that all results established about Boolean algebras apply to this structure.
- For this purpose, we need an abstract definition of a Boolean algebra.
Definition of a Boolean Algebra
- Definition: A Boolean algebra is a set B with two binary operations ∨ and ∧, elements 0 and 1, and a unary operation – such that the following properties hold for all x, y, and z in B:
- x ∨ 0 = x and x ∧ 1 = x (identity laws)
- x ∨ (-x) = 1 and x ∧ (-x) = 0 (domination laws)
- (x ∨ y) ∨ z = x ∨ (y ∨ z) and (x ∧ y) ∧ z = x ∧ (y ∧ z) and (associative laws)
- x ∨ y = y ∨ x and x ∧ y = y ∧ x (commutative laws)
- x ∨ (y ∧ z) = (x ∨ y) ∧ (x ∨ z) and x ∧ (y ∨ z) = (x ∧ y) ∨ (x ∧ z) (distributive laws)