t15ABooleanAlgebraIntroduction

t15ABooleanAlgebraIntroduction - Department of Computer and...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Department of Computer and Information Science, School of Science, IUPUI CSCI 240 Boolean Algebra Introduction Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu Dale Roberts Boolean Algebra We observed in our introduction that early in the development We of computer hardware, a decision was made to use binary circuits because it greatly simplified the electronic circuit design. design. In order to work with binary circuits, it is helpful to have a In conceptual framework to manipulate the circuits algebraically, building only the final “most simple” result. building George Boole (1813-1864) developed a mathematical structure George to deal with binary operations with just two values. Today, we call these structures Boolean Algebras. Boolean Dale Roberts Boolean Algebra Defined A Boolean Algebra B is defined as a 5-tuple {B, +, *, ’, 0, 1} Boolean ’, + and * are binary operators,’ is a unary operator. and binary unary The following axioms must hold for any elements a, b, c ∈ {0,1} The Axiom #1: Closure If a and b are elements of B, (a + b) and (a * b) are in B. If Axiom #2: Cardinality There are at least two elements a and b in B such that a != b. There Axiom #3: Commutative If a and b are elements of B If (a + b) = (b + a), and (a * b) = (b * a) Dale Roberts Axioms Axiom #4: Associative If a and b are elements of B (a + b) + c = a + (b + c), and (a * b) * c = a * (b * c) Axiom #5: Identity Element B has identity elements with respect to + and * 0 is the identity element for +, and 1 is the identity element for * a + 0 = a and a * 1 = a Axiom #6: Distributive * is distributive over + and + is distributive over * is a * (b + c) = (a * b) + (a * c), and a + (b * c) = (a + b) * (a + c) Axiom #7: Complement Element For every a in B there is an element a' in B such that For a + a' = 1, and a * a' = 0 Dale Roberts Terminology Element 0 is called “FALSE”. Element 1 is called “TRUE”. ‘+’ operation “OR”,‘*’ operation “AND” and ’ operation +’ “NOT”. Juxtaposition implies * operation: ab = a * b ab Operator order of precedence is: (), ’, *, +. Operator ’, a+bc = a+(b*c) ≠ (a+b)*c a+bc (a+b)*c ab’ = a(b’) ≠ (a*b)’ Single Bit Boolean Algebra(1’ = 0 and 0’ = 1) + 0 0 0 1 1 * 0 0 0 1 0 1 1 1 1 0 1 Dale Roberts Proof by Truth Table Consider the distributive theorem: a + (b * c) = (a + b)*(a + c). Consider (b Is it true for a two bit Boolean Algebra? Is Can prove using a truth table. How many possible Can combinations of a, b, and c are there? and Three variables, each with two values: 2*2*2 = 23 = 8 Three a b c b*c a+(b*c) a+b a+c (a+b)*(a+c ) 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 Dale Roberts n-bit Boolean Algebra Single bit Boolean Algebra can be extended to n-bit Boolean Single n-bit Algebra by define sum(+), product(*) and complement(‘) as bitand wise operations Let a = 1101010, b = 1011011 a + b = 1101010 + 1011011 = 1111011 1101010 a * b = 1101010 * 1011011 = 1001010 1101010 a’ = 1101010’ = 0010101 Principle of Duality The dual of a statement S is obtained by interchanging * and +; 0 and 1. and Dual of (a*1)*(0+a’) = 0 is (a+0)+(1*a’) = 1 Dual Dual of any theorem in a Boolean Algebra is also a theorem. Dual This is called the Principle of Duality. Principle Dale Roberts Named Theorems All of the following theorems can be proven based on the axioms. All They are used so often that they have names. They Idempotent a+a=a a*a=a Boundedness a+1=1 a*0=0 Absorption a + (a*b) = a a*(a+b) = a Associative (a+b)+c=a+(b+c) (a*b)*c=a*(b*c) The theorems can be proven for a two-bit Boolean Algebra using The a truth table, but you must use the axioms to prove it in general for all Boolean Algebras. general Dale Roberts More Named Theorems Involution (a’)’ = a DeMorgan’s (a+b)’ = a’ * b’ (a*b)’=a’ + b’ DeMorgan’s Laws are particularly important in circuit design. It DeMorgan’s says that you can get rid of a complemented output by complementing all the inputs and changing ANDs to ORs. (More about circuits coming up…) about Dale Roberts Proof using Theorems Use the properties of Boolean Algebra to reduce (x + Use y)(x + x) to x. Warning, make sure you use the laws y)(x precisely. precisely. (x + y)(x + x) (x Given (x + y)x (x Idempotent x(x + y) x(x Commutative x Absorption Unlike truth tables, proofs using Theorems are valid for any boolean algebra, but just bits. Dale Roberts Sources Lipschutz, Discrete Mathematics Mowle, A Systematic Approach to Digital Logic Design Dale Roberts ...
View Full Document

This note was uploaded on 01/12/2011 for the course CSCI 240 taught by Professor Won during the Spring '10 term at University of Phoenix.

Ask a homework question - tutors are online