BOOLEAN LOGIC
Boolean algebra developed by George Boole in 1854 deals with binary
values and logical operations and hence is also known as Binary
Algebra or Logical Algebra. It helps us in analysing and simplifying the
digital circuits. It is also called Switching Algebra.
Basic terms of Boolean algebra are:
a) Logical Statements: The statements which can take only two values
i.e. either True or False.
b) Logical Constants: There are two logical constants – True and False.
c) Binary valued variables: Those variables which can take only two
values are called binary valued variables.
d) Compound statements: Logical statements which are combined with
the help of logical operators form compound statements. NOT, AND, OR
are the logical operators.
e) Truth Table: A truth table consists of rows and columns. It is the
tabular representation of all the possible values of logical variables with
all the possible outcomes for the given combination values.
f) Tautologies: The compound logical statements which are always true.
g) Fallacies: The compound logical statements which are always false.
A Boolean function is defined by a Boolean expression consisting of
binary variables, constants 0 or 1 and logical operators. For example: A
Boolean function F (A, B, C) can be defined as:
F (A, B, C) = A.B + B.C + A.C
Where LHS represents output Y of the logical expression. Hence, we
can say
Y = A.B + B.C + A.C
A Boolean expression is a logical expression that produces a Boolean
value i.e., true or false when evaluated.
Boolean algebra uses three basic logical operators:-
• NOT operator – It operates on single input and gives complement of
the input as output. It is represented by an over bar or apostrophe on
the variable to be operated. Thus if A = 0, then A' =1 and vice versa.
Most programming languages use a ‘!’ (Exclamation sign) as a NOT
operator.
• OR operator – It is a binary operator equivalent to a logical (+)
addition. Thus A + B + C imply A OR B OR C. This operator gives a
true (i.e. 1) if any of the operand is True or 1.
• AND operator – It is a binary operator equivalent to logical (·)
multiplication. Thus A · B implies A AND B. It gives a true (i.e. 1) only
if both the operands are True or 1.
A logical variable can take only two values i.e. either a binary 1 or a
binary 0. Although, there can be infinite number of variables in a
Boolean expression. While evaluating Boolean expression the order of
evaluation of logical operators is NOT, AND then OR, Parenthesis is
evaluated first.
Truth Table – It is tabulated form of all the possible input combinations
and their respective outputs. The number of possible input
combinations for a Boolean expression is 2n, where n is the number of
input variables. Hence, for a Boolean function F(A,B), number of
possible combinations will be 22 i.e. 4 and for a Boolean function
F(A,B,C,D) it will be 24 i.e. 16.
For the function F(A,B,C) = A.B + B.C + A . C, there will be 8 possible
combinations and hence 8 rows in the truth table as given below:
A B C A.B B.C A.C Y
0 0 0 0 0 1 1
0 0 1 0 0 0 0
0 1 0 0 0 1 1
0 1 1 0 1 0 1
1 0 0 0 0 0 0
1 0 1 0 0 0 0
1 1 0 1 0 0 1
1 1 1 1 1 0 1
Switching Circuits: The fundamental operation of Boolean algebra can
be illustrated by switching circuits. A switch is an electric device which
controls the flow of current.
a) When a switch is OFF, no current flows in the circuit. A switch in
OFF state is called open switch.
b) When a switch is ON, current flows in the circuit. A switch in ON
state is called closed circuit.
Open switch Closed switch
Switching circuit for AND operation
Switching circuit for OR operation
Switching circuit for NOT operation
Logic circuit, electric circuit whose output depends upon the input in a
way that can be expressed as a function in symbolic logic; it has one or
more binary inputs (capable of assuming either of two states, e.g., ON
or OFF) and a single binary output. Logic circuits that perform
particular functions are called logic gates.
Logic Gate is simply an electronic circuit which takes one or more
electronic signals as input to give an output.
NOT Gate is an inverter circuit that operates on single input. It gives
complement of the input as the output. It is represented by the
following symbol:
A
A
’
Truth Table of NOT:
A Y=A’
0 1
1 0
AND Gate gives a high (1) output if both the inputs are high (1).
Algebraically it is represented by a (.) dot. Its electronic symbol is:
B AND A.B
Truth Table of AND:
A B A.B
0 0 0
0 1 0
1 0 0
1 1 1
OR Gate gives a high input if any one of the inputs is high. Its algebraic
symbol is (+) Plus, and electronically it is represented as
A+B
Truth Table of OR Gate:
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
NAND Gate is inverter of AND gate. It gives a High Input if any of the
inputs is low. Its symbol is AND Gate with a small circle at the output
implying inversion.
A.B
Truth table of NAND gate
A B X=A.B X’
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0
NOR Gate is inverter of OR. Its output is low if any of the inputs is
high. Its symbol is OR Gate with a small circle at the output implying
inversion.
A
A+B
B
Truth table of NOR Gate:
A B X=A+B
0 0 1
0 1 0
1 0 0
1 1 0
XOR Gate gives a high output if odd number of inputs is high. It is used
to detect the mismatch of bits. Its algebraic symbol is ⊕. Its electronic
symbol is:
Truth table of XOR Gate:
A B O=A⊕B
0 0 0
0 1 1
1 0 1
1 1 0
Basic Rules (Postulates) of Boolean algebra
• X + 0 = X or 0 +X = X
• X + 1 = 1 or 1 + X = 1
• X.0 = 1
• X.1 = X
Laws used in Boolean algebra are summed up in the table given below:
LAW AND OR
Commutative Law A.B = B.A A+B=B+A
Associative Law A.(B.C) = (A.B).C A + (B + C) = (A + B) + C
Distributive Law A.(B + C) = A.B + A.C A + (B.C) = (A + B).(A + C)
Identity Law A.1 = A A+0=A
Idempotent Law A.A = A A+A=A
Complement /
Inverse Law A.A = 0 A+A=1
Absorption Law A.(A+B)=A A+(A.B)=A
Involution Law A'' =A
Commutative Law of addition for two variables:
Commutative Law of addition for two variables:
Associative Law of multiplication for three variables:
Associative Law of addition for three variables:
Distributive Law for addition:
Distributive Law for multiplication:
Identity Law:
Idempotent Law:
A A+A=A
A A.A=A
Complement / Inverse Law:
Absorption Law:
A+A.B = A
(A+B).A=A
Involution Law:
De Morgan's theorems
i) (X + Y)’ = X’ • Y’ - The complement result of the OR operation is
equal to the AND operation of the complement of variables. Thus, it is
the equivalent of the NOR function and is a negative-AND function
proving that (X+Y)' = X'.Y'. Truth table is as under:
X Y X+Y (X+Y)’ X’ Y’ X’.Y’
1 0 1 0 0 1 0
1 1 1 0 0 0 0
0 0 0 1 1 1 1
0 1 1 0 1 0 0
ii) (X • Y)’ = X’ + Y’ - The complement result of the AND operation is
equal to the OR operation of the complement of that variable. Thus, it is
equivalent to the NAND function and is a negative-OR function proving
that (X.Y)' = X'+Y'. Truth table is as under:
X Y X.Y (X.Y)’ X’ Y’ X’+Y’
0 1 0 1 1 0 1
0 0 0 1 1 1 1
1 1 1 0 0 0 0
1 0 0 1 0 1 1