Unit 2 Boolean Algebra 1. Developed by George Boole in 1847 2. Applied to the Design of Switching Circuit by Claude Shannon in 1939 Department of Communication Engineering, NCTU 1
2.1 Basic Operations Department of Communication Engineering, NCTU 2
Boolean algebra: f : {0, 1} {0, 1} Basic operations Inverse (complement) AND OR Inverse is denoted by ( ) 0' = 1 1' = 0 Inverter Department of Communication Engineering, NCTU 3
All possible combinations of inputs Input A B 0 0 0 1 1 0 1 1 Output C=A B 0 0 0 1 Department of Communication Engineering, NCTU 4
A B C=A+B 0 0 0 1 1 0 1 1 0 1 1 1 Department of Communication Engineering, NCTU 5
Basic operations of switching circuits A switch A B Two switches in a series A + B Two switches in parallel Department of Communication Engineering, NCTU 6
2.2 Boolean Expressions and Truth Tables Department of Communication Engineering, NCTU 7
Boolean Expressions are formed by applications of basic operations to one or more variables or constants, e.g. AB '+C [A(C+D)] '+BE Priority of operators: NOT > AND > OR Each expression corresponds directly to a circuit of logic gates Department of Communication Engineering, NCTU 8
A truth table specifies the values of a Boolean expression for every possible combinations of variables in the expression E.g. AB '+C If an expression has n-variables, the number of different combinations of variables is 22 =2 n Department of Communication Engineering, NCTU 9
2.3 Basic Theorems and Laws Department of Communication Engineering, NCTU 10
Basic Theorems Department of Communication Engineering, NCTU 11
Commutative, associative and distributed laws Commutative laws : XY = YX Associative laws : X+Y = Y+X (XY)Z = X(YZ) = XYZ (X+Y)+Z = X+(Y+Z) = X+Y+Z Department of Communication Engineering, NCTU 12
Distributed law AND operation distributes over OR: X(Y+Z) = XY+XZ OR operation also distributes over AND X+YZ = (X+Y)(X+Z) = XX + XY + XZ + YZ = X ( 1+ Y + Z) + YZ = X + YZ This distributive law does not hold for ordinary algebra Department of Communication Engineering, NCTU 13
2.4 Simplification Theorems Department of Communication Engineering, NCTU 14
Simplifications of Boolean expressions Each expression corresponds to a circuit of logic gates. Simplifying an expression leads to a simpler circuit Some useful theorems E.g. F = A(A +B) By the second distributive law Department of Communication Engineering, NCTU 15
Example 1 Example 2 Department of Communication Engineering, NCTU 16
2.4 Multiplying Out and Factoring Department of Communication Engineering, NCTU 17
An expression is said to be in sum-of-products form when all products are the products of only single variables E.g. : AB + CD E + AC E ABC + DEFG + H When multiplying out an expression, the second distributive law should be applied first when possible E.g. : (A + BC)(A + D + E) = A + BC(D + E) = A + BCD + BCE Department of Communication Engineering, NCTU 18
An expression is in product-of-sums when all sums are the sums of single variables E.g. : (A+B )(C+D +E)(A+C +E ) The second distributive law can be applied for factorization E.g. : Department of Communication Engineering, NCTU 19
Example 1 Department of Communication Engineering, NCTU 20
Two-level circuits Sum-of-products Product-of-sums Department of Communication Engineering, NCTU 21
2.5 DeMorgan s Laws Department of Communication Engineering, NCTU 22
DeMorgan s Laws The complement of the sum is the product of the complements (X+Y) = X Y The complement of the product is the sum of the complements (XY) = X + Y Can be verified by using a truth table DeMorgan s Laws are easily generated to n variables Department of Communication Engineering, NCTU 23
Example 1 Example 2 Department of Communication Engineering, NCTU 24
Department of Communication Engineering, NCTU 25
Department of Communication Engineering, NCTU 26