You are on page 1of 43

BMM 2433

Electric & Electronics Technology

Faculty of Mechanical Engineering


Boolean Algebra
• The mathematics associated with the binary
number system is called Boolean, in honor of
the English mathematician George Boole.
• The variables in a Boolean, or logic, expression
can take only one of two values, usually
represented by the numbers 0 and 1.
• These variables are sometimes referred to as
true (1) and false (0).

Faculty of Mechanical Engineering


OR gate
The OR gate represents the following
logical statement:
If either X or Y is true (1),
then Z is true(1).

Faculty of Mechanical Engineering


Faculty of Mechanical Engineering
AND gate
The AND gate corresponds
to the following logical
statement:
If both X and Y are true (1),
then Z is true (1).

Faculty of Mechanical Engineering


NOT gate
• The NOT gate is essentially an inverter and it provides the complement of
the logic variable connected to its input.
• The complement of a logic variable X is denoted by X Bar.

Faculty of Mechanical Engineering


COMBINATIONAL GATES
Name Symbol Function Truth Table
A B X
A X=A•B 0 0 0
AND X or 0 1 0
1 0 0
B X = AB 1 1 1
A B X
A 0 0 0
OR X X=A+B 0 1 1
1 0 1
B 1 1 1
A X
NOT A X X = A’
0
1
1
0
A X
0 0
Buffer A X X=A 1 1
A B X
A 0 0 1
NAND X X = (AB)’
0
1
1
0
1
1
B 1 1 0
A B X
A 0 0 1
NOR X X = (A + B)’ 0
1
1
0
0
0
B 1 1 0
A B X
A X=AB
XOR X or
0
0
0
1
0
1
Exclusive OR 1 0 1
B X = A’B + AB’
1 1 0
A B X
A X = (A  B)’
XNOR X or
0
0
0
1
1
0
Exclusive NOR
B X = A’B’+ AB 1 0 0
or Equivalence 1 1 1
Faculty of Mechanical Engineering
Faculty of Mechanical Engineering
• Any logic expression can be changed to other
expression by applying Boolean algebra techniques.

A( B  CD)  AB  ACD
AB  B(CD  EF )  AB  BCD  BEF
( A  B)( B  C  D)  AB  AC  AD  BB  BC  BD
( A  B)  C  ( A  B )C  ( A  B )C  AC  BC

Faculty of Mechanical Engineering


EQUIVALENT CIRCUITS
Many different logic diagrams are possible for a given Function
F = ABC + ABC’ + A’C rule: x(y + z) = xy +xz
= AB(C + C’) + A’C rule: x + x’ = 1
= AB • 1 + A’C rule: x • 1 = x
= AB + A’C

(1) A
B
C
F

(2)

A
B
F
C
Using Boolean algebra techniques, simplify the following
expression:
F = AB + A(B+C) +B(B+C)
Solution:
AB + A(B+C) +B(B+C) = AB+AB+AC+BB+BC
= AB+AB+AC+B+BC
= AB+AC+B+BC
= AB+AC+B
= B+AC

Faculty of Mechanical Engineering


AB+A(B+C)+B(B+C) ≡ B+AC

A AB

B B
A A(B+C)
B+AC
B ≡
C
B+C AB+A(B+C)+B(B+C) A
C AC

B B(B+C)
(a) (b)

Equivalent
Faculty of Mechanical Engineering
Using Boolean algebra techniques, simplify the following
expression:
[ A B (C  BD)  A B ]C

Solution:

[ A B(C  BD)  A B]C  ( A BC  A BBD  A B)C

 ( A BC  A.0.D  A B )C

 ( A BC  0  A B )C
 ( A BC  A B )C
Faculty of Mechanical Engineering
( A BC  AB )C  A BCC  A BC
 A BC  A BC
 BC ( A  A)

 BC.1
 BC

Faculty of Mechanical Engineering


EXAMPLE
Simplification of Logical Expression

Faculty of Mechanical Engineering


Assignment & Quiz
• Using Boolean algebra techniques, simplify the following
expression:
1. ABC  ABC  ABC  ABC  ABC
2. AB  AC  A BC

Faculty of Mechanical Engineering


Truth Table to Boolean Function
• It is easy to convert a function to sum-
of-products form using its truth table.
• We are interested in the values of the
variables that make the function true
(=1).
• Using the truth table, we list the values
of the variables that result in a true
function value.
• Each group of variables is then ORed
together.

Faculty of Mechanical Engineering


Determining Standard Expression from a Truth
Table (example)
I/P O/P • There are four 1s in  There are four 0s in

SOP POS
A B C X the output and the the output and the
0 0 0 0 corresponding corresponding
0 0 1 0 binary value are binary value are
0 1 0 0 011, 100, 110, and 000, 001, 010, and
0 1 1 1 111. 101.
000  A  B  C
011  A BC
1 0 0 1 100  AB C 001  A  B  C
1 0 1 0 110  ABC 010  A  B  C
1 1 0 1 111  ABC 101  A  B  C
1 1 1 1
X  A BC  AB C  ABC  ABC

X  ( A  B  C )( A  B  C )( A  B  C )( A  B  C )
Truth Table to Boolean Function

Faculty of Mechanical Engineering


Faculty of Mechanical Engineering
The Karnaugh Map
The Karnaugh Map
• Feel a little difficult using Boolean algebra
laws, rules, and theorems to simplify logic?
• A K-map provides a systematic method for
simplifying Boolean expressions and, if
properly used, will produce the simplest SOP
or POS expression possible, known as the
minimum expression.
The 3 Variable K-Map
• There are 8 cells as shown:

C
0 1
AB

00 ABC ABC
01 A BC A BC
11 ABC ABC
10 AB C AB C
The 4-Variable K-Map
CD
00 01 11 10
AB
00 ABC D ABC D A B CD A B CD

01 A BC D A BC D A BCD A BCD

11 ABC D ABC D ABCD ABCD

10 AB C D AB C D AB CD AB CD
Mapping a Standard SOP Expression
• For an SOP expression C
in standard form: 0 1
– A 1 is placed on the K-
AB
map for each product
term in the expression. 00 ABC ABC
– Each 1 is placed in a cell
corresponding to the 01 A BC A BC
value of a product term.
– Example: for the product 11 ABC ABC
term AB C , a 1 goes in the
101 cell on a 3-variable
map. 10 AB C AB C
Mapping a Standard SOP Expression
(full example)
The expression:
C
A B C  A B C  ABC  AB C 0 1
AB
000 001 110 100
00
1 1
01
Practice:
A B C  A BC  ABC  ABC
A BC  AB C  AB C 11 1
A B CD  A BC D  ABC D  ABCD  ABC D  A B C D  AB CD

10
1
Grouping the 1s (rules)
1. A group must contain either 1,2,4,8,or 16 cells
(depending on number of variables in the
expression)
2. Each cell in a group must be adjacent to one or
more cells in that same group, but all cells in the
group do not have to be adjacent to each other.
3. Always include the largest possible number of 1s in
a group in accordance with rule 1.
4. Each 1 on the map must be included in at least one
group. The 1s already in a group can be included in
another group as long as the overlapping groups
include noncommon 1s.
Grouping the 1s (example)

C C
AB 0 1 AB 0 1

00 1 00 1 1
01 1 01 1
11 1 1 11 1
10 10 1 1
Grouping the 1s (example)
CD CD
AB 00 01 11 10 AB 00 01 11 10

00 1 1 00 1 1

01 1 1 1 1 01 1 1 1

11 11 1 1 1

10 1 1 10 1 1 1
Determining the Minimum SOP
Expression from the Map
• The following rules are applied to find the
minimum product terms and the minimum
SOP expression:
1. Group the cells that have 1s. Each group of cell
containing 1s creates one product term
composed of all variables that occur in only one
form (either complemented or complemented)
within the group. Variables that occur both
complemented and uncomplemented within the
group are eliminated  called contradictory
variables.
Determining the Minimum SOP
Expression from the Map
2. Determine the minimum product term for each
group.
• For a 3-variable map:
1. A 1-cell group yields a 3-variable product term
2. A 2-cell group yields a 2-variable product term
3. A 4-cell group yields a 1-variable product term
4. An 8-cell group yields a value of 1 for the expression.
• For a 4-variable map:
1. A 1-cell group yields a 4-variable product term
2. A 2-cell group yields a 3-variable product term
3. A 4-cell group yields a 2-variable product term
4. An 8-cell group yields a a 1-variable product term
5. A 16-cell group yields a value of 1 for the expression.
Determining the Minimum SOP
Expression from the Map
3. When all the minimum product terms are
derived from the K-map, they are summed to
form the minimum SOP expression.
Determining the Minimum SOP
Expression from the Map (example)

CD
00 01 11 10 B  A C  AC D
AB
00 1 1 AC
01 1 1 1 1 B
11 1 1 1 1
AC D
10 1
Determining the Minimum SOP
Expression from the Map (exercises)
C C
AB 0 1 AB 0 1

00 1 00 1 1
01 1 01 1
11 1 1 11 1
10 10 1 1

AB  BC  A B C B  A C  AC
Determining the Minimum SOP
Expression from the Map (exercises)
CD CD
AB 00 01 11 10 AB 00 01 11 10

00 1 1 00 1 1

01 1 1 1 1 01 1 1 1

11 11 1 1 1

10 1 1 10 1 1 1
A B  A C  AB D D  AB C  BC
Practicing K-Map
AB C  A BC  A B C  A B C  AB C
B  AC

B C D  A BC D  ABC D  A B CD  AB CD 
A B CD  A BCD  ABCD  AB CD

D  BC
Mapping Directly from a Truth Table
I/P O/P
A B C X C
0 0 0 1 0 1
AB
0 0 1 0
0 1 0 0 00 1
0 1 1 0
1 0 0 1 01
1 0 1 0
1 1 0 1 11 1
1
1 1 1 1
10 1
Rules of Boolean Algebra

1. A  0  A 7. A  A  A
2. A  1  1 8. A  A  0
3. A  0  0 9. A  A
4. A  1  A 10. A  AB  A
5. A  A  A 11 . A  A B  A  B
6. A  A  1 12.( A  B )( A  C )  A  BC
___________________________________________________________
A, B, and C can represent a single variable or a combination of variables. 7
XOR Gate

• Another very useful gate is the exclusive OR (XOR)


gate.
• The output of the XOR operation is true only when the
values of the inputs differ.

Note the special symbol


 for the XOR
operation.

41
NAND and NOR gates

• NAND and NOR


are two very
important gates.
Their symbols and
truth tables are
shown at the right.

42
NAND and NOR are
known as universal
gates because they are
inexpensive to
manufacture and any
Boolean function can
be constructed using
only NAND or only
NOR gates.

43

You might also like