Boolean Algebra
Dr. Manju Khurana
Assistant Professor, CSED
TIET, Patiala
[email protected] Boolean Algebra
2
Table of Contents
1. Introduction to Boolean Algebra
2. Standard Forms : SOP and POS
3. K-Maps : 2-variable, 3-variable, 4-variable
Boolean Algebra
3
Introduction
Boolean Algebra provides the operations and rules for working with the set {0, 1}. The three
operations in Boolean Algebra that we will use most are Complementation, the Boolean sum and
Boolean product.
Boolean Algebra
4
Boolean Algebra
5
Boolean Algebra
6
List of axioms and theorems:
Identity A+0 =A A. 1 = A
Complement A + A’ = 1 A. A’ = 0
Commutative A+B=B+A A. B = B. A
Assosiative A + (B + C) = (A + B) + C A. (B. C) = (A. B). C
Distributive A. (B + C) = A. B + A. C A + (B. C) = (A + B). (A + C)
Null Element A+1 =1 A. 0 = 0
Involution (A’)’ = A
Indempotency A+A=A A. A = A
Absorption A + (A. B) = A A. (A + B) = A
Distributive A + A’. B = A + B A’ + A.B = A’ + B
De Morgan’s (A + B)’ = A’. B’ (A. B)’ = A’. B’
Boolean Algebra
7
Example 1: Minimize the following expression by use of Boolean rules.
F = (A+B+C) (A+B’+C) (A+B+C’)
Let X = A+B
F = (X+C) (X+C’) (A+B’+C) Commutative Law
F = (X+CC’) (A+B’+C) Distributive Law
F = (X+0) (A+B’+C)
F = X. (A+B’+C)
F = (A+B) (A+B’+C)
F = A+B. (B’+C) Distributive Law
F = A+B.B’+BC
F = A+0+BC
F = A+BC
Boolean Algebra
8
Example 2: Minimize the following expression by use of Boolean rules.
G = (A+B) (A+B’) (A’+B) (A’+B’)
G = (A+BB’) (A’+BB’) Distributive Law
G = (A+0) (A’+0)
G = A.A’
G=0
Boolean Algebra
Dr. Manju Khurana
Assistant Professor, CSED
TIET, Patiala
[email protected] Boolean Algebra
11
Table of Contents
1. Introduction to Boolean Algebra
2. Standard Forms : SOP and POS
3. K-Maps : 2-variable, 3-variable, 4-variable
Boolean Algebra
12
Standard Forms
Canonical forms are basic forms obtained from the truth table of the function. These
forms are usually not used to represent the function as they are cumbersome to write
and it is preferable to represent the function in the least number of literals possible.
There are two types of standard forms:
1. Sum of Products (SOP) A boolean expression involving AND terms with one
or more literals each, OR’ed together.
2. Product of Sums (POS) A boolean expression involving OR terms with one or
more literals each, AND’ed together.
Boolean Algebra
13
SOP (sum of products) POS (product of sums)
1. A method of describing a Boolean 1. A method of describing a Boolean
expression using a set of min terms or expression using a set of max terms or
product terms. sum terms.
2. We write the product terms for each input 2. We write the sum terms for each input
combination that gives high (1) output. combination that gives low (0) output.
3. We take the input variables if the value is 3. We take the input variables if the value is
1 and write the complement of the 0 and write the complement of the
variable if the value is 0 when writing the variable if the value is 1 when writing the
min terms. max terms.
4. Final expression is obtained by adding the 4. Final expression is obtained by
relevant product terms. multiplying the relevant sum terms.
Boolean Algebra
14
Canonical Forms: Minterms and Maxterms
Boolean Algebra
15
For the given truth table, Minimize the SOP expression:
A B Y Y = A’B + AB
0 0 0 Y = B (A + A‘)
0 1 1 Y=B
1 0 0
1 1 1
Boolean Algebra
16
Simplify the expression:
Y (A, B) = m(0, 2, 3) A B Y
Y= + + 0 0 1
Y = A’B’ + AB’ + AB
Y = B’ (A + A‘) + AB 0 1 0
Y = B’ + AB 1 0 1
Y = A + B’ Distributive Law 1 1 1
Boolean Algebra
17
Simplify the expression:
A B C F F = A’BC’ + AB’C’ + AB’C + ABC’ + ABC
0 0 0 0 F = A’BC’ + AB’ (C + C’) + AB (C + C’)
F = A’BC’ + AB’ + AB
0 0 1 0 F = A’BC’ + A(B’ + B)
0 1 0 1 F = A’BC’ + A
0 1 1 0 F = BC’ + A Distributive Law
or
1 0 0 1
F= + + + +
1 0 1 1
or
1 1 0 1
F= m(2, 4, 5, 6, 7)
1 1 1 1
Boolean Algebra
18
For the given truth table, Minimize the POS expression:
A B Y
Y = (A+B’) . (A’+B’)
0 0 1
Y = B’+A A‘
0 1 0 Y = B’
1 0 1 or
1 1 0 Y= ( , )
or
Y= M (1, 3)
Boolean Algebra
19
Simplify the expression:
A B C F F = (A + B + C).(A + B + C’).(A + B’ + C’)
0 0 0 0 F = (A + B + CC’).(A + B’ + C’)
F = (A + B).(A + B’ + C’)
0 0 1 0 F = A + B.(B’ + C’)
0 1 0 1 F = A + B B’+ BC’
0 1 1 0 F = A + BC‘
F = (A + B) (A + C‘)
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Boolean Algebra
Dr. Manju Khurana
Assistant Professor, CSED
TIET, Patiala
[email protected] Boolean Algebra
22
Table of Contents
1. Introduction to Boolean Algebra
2. Standard Forms : SOP and POS
3. K-Maps : 2-variable, 3-variable, 4-variable
Boolean Algebra
23
K-Maps
The Karnaugh map (K-map) is a method of simplifying Boolean algebra expressions.
Example 1 Now we will make a k-map for the above
An arbitrary truth table is taken below truth table
Boolean Algebra
24
K-Maps
Example 2
Now we will make a K-map for the expression: A’B’ + AB
Boolean Algebra
25
Simplification Using K-map
K-map uses some rules for the simplification of Boolean expressions by
combining together adjacent cells into single term. The rules are described
below −
Rule 1 − Any cell containing a zero cannot be grouped.
Wrong grouping
Boolean Algebra
26
Rule 2 − Groups must contain 2n cells (n starting from 1).
Wrong grouping
Boolean Algebra
27
Rule 3 − Grouping must be horizontal or vertical, but must not be diagonal.
Wrong diagonal grouping Proper vertical grouping
Proper horizontal grouping
Boolean Algebra
28
Rule 4 − Groups must be covered as largely as possible.
Insufficient grouping Proper grouping
Rule 5 − If 1 of any cell cannot be grouped with any other cell, it will act as a group itself.
Proper grouping
Boolean Algebra
29
Rule 6 − Groups may overlap but there should be as few groups as possible.
Proper grouping
Rule 7 − The leftmost cell/cells can be grouped with the rightmost cell/cells and the topmost cell/cells
can be grouped with the bottommost cell/cells.
Proper grouping
Boolean Algebra
30
2 variable K-maps
There are 4 cells in the 2-variable k-map. It will look like:
The following table shows the positions of all the
possible outputs of 2-variable Boolean function on a
K-map.
A general representation of a 2
variable K-map plot is shown
below.
Boolean Algebra
31
2 variable K-maps
Boolean Algebra
32
Simplify the given 2-variable Boolean equation by using K-map.
F = X Y’ + X’ Y + X’Y’
First, let’s construct the truth table for the given equation,
X Y F
0 0 1
0 1 1
1 0 1
1 1 0
We put 1 at the output terms given in equation.
After grouping the variables, the next step is
determining the minimized expression.
So the reduced equation will be X’ + Y’.
Boolean Algebra
33
3 variable K-maps
For a 3-variable Boolean function, there is a possibility of 8 output min terms. The general
representation of all the min terms using 3-variables is shown below:
A typical plot of a 3-variable K-map is
shown below. It can be observed that the
positions of columns 10 and 11 are
interchanged so that there is only change
in one variable across adjacent cells.
This modification will allow in
minimizing the logic.
Boolean Algebra
34
3 variable K-maps
Boolean Algebra
35
Simplify the given 3-variable Boolean equation by using K-map.
F = X’ Y’ Z’ + X’ Y’ Z + X’ Y Z’ + X Y’ Z’ + X Y Z
X Y Z F
First, let’s construct the truth table for the given equation,
0 0 0 1
We put 1 at the output terms given in equation. 0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
After grouping the variables, the next step is 1 1 0 0
determining the minimized expression. 1 1 1 1
So the reduced equation will be X Y Z + X’ Z’ + X’ Y’ + Y’ Z’.
Boolean Algebra
36
4 variable K-maps
There are 16 possible min terms in case of a 4-variable Boolean function. The general
representation of minterms using 4 variables is shown below:
A typical 4-variable K-map plot is
shown below. It can be observed that
both the columns and rows of 10 and 11
are interchanged.
Boolean Algebra
37
4 variable K-maps
Boolean Algebra
38
Simplify the given 4-variable Boolean equation by using K-map.
F (W, X, Y, Z) = (1, 5, 12, 13)
By preparing k-map, we can minimize the given Boolean equation as
So the reduced equation will be F = W X Y’ + W ‘Y’ Z.
39