









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Boolean algebra was developed by the Englishman George Boole, who published the basic principles in the 1854 treatise An Investigation of the Laws of Thought on Which to Found the Mathematical Theories of Logic and Probabilities. The applicability to computing machines was discovered by three Americans Claude Shannon Symbolic Analysis of Relay and Switching Circuits , 1938. George Stibitz An employee of Bell Labs, he developed a binary adder using mechanical relays in 1937, the model “K 1” adder because he built it at home on his kitchen table. John Atanasoff He was probably the first to use purely electronic relays (vacuum tubes) to build a binary adder. Boolean algebra is a two–valued algebra based on the constant values denoted as either FALSE, TRUE 0, 1 The use of this algebra for computation is based on the fact that binary arithmetic is based on two values, always called “0” and “1”.
Boolean algebra is defined in terms of two constants (defined above), which we call “0” and “1”. Other courses will call these values “F” and “T”. Boolean algebra is defined in terms of three basic operators, to which we shall add a useful fourth operator. The three operators are NOT, AND, & OR. Each of these three basic operators is implemented by a basic electronic device called a “logic gate”. We present the gates along with the definition. NOT This function takes one input and produces one output. The gate is shown below. The circle at the right end of the triangle is important. Algebraically, this function is denoted f(X) = X’ or f(X) = X The evaluation of the function is simple: 0 = 1 and 1 = 0.
Logic AND This is a function of two Boolean variables. We denote the logical AND of two Boolean variables X and Y by “X Y”. Some logic books will use “X Y”. The evaluation of the logical AND function is shown by a truth table X Y X Y 0 0 0 0 1 0 1 0 0 1 1 1
While not a basic Boolean operator, the exclusive OR is very handy. Logic XOR This is a function of two Boolean variables. We denote the logical XOR of two Boolean variables X and Y by “X Y”. Most logic books seem to ignore this function. The evaluation of the logical XOR function is shown by a truth table X Y X Y 0 0 0 0 1 1 1 0 1 1 1 0 From this last table, we see immediately that X 0 = X and X 1 = X
Sample Truth Table A B C F1(A, B, C) 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 This truth table for 3 variables has 2 3 = 8 rows, plus a label row. This truth table forms a complete definition of the function. We shall later give it another name, but can base all our discussions on this table.
The row numbers are just labels. They are not really a part of the truth table, but aid in our discussions and conversions to Boolean expressions. The row numbers are the decimal equivalents of the variable values viewed as binary numbers. The first row is always “row 0”. 0 = 04 + 02 + 0 1 1 = 04 + 02 + 1 1 2 = 04 + 12 + 0 1 3 = 04 + 12 + 1 1 4 = 14 + 02 + 0 1 5 = 14 + 02 + 1 1 6 = 14 + 12 + 0 1 7 = 14 + 12 + 1 1 Row Number
These can be viewed as shorthand notation for expressing truth tables.
Example: The Exclusive OR (XOR) function Row Number X Y X Y 0 0 0 0 1 0 1 1 2 1 0 1 3 1 1 0
Answer: The function has three variables, so the truth table has 2 3 = 8 rows, numbered 0 through 7. If rows 0, 2, 4, and 6 have ones, then the rows
The relative precedence of the operators is:
We now ask how to fill a truth table by evaluating a Boolean expression. Example: F(X, Y, Z) = X^ Y Y Z X Y Z Step 1: There are three Boolean variables, so the truth table will have 8 rows. Let’s evaluate this function for all eight possible values of X, Y, Z. Row 0 X = 0 Y = 0 Z = 0 F(X, Y, Z) = 00 + 00 + 0 1 0 = 0 + 0 + 0 = 0 Row 1 X = 0 Y = 0 Z = 1 F(X, Y, Z) = 00 + 01 + 0 1 1 = 0 + 0 + 0 = 0 Row 2 X = 0 Y = 1 Z = 0 F(X, Y, Z) = 01 + 10 + 0 0 0 = 0 + 0 + 0 = 0 Row 3 X = 0 Y = 1 Z = 1 F(X, Y, Z) = 01 + 11 + 0 0 1 = 0 + 1 + 0 = 1 Row 4 X = 1 Y = 0 Z = 0 F(X, Y, Z) = 10 + 00 + 1 1 0 = 0 + 0 + 0 = 0 Row 5 X = 1 Y = 0 Z = 1 F(X, Y, Z) = 10 + 01 + 1 1 1 = 0 + 0 + 1 = 1 Row 6 X = 1 Y = 1 Z = 0 F(X, Y, Z) = 11 + 10 + 1 0 0 = 1 + 0 + 0 = 1 Row 7 X = 1 Y = 1 Z = 1 F(X, Y, Z) = 11 + 11 + 1 0 1 = 1 + 1 + 0 = 1
Here are two sets of theorems in Boolean algebra. For all X 0 X = 0 OK For all X 1 X = X OK For all X 0 + X = X OK For all X 1 + X = 1 What? Consider the following truth tables W X W + X 0 0 0 0 1 1 1 0 1 1 1 1 From this, we derive the truth table proving the last two theorems. X 0 + X 1 + X 0 0 1 1 1 1
If a statement in Boolean algebra is true, so is its dual. To take the dual of an expression do the following: change all logical AND to logical OR and all logical OR to logical AND change all 0 to 1 and 1 to 0. Postulate Dual 0 X = 0 1 + X = 1 1 X = X 0 + X = X 0 + X = X 1 X = X 1 + X = 1 0 X = 0 An Unexpected Pair: Two distributive laws, each the dual of the other. For all Boolean values of Boolean variables A, B, C: A(B + C) = AB + AC For all Boolean values of Boolean variables A, B, C: A + BC = (A + B)(A + C) If A = 1, the statement becomes 1 + BC = (1 + B)(1 + C), or 1 = 11. If A = 0, the statement becomes 0 + BC = (0 + B)(0 + C), or BC = BC.