Boolean Algebra and Logic Simplification
Boolean Algebra and Logic Simplification
Boolean Algebra and Logic Simplification
Page 1
Discrete Mathematics
Page 2
Discrete Mathematics
Page 3
Discrete Mathematics
Page 4
Discrete Mathematics
Rule2: (1+B) = 1
=A
Rule4: A. 1 = A
Rule10 (A=A+AB)
= (AA+AB) + AB
Rule7:
= AA + AB +AA +AB
Rule8:
A = AA
adding AA = 0
= (A+A) (A+B)
Factoring
= 1. (A+B)
Rule6: A+A=1
= A+ B
Rule4: 1. X = X
Page 5
Discrete Mathematics
Rule 12: (A + B)(A + C) = A + BC, this rule can be proved as
follows:
(A + B)(A + C) = AA + AC + AB + BC
low
Distributive
= A + AC + AB + BC
Rule7: AA = A
= A (1+C) + AB + BC
Factoring
= A.1 + AB + BC
Rule2: 1+C = 1
= A (1 + B) + BC
Factoring
= A.1 +BC
Rule2: 1+B = 1
= A + BC
Rule4: A.1 = A
DeMorgans Theorems
1st Theorem: The complement of a product of variables is
equal to the sum of the complemented variables.
(XY)
= X + Y
2st Theorem: The complement of a sum of variables is equal to
the product of the complemented variables.
(X + Y)
= X. Y
Page 6
Discrete Mathematics
X = C . D
X = C . D
Page 7
Discrete Mathematics
Solution:
1. Apply the distributive low to the 2nd and 3rd terms:
AB + AB + AC + BB + BC
2. Apply rule 7 (BB=B) to the 4th term:
AB + AB + AC + B + BC
3. Apply rule5 (AB+AB=AB) to the first two terms
AB + AC + B + BC
4. Apply rule10 (B+BC=B) to the last two terms
AB + AC + B
5. Apply rule10 (AB+B=B) to the 1st and 3rd terms
B + AC
Page 8
Discrete Mathematics
An expression is in SOP form when two or more product terms are
summed as in the following examples:
A B C + A B
A B C + C D
C D + E
(A + B + C)(B + D)
(A + B)C
+ B(CD + EF)
+ B) + C))
(b) (A + B)(B + C + D)
(c) ((A
Solution:
(a)
(b)
(A + B)(B + C + D) = AB + AC + AD + BB + BC +
BD
(c)
((A + B) + C)) = (A + B) C
= (A + B) C
= AC + BC
Page 9
Discrete Mathematics
standard form by multiplying the term by a term consisting of
the sum of the missing variable and its complement.
X = ( A + B )(A + B + C)
to standard
Solution: The first sum term does not include the variable C.
Therefore, add C C, which= 0, and expand the result by rule
12.
X = ( A + B + C C )(A + B + C)
= (A +B + C )( A + B +
C )(A + B + C)
Page 10
Discrete Mathematics
The Karnaugh Map
It is similar to a truth table because it represents all possible
values of input variables and the resulting output for each value.
Instead of being organized into columns and rows like truth table,
the K. map is an array of cells in which each cell represents a
binary value of the inputs variables. The cells are arranged in a
way so that simplification of a given expression is simply a matter
of properly grouping the cells.
The number of cells in K. maps, as well as the number of rows in
truth tables, is equal to the total number of possible
combinations. For 3 variables, the number of cells is 23 = 8. For 4
variables, the number of cells is 24 = 16. The K. maps can be
used for expressions up to 5 variables.
3- Variable K. Map
The 3-variable K. map is an array of 8 cells, as shown below:
Page 11
Discrete Mathematics
1s are read as the true variable and 0s are read as the
complemented variable.
The value of a given cell is the binary values of A and B combined
with the value of C, for each corresponding row and column.
4- Variable K. Map
The 4-variable K. map is an array of 16 cells, as shown below:
The cells in K. map are arranged so that there is only a singlevariable change between adjacent cells. Physically, each cell is
adjacent to the cells that are immediately next to it on any of its 4
sides.
The cells in the top row are adjacent to the corresponding cells in
the bottom row, and the cells in the outer left column are
adjacent to the corresponding cells in the outer right column, as
shown below:
Page 12
Discrete Mathematics
Page 13
Discrete Mathematics
A Boolean expression must first be in standard form before you
use the K. map. If an expression is not in standard form, then it
must be converted to standard form.
Example: Map the following SOP expression on a K.map:
AB + ABC
A +
Solution:
First expand the terms numerically as follows:
A + AB + ABC
000 100
110
001 101
010
011
Thus the expression in standard SOP form will be as follows:
ABC + ABC + ABC+ ABC + ABC + ABC + ABC
Now you can map each of the product terms by placing a 1 in the
appropriate cell of the 3-variable K. map as shown below:
Page 14
Discrete Mathematics
K. map is used for simplifying Boolean expressions to their
minimum form. A minimized SOP expression contains the fewest
possible terms with the fewest possible variables per term.
Generally, a minimum SOP expression can be implemented with
fewer logic gates than the standard expression.
After an SOP expression has been mapped, a minimum SOP
expression is obtained by grouping the 1s and determining the
minimum SOP expression from the map.
You can group 1s on the K. map by enclosing those adjacent
cells containing 1s. The goal is to maximize the size of the
groups and minimize the number of groups according to the
following rules:
1. A group must contain either1, 2, 4, 8, or 16 cells, which
are all power of 2. In case of a 3-variable map, 23 = 8 cells,
is the maximum group.
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 to rule 1).
4. Each 1 on the map must be included in at least one group.
Page 15
Discrete Mathematics
Solution:
Page 16
Discrete Mathematics
3. When all the minimum product terms are derived from the
K. map, they are summed to form the minimum SOP
expression
Solution:
The binary values of the expression are:
101 + 011 + 001+ 000+ 100
Map the standard SOP expression and group the cells as follows:
Page 17
Discrete Mathematics
Notice that:
The wrap around 4-cell group includes the top row and
the bottom row of 1s.
The remaining 1 is absorbed in an overlapping group of
two cells.
The group of four 1s produces a 1-variable term, B. This is
determined by observing that within the group, B is the
only variable that does not change from cell to cell.
The group of two 1s produces a 2-variable term, AC. This is
determined by observing that within the group, A and C do
not change from one cell to the next.
The resulting minimum SOP expression is : B + AC
Keep in mind that: this minimum expression
equivalent to the original standard SOP expression.
is
Page 18
Discrete Mathematics
Page 19