Professional Documents
Culture Documents
Boolean operations
EE202-Boolean Operations
An AND gate can have two or more inputs but will always have a single output.
Table 2.1 shows the symbol, Boolean Expression and truth table for two input AND gate.
AND gate operation : Any LOW input will cause a LOW output and only when ALL inputs
are HIGH the output will be HIGH.
In Boolean Algebra the AND operation is indicated with a .. This . is also used to
indicate multiplication.
EE202-Boolean Operations
Table 2.1 : AND gate
LOGIC GATE
BOOLEAN
EXPRESSION
SYMBOL
X = A B
AND
TRUTH TABLE
A
0
0
1
1
B
0
1
0
1
X
0
0
0
1
EXERCISE
EE202-Boolean Operations
(ii) OR GATE
The OR gate can have two or more inputs but will always have a single output.
Table 2.2 shows the symbol, Boolean Expression and truth table for two inputs OR gate.
OR gate operation : The OR gate produces a HIGH output if any input is HIGH; if all inputs
are LOW, the output is LOW.
SYMBOL
BOOLEAN
EXPRESSION
X = A+ B
OR
TRUTH TABLE
A
0
0
1
1
B
0
1
0
1
X
0
1
1
1
EXERCISE
EE202-Boolean Operations
Table 2.3 shows the symbol, Boolean Expression and truth table for NOT gate.
NOT gate operation : When the input is LOW, the output is HIGH; when the input is HIGH,
the output is LOW.
Table 2.3 : NOT gate
LOGIC GATE
BOOLEAN
EXPRESSION
SYMBOL
NOT
Y = A
TRUTH TABLE
A
0
1
Y
1
0
The name NAND is a combination of the two words NOT and AND.
Table 2.4 shows the symbol, Boolean Expression and truth table for two inputs NAND gate.
NAND gate operation : The NAND gate produces a LOW output when all inputs are
HIGH; otherwise, the output is HIGH.
5
EE202-Boolean Operations
Table 2.4 : NAND gate
LOGIC GATE
SYMBOL
BOOLEAN
EXPRESSION
X=
A.B
NAND
TRUTH TABLE
A
0
0
1
1
B
0
1
0
1
X
1
1
1
0
EXERCISE
Let do an exercise!
Draw a symbol, write a boolean
expression and construct the truth
table for a three-input NAND
gate.
EE202-Boolean Operations
The name NOR is a combination of the two words NOT and OR.
Table 2.5 shows the symbol, Boolean Expression and truth table for two inputs NOR gate.
NOR gate operation : The NOR gate produces a LOW output if any input is HIGH; if all
inputs are LOW, the output is HIGH.
SYMBOL
NOR
BOOLEAN
EXPRESSION
X=
A+ B
TRUTH TABLE
A
0
0
1
1
B
0
1
0
1
X
1
0
0
0
EE202-Boolean Operations
EXERCISE
Let do an exercise!
Draw a symbol, write a boolean
expression and construct the truth
table for a three-input NOR gate.
XOR gate operation : The XOR gate produces a HIGH output only when both inputs are at
opposite logic levels.
Table 2.6 shows the symbol, Boolean Expression and truth table for two inputs XOR gate.
SYMBOL
XOR
BOOLEAN
EXPRESSION
X = A B
= AB + A B
TRUTH TABLE
A
0
0
1
1
B
0
1
0
1
X
0
1
1
0
EE202-Boolean Operations
XNOR gate is simply an XOR gate followed by a NOT gate as shown below :
XNOR gate operation : The XNOR gate produces a HIGH output only when both inputs
are at the same logic level.
Table 2.7 shows the symbol, Boolean expression and truth table for two inputs XNOR gate.
Table 2.7 : XNOR Gate
LOGIC GATE
SYMBOL
XNOR
BOOLEAN
EXPRESSION
X = A B
= A B + AB
TRUTH TABLE
A
0
0
1
1
B
0
1
0
1
X
1
0
0
1
EE202-Boolean Operations
UNIVERSAL GATES
A universal gate is a gate which can implement any Boolean function without need to
use any other gate type.
Table 2.8 below shows the NAND gate equivalents of NOT, AND and OR gates.
EXERCISE
10
EE202-Boolean Operations
Combinational logic employs the use of two or more of the basic logic gates to form a more
useful,complex function.
Example 1: Write the boolean expression for the logic circuit below.
Solution : X = A ( B + C )
Example 2 : Draw the logic circuit for the following Boolean expression.
Y = AB + C (M + N )
Solution :
EXERCISE
11
EE202-Boolean Operations
BOOLEAN ALGEBRA
INTRODUCTION
Boolean Addition :
Addition is equivalent to the OR operation. The sum term is 1 if one or more if the
literals are 1. The sum term is zero only if each literal is 0.
Example : Determine the values of A, B, and C that make the sum term of the
expression A + B + C = 0
Boolean Multiplication :
A B C =1.
12
EE202-Boolean Operations
OR Gate Rules
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
13
EE202-Boolean Operations
Involution Rule
Double Inversion Rule state that if a variable is inverted twice,then the variable will be
back to its original state.
A =
(9)
Rule No.10
A + AB
= A(1 + B )
= A
Rule No.11
A + AB = ( A + AB ) + AB
= ( AA + AB ) + AB
= AA + AB + A A + AB
= ( A + A)( A + B )
= 1 ( A + B)
= ( A + B)
14
EE202-Boolean Operations
Commutative Law : Combining elements in such a manner that the result is independent
of the order in which the elements are taken.
A+B = B+ A
..(12)
AB = B A
..(13)
Associative Law : Combining elements such that when the order of the elements is
preserved,the result is independent of the grouping.
A + (B + C) = ( A + B) + C
A (B C) = ( A B) C
.(14)
..(15)
Distributive Law : Production the same element when operating on a whole as when
operating on each part and collecting the results.
A ( B + C ) = AB + AC
(W + X)(Y + Z) =WY+WZ+ XY+ XZ
.(16)
..(17)
De Morgans Theorems
o De Morgans First Theorem : The complement of a product of variables is equal
to the sum of the complemented variables.
A B = A + B
..(18)
15
EE202-Boolean Operations
o De Morgans Second Theorem : The complement of a sum of variables is equal
to the product of the complemented variables.
..(19)
A+ B = AB
o Example : Apply DeMorgans theorem to remove the overbar covering both terms
from the expression X = C + D
o Solution :
o Break the overbar covering both terms and change the sign between the
terms.
o The result is X = C D
o Deleting the double bar gives X = C D
Sum-of-Product (SOP)
o
A minterm is the product of N distinct literals where each literal occurs exactly
once.
To derive the SOP form from a truth table, OR together all of the minterms which
give a value of 1.
16
EE202-Boolean Operations
o
Example : Examine this truth table and then write SOP expression describing the
output.
OUTPUT (Y)
Solution :
A
OUTPUT (Y)
SOP
ABC
ABC
A BC
ABC
17
EE202-Boolean Operations
Product-of-Sum (POS)
o
A maxterm is the sum of N distinct literals where each literal occurs exactly once.
To derive the POS form from truth table, AND together all of the maxterms which
give a value of 0.
Example : Examine this truth table and then write POS expression describing the
output.
OUTPUT (Y)
Solution :
A
OUTPUT (Y)
POS
A+ B +C
A+ B +C
A+ B +C
A+ B +C
Answer : Y = ( A + B + C ) ( A + B + C ) ( A + B + C ) ( A + B + C )
18
EE202-Boolean Operations
EXERCISE
Let do an exercise!
Develope the Boolean Expression from a
truth table in both SOP and POS forms.
(i) X = B ( A + C ) + C
(ii) P = ABC + ABC + ABC
19
EE202-Boolean Operations
Solution :
(i)
X = B( A + C ) + C
= AB + BC + C
..(16)
= AB + C ( B + 1)
(3)
= AB + C
= AB(C + C ) + ABC
= AB + ABC
= A( B + BC )
(16)
= A( B + C )
(11)
= AB + AC
(16)
EXERCISE
Show that ( X Y + Z )( X + Y ) Z = XZ + YZ .
Lets Try!
20
EE202-Boolean Operations
(ii)
Karnaugh map,named for its originator Maurice Karnaugh is another method of simplifying
logic circuits.
It is similar to a truth table in that it graphically shows the output level of a boolean
expression for each of the possible input variable combinations.
K-map can be used to simplify equations having two,three,four,five or six different input
variables.Solving five and six variables K-maps is extremely cumbersome;they can be
more practically solved using advanced computer techniques.
Determining the number of cells in a K-map is the same as finding the number of
combinations or entries in a truth table.
A two-variable map requires 22 =4 cells.A three-variable map requires 23=8 cells and a
four-variable map requires 24=16 cells.
2-variables k-map
3-variables k-map
Solution :
o
4-variables k-map
Loop 1 : A B ; Loop 2 : AC
Answer : A B + AC
21
EE202-Boolean Operations
X = A( BC + BC ) + ABC
Solution :
Technique :
o
Find each term of the final SOP equation by determining which variables
remain constant within each circle.
LOOP 1 : A B
LOOP 2 : AC
Answer : A B + AC
22
EE202-Boolean Operations
EXERCISE
1. Complete the output level for each input combination shown on the truth table for a 3-input OR
gate.
A
L
H
L
L
INPUTS
B
L
L
H
L
OUTPUT
X
C
L
L
L
H
2. Determine the output, for a 4-input NAND gate with the input waveform shown in figure 2.
OUTPUT
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
0
1
0
0
1
1
0
Which of those Boolean expressions is simpler for this particular truth table? Which will be
easier to reduce to simplest form (for the purpose of creating a gate circuit to implement it)?
6. Use a Karnaugh map to simplify the following standard SOP expression:
X Y Z + XY Z + X YZ + X Y Z + X Y Z + XYZ
23