Vous êtes sur la page 1sur 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

AND
OR

X
B

X=AB
or
X = AB

A
X

X=A+B

NOT

X = A

Buffer

X=A

NAND

A
X

X = (AB)

NOR

X = (A + B)

X=AB
or
X = AB + AB

X = (A B)
or
X = AB+ AB

XOR

Exclusive OR

XNOR

Exclusive NOR
or Equivalence

Truth Table
A
0
0
1
1
A
0
0
1
1

A
0
0
1
1
A
0
0
1
1
A
0
0
1
1
A
0
0
1
1

B
0
1
0
1
B
0
1
0
1

A
0
1
A
0
1
B
0
1
0
1
B
0
1
0
1
B
0
1
0
1
B
0
1
0
1

X
0
0
0
1
X
0
1
1
1
X
1
0
X
0
1
X
1
1
1
0
X
1
0
0
0
X
0
1
1
0
X
1
0
0
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 + AC
= AB(C + C) + AC
= AB 1 + AC
= AB + AC

(1)

rule: x(y + z) = xy +xz


rule: x + x = 1
rule: x 1 = x

A
B
C
F

(2)
A
B
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)
A

B+AC

AB

B
A

A(B+C)

B
B+C

C
B

B+AC

AB+A(B+C)+B(B+C)

A
C

AC

B(B+C)

(a)

(b)

Equivalent
Faculty of Mechanical Engineering

Using Boolean algebra techniques, simplify the following


expression:

[ AB(C BD) AB]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 A B )C

ABCC ABC

ABC ABC
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 ABC

Faculty of Mechanical Engineering

Truth Table to Boolean Function


It is easy to convert a function to sumof-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
A B C
X

0
0
0
0
1
1
1
1

0
0
1
1
0
0
1
1

0
1
0
1
0
1
0
1

0
0
0
1
1
0
1
1

There are four 1s in


the output and the
corresponding
binary value are
011, 100, 110, and
111.

There are four 0s in


the output and the
corresponding
binary value are 000,
001, 010, and 101.

SOP POS
011 A BC

000 A B C

100 AB C

001 A B C

110 ABC

010 A B C

111 ABC

101 A B C

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

00

ABC

ABC

01

A BC

A BC

11

ABC

ABC

10

AB C

AB C

AB

The 4-Variable K-Map


CD
AB

00

01

11

10

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
in standard form:
A 1 is placed on the Kmap for each product
term in the expression.
Each 1 is placed in a cell
corresponding to the
value of a product term.
Example: for the product
term AB C , a 1 goes in the
101 cell on a 3-variable
map.

00

ABC

ABC

01

A BC

A BC

11

ABC

ABC

10

AB C

AB C

AB

Mapping a Standard SOP Expression


(full example)
The expression:
A B C A B C ABC AB C
000

001

110

C
AB

A B C A BC ABC ABC
A BC AB C AB C

100

00
Practice:

01
11

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

10

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
AB
00

10

00

01

11

01
11

C
AB

10

1
1

Grouping the 1s (example)


CD
00
AB

01

00

01

11

11
10

10

CD
00
AB

01

11

10

00

01

11

10

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.
2.
3.
4.

A 1-cell group yields a 3-variable product term


A 2-cell group yields a 2-variable product term
A 4-cell group yields a 1-variable product term
An 8-cell group yields a value of 1 for the expression.

For a 4-variable map:


1.
2.
3.
4.
5.

A 1-cell group yields a 4-variable product term


A 2-cell group yields a 3-variable product term
A 4-cell group yields a 2-variable product term
An 8-cell group yields a a 1-variable product term
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
AB

01

00

11

10

01

11

10

B A C AC D
AC

B
AC D

Determining the Minimum SOP


Expression from the Map (exercises)
C
AB
00

00

01

11

01
11

AB

10

10
AB BC A B C

B A C AC

Determining the Minimum SOP


Expression from the Map (exercises)
CD
00
AB

01

00

01

11

11
10

A B A C AB D

10

CD
00
AB

01

11

10

00

01

11

10

1
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

A
0
0
0
0
1
1
1
1

B
0
0
1
1
0
0
1
1

O/P

C
0
1
0
1
0
1
0
1

X
1
0
0
0
1
0
1
1

AB
00

01
11

10

Rules of Boolean Algebra


1. A 0 A
2. A 1 1
3. A 0 0
4. A 1 A
5. A A A
6. A A 1

7. A A A
8. A A 0
9. A A
10. A AB A
11. A A B A B
12.( A B )( A C ) A BC

___________________________________________________________
A, B, and C can represent a single variable or a combination of variables.

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

Vous aimerez peut-être aussi