Tuesday, October 9, 2012

Boolean Algebra - 1



BOOLEAN ALGEBRA

 

INTRODUCTION

Mathematics is a kind of shorthand that enables one to present a physical process on paper, with symbols that may manipulate in order to begin a better understanding of the process. It is therefore a tool that aids understanding. The familiar kind of Algebra is a branch of mathematics that deals with variables like x, y, z etc. and represents combinations and polynomials. In this Algebra the variables can assume any value of an infinite set of values. This algebra is performed by analog operational amplifiers. In the case when the variables can assume only two possible values that is for binary variables George Boole evolved another set of Algebra in 1854. This algebra has come to be known as Boolean Algebra after the named of the inventor.
The switching network in a computer can be very complex, and the logic of a complicated program can be very difficult to analyze. Boolean Algebra provides a systematic method of representation and analysis.
A single illustration will show why mathematical logic is important in the design of computers. If an electronic switch is open, we shall assign the value 0, and if it is closed, we shall assign the value 1. These two states of switch will correspond to the values of false (0) and true (1) in symbolic logic of Boolean Algebra. Two switches which operate independently such that there is current at the output line C only if both switches A and B are closed can be described by Boolean statement A AND B. A circuit in which there will be current at C if either A or B is closed is described by the Boolean statement A OR B. The result from these circuits can be described by examining the effect on output C. The work of Boole and others in the mathematics of symbolic logic thus provided an analytical basis for Computer design.


TRUTH TABLE

In the field of numerical mathematics, theorems may be proved and operations defined by the process of enumeration of all possible solutions. Enumeration is particularly well suited to Boolean Algebra since it involves only two values 1 and 0 and the required enumeration of all possible solutions is within manageable limits. A truth table is an enumeration of all solutions of Boolean expression or function.

BASIC BOOLEAN OPERATORS

NOT, AND and OR are three primary and EX-OR, NAND and NOR are three secondary operators of Boolean Algebra. The AND operation of two binary variables A and B with result C is defined by the truth table of AND.

 

Truth Table AND

A
B
C = A AND B
0
0
0
1
0
0
0
1
0
1
1
1

From this table one can see that the output of an AND operation is 1, if and only if, both the inputs are 1’s or in general case, the output is 1 when all the inputs are 1’s.

AND is a logical binary operator and can also be represented by two switches. In the electrical theory, AND can be modeled by current flow controlled by two switches. In the circuit, current will flow only when both the switches are closed. Such a condition is realized by having two switches in series.


 Second basic operation of Boolean Algebra is OR.

 

Truth Table OR

A
B
C = A OR B
0
0
0
1
0
1
0
1
1
1
1
1

In Boolean Algebra, the ‘+’ sign indicates an OR operation. In OR, in the case of both the operands being 1 the output is 1. An expression formed with the OR operator is true if either of the given proposition is true or if all the proposition are true.

Applied to electrical engineering, the OR operation can be represented as current controlled by switches placed in parallel. Current flow occurs when either of the two switches or both the switches are closed.
 The third Boolean operation called NOT or negation is an inversion operation. It is the only binary operation in Boolean Algebra and is performed on a single bit at a time. In this operation a sequence of bits is inverted by replacing 0’s by 1’s and vice-versa. The inverse of a sequence A is denoted by A’.

 

Truth Table NOT

A
A’
0
1
1
0

Exclusive OR or the EX-OR operator defines a relationship between two Boolean variables according to which an expression formed with Exclusive-OR is true if either one of the two propositions is true, but is false when both the propositions are true (i.e. they are mutually exclusive).
Truth table EX-OR
A
B
C = A Å  B
0
0
0
1
0
1
0
1
1
1
1
0

With regard to switches, it requires four switches performing a combination of three primary operations to implement  EX-OR. It can be written as   ( A AND B’) OR (A’ AND B)
 
NAND is another secondary Boolean operator, which can be thought of as a series combination of AND followed by NOT operation. An expression with the NAND operator is true if either one of the two propositions is false or  both of them are false. The expression is written as A NAND B.
Truth Table NAND
A
B
C = A NAND B
0
0
1
1
0
1
0
1
1
1
1
0




In the terms of electrical switches, NAND operation represents a parallel combination of two switches.






NOR is the last of the secondary Boolean operators. It is a series combination of  OR followed by NOT.  An expression formed by NOR is true if and only if both the constituent propositions are false. The expression is written as A NOR B.

Truth Table NOR

A
B
C = A NOR B
0
0
1
1
0
0
0
1
0
1
1
0

In terms of switches, the configuration is schematically similar to AND operator.



No comments:

Post a Comment