VIEWS: 23 PAGES: 8 POSTED ON: 8/11/2011 Public Domain
Computer Organization CSC 405 Lecture 1 - Boolean Algebra These notes are taken from Appendix A of the textbook Boolean Algebra The basic principles of Boolean algebra were first proposed by George Boole in 1854 as a means of understanding and quantifying human thought. Boole's treatise did not have much effect on the study of psychology but 80 years later his algebra was embraced by Claude Shannon to solve problems in relay-switching circuit design. Since then Boolean algebra has become the theoretical foundation for the design and analysis of computers and digital circuits. In Boolean algebra, variables and literals can take only two values (True or False). The operations of AND, OR and NOT form a basis or functionally complete set. Any boolean expression can be constructed of combinations of Boolean variables and these three operators. A B A AND B A B A OR B A NOT A 0 0 0 0 0 0 O 1 0 1 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 conjunction disjunction negation AANDB=A .B=AB AORB=A+B NOTA=~A=A'=A Other common Boolean operations are NAND (not AND), NOR (not OR) and XOR (exclusive OR). Their circuit symbols, and functions are given below: AND NAND OR NOR NOT XOR A B A AND B A OR B NOT A A NAND B A NOR B A XOR B 0 0 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 0 0 1 0 1 0 1 1 1 1 1 0 0 0 0 Combinatorial Circuits A combinatorial circuit is an interconnected set of gates whose output at any time is a function only of the input at that time (no memory of previous states). Combinatorial circuits represent Boolean expressions. F = A'BC + AB'C' + ABC A B C F Sum of Products The sum-of-products (SOP) form of Boolean expressions are those in which a series of conjuctive terms (AND terms) are connected by disjunctions (OR operations). An SOP expression is TRUE if any of its terms is TRUE. F(A,B,C) = A'BC + AB'C + A'C' + B' Product of Sums The product-of-sums (POS) form of Boolean expressions are those in which a series of disjunctive terms (OR terms) are connected by conjunctions (AND operations). A POS expression is FALSE unless all of its terms are TRUE. G(A,B,C) = (A+B+C')(A'+B+C')(A)(A+C') For every SOP expression there is a functionally equivalent POS expression. SOP F(P,Q,R) = PQR' + P'QR + PQ'R' + P'Q'R' POS F(P,Q,R) = (P+Q+R')(P+Q'+R)(P'+Q+R')(P'+Q'+R') Homework: Use a truth-table to demonstrate that these two expressions are functionally equivalent. Laws and Postulates of Boolean Algebra Closure - A set S is closed with respect to a binary operator if, for every pair of element of S, the binary operator specifries a rule for obtaining a unique element of S. Associative Law - A binary operator * on a set S is said to be associative whenever: (x*y)*z - x*(y*z) for all x,y,z in S Commutative Law - A binary operator * on a set S is said to be commutative whenever: x*y = y*x for all x,y in S Identity element - A set S is said to have an identity element with respect to a binary operaiton * on S if there exists an element e in S with the property: e*x = x*e = x for every x in S Inverse - A set S having the identity element e with respect to a binary operator * is said to have an inverse whenever, for every x in S, there exists an element y in S such that: x*y=e Distributive Law - If * and & are two binary operators on a set S, * is said to be distributive over & whenever: x*(y&z) = (x*y)&(x*z) Boolean algebra has the following properties: 1. Closure with respect to AND (.) and OR (+). 2. 0 is the identity element for OR while 1 is the identity element for AND. 3. Commutative with respect to OR and AND. 4. AND is distributative over OR and OR is distributative over AND. 5. For every element x in B there exists an element x' in B (called the complement or negation of x) such that x+x'=1 and x.x'=0. 6. There exists at least two elements x,y in B such that x is not equal to y. Note that in ordinary algebra, the multiplication operator is distributative over the addition operator but not vice versa. In Boolean algebra AND and OR are both distributative over each other. Also ordinary algebra deals with an infinite continuum of real numbers while Boolean algebra deals with the finite set B={0,1}. Finally, keep in mind that the binary operators of AND and OR are called binary because they deal with a pair of operands not because the operands are limited to two values. (Ref: Digital Design, by M. Morris Mano, Prentice-Hall, 1984.) DeMorgan's Theorem DeMorgan's theorem gives an important relationship among the AND, OR and NOT operators and is expressed as, (AB)' = A' + B' or (A+B)' = A'B' This theorem is valuable in the algebraic simplification of Boolean expressions. It can also be used to convert expressions from SOP to POS forms. Homework: Use DeMorgan's theorem to demonstrate that the NAND operation by itself represents a functionally complete set. Hint: create NAND-only versions of the AND, OR and NOT operations. Complete Problems: A.2 (a,c), A.4 (a,c,e,g) in the textbook.