0% found this document useful (0 votes)
26 views

Module 2

Module 2
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Module 2

Module 2
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Module 2 1

Boolean Algebra and Karnaugh Map

Boolean Algebra and Karnaugh Mapping

Intended Learning Outcomes


1. Able to provide a truth table of the Boolean Expression
2. Able to perform Simplification using Boolean Identities
3. Understand the K-Mapping Technique
4. Able to design a logic circuits using K-mapping Techniques

Part 1: Boolean algebra


In 1849, George Boole published a scheme for the algebraic description of process involved
in logical thought and reasoning, Claude Shannon on the other hand showed that Boolean
algebra can be used to describe logic circuits.
Boolean algebra is a division of mathematics that deals with operations on logical values and
incorporates binary variables.
The distinguishing factor of Boolean algebra is that it deals only with the study of binary
variables. Most commonly Boolean variables are presented with the possible values of 1
("true") or 0 ("false"). Variables can also have more complex interpretations, such as in set
theory. Boolean algebra is also known as binary algebra.
As well as the logic symbols “0” and “1” being used to represent a digital input or output, we
can also use them as constants for a permanently “Open” or “Closed” circuit or contact
respectively.
A set of rules or Laws of Boolean Algebra expressions have been invented to help reduce the
number of logic gates needed to perform a particular logic operation resulting in a list of
functions or theorems known commonly as the Laws of Boolean Algebra.
Boolean Algebra is the mathematics we use to analyse digital gates and circuits. We can use
these “Laws of Boolean” to both reduce and simplify a complex Boolean expression in an
attempt to reduce the number of logic gates required. Boolean Algebra is therefore a
system of mathematics based on logic that has its own set of rules or laws which are used to
define and reduce Boolean expressions.
The variables used in Boolean Algebra only have one of two possible values, a logic “0” and
a logic “1” but an expression can have an infinite number of variables all labelled individually
to represent inputs to the expression, For example, variables A, B, C etc, giving us a logical
expression of A + B = C, but each variable can ONLY be a 0 or a 1.
Module 2 2
Boolean Algebra and Karnaugh Map

Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are
given in the following.
Single – Variable Theorems
1. x. 0 = 0 - Annulment -x+1=1

2. x. 1 = x - Identity -x+0=x
3. x . x = x - Idempotent -x+x=x
4. x . = 0 – Complement - x + =1
5. = x– Double Neagation

Two- and Three- variable properties


1. x . y = y . x - Commutative
x+y=y+x
2. x . ( y. z ) = ( x . y ) . z - Associative
x + ( y + z) = ( x + y) + z
3. x. ( y + z ) = x . y + x . z - Distributive
x + y . z = (x + y) . ( x + z)
4. x + x . y = x - Absorption
x . ( x + y) = x
5. x . y + x . = x - Combining
( x + y) . ( x + ) = x
6. = + - DeMorgan’s theorem
= .
x+ .y=x+y
7. x . y + y . z + . z = x . y + . z - Consensus
( x + y ) . ( y + z) . ( + z) = ( x + y) . ( + z)
Module 2 3
Boolean Algebra and Karnaugh Map

Part 2: Canonical and Standard Form

Canonical Form
In Boolean algebra,Boolean function can be expressed as Canonical Disjunctive
Normal Form known as minterm and some are expressed as Canonical Conjunctive Normal
Form known as maxterm .
In Minterm, we look for the functions where the output results in “1” while in Maxterm we
look for function where the output results in “0”.
We perform Sum of minterm also known as Sum of products (SOP) .
We perform Product of Maxterm also known as Product of sum (POS).
Boolean functions expressed as a sum of minterms or product of maxterms are said to be in
canonical form.

Sum of Products
The Sum of Product (SOP) expression comes from the fact that two or more products (AND)
are summed (OR) together. That is the outputs from two or more AND gates are connected
to the input of an OR gate so that they are effectively OR’ed together to create the final
AND-OR logical output. For example, the following Boolean function is a typical sum-of-
product expression:

Sum of Product Expression

Q=

and also

However, Boolean functions can also be expressed in nonstandard sum of products forms
like that shown below but they can be converted to a standard SOP form by expanding the
expression. So:

Q=
Becomes in sum-of-product terms:

Q=
Module 2 4
Boolean Algebra and Karnaugh Map

Actually this large SOP expression can be reduced further using the laws of Boolean algerbra
to give a reduced SOP expression of:

Q = A. + A.C
Converting an SOP Expression into a Truth Table
We can display any sum-of-product term in the form of a truth table as each input
combination that produces a logic “1” output is an AND or product term as shown below.
Consider the following sum of product expression:

Q=
We can now draw up the truth table for the above expression to show a list of all the
possible input combinations for A, B and C which will result in an output “1”.

Then we can clearly see from the truth table that each product row which produces
a “1” for its output corresponds to its Boolean multiplication expression with all of the other
rows having a “0” output as a “1” is always outputted from an OR gate.
Clearly the advantage here is that the truth table gives us a visual indication of the
Boolean expression allowing us to simplify the expression. For example, the above sum-of-
product term can be simplified to: Q = A.(B + .C) if required.
Module 2 5
Boolean Algebra and Karnaugh Map

Example 2.1
The following Boolean Algebra expression is given as:

Q=
1. Convert this logical equation into an equivalent SOP term.

Q=
2. Use a truth table to show all the possible combinations of input conditions that
will produces an output.

3
.

3. Draw a logic gate diagram for the expression.


Module 2 6
Boolean Algebra and Karnaugh Map

Product of Sum
These are Boolean expressions made up of sums consisting of one or more variables, either
in its normal true form or complemented form or combinations of both, which are
then AND’ed together. If a Boolean function of multiple variables is expressed in Product-of-
Sum terms, then each term is called the max term. That is the variable is taken as a logic “0”
as we will see later. But first let us understand more what represents a Sum Term.

Example 2.2
Q=
And also

However, Boolean functions can also be expressed in nonstandard product of sum forms
like that shown below but they can be converted to a standard POS form by using the
distributive law to expand the expression with respect to the sum. Therefore:

Expanded POS terms:

Other non standard example

If it is required to be reduce

Converting an POS Expression into a Truth Table


We can display any product-of-sum term in the form of a truth table as each input
combination that produces a logic “0” output is an OR or sum term as shown below.
Consider the following product of sum expression:

We can now draw up the truth table for the above expression to show a list of all the
possible input combinations for A, B and C which will result in an output “0”.
Module 2 7
Boolean Algebra and Karnaugh Map

Then we can clearly see from the truth table that each row which produces a “0” for its
output corresponds to its Boolean addition expression with all of the other rows having a
“1” output. The advantage here is that the truth table gives us a visual indication of the
Boolean expression allowing us to simplify the expression remembering that a sum term
produces a “0” output when all of its inputs are equal to “0”. So to make a sum term row
equal to “0”, the we must invert all the inputs which are equal to “1”.
Exercises 2.1

1. Use a truth table to show all the possible combinations of input conditions that will
produces a “0” output.
Module 2 8
Boolean Algebra and Karnaugh Map

2. Draw a logic gate diagram for the POS expression.

Standard Form
A Boolean variable can be expressed in either true form or complemented form. In
standard form Boolean function will contain all the variables in either true form or
Module 2 9
Boolean Algebra and Karnaugh Map

complemented form while in canonical number of variables depends on the output of SOP
or POS.

Example 2.3
Convert the following Boolean expression in standard form
Solution:
Step 1: Identify the missing variables and AND it to the terms

Part 3: Simplification of Boolean Expression

Using Boolean Identities


 Simplify: C + :

Expression Rule(s) Used

C+ Original Expression

C+( ) DeMorgan's Law.

(C + ) + Commutative, Associative Laws.

T+ Complement Law.

T Identity Law.

 Simplify:

Expression Rule(s) Used

Original Expression

Complement law, Identity law.


Module 2 10
Boolean Algebra and Karnaugh Map

DeMorgan's Law

Distributive law. This step uses the fact that or


distributes over and. It can look a bit strange since
addition does not distribute over multiplication.

Complement, Identity.

 Simplify: (A + C)(AD + A ) + AC + C:

Expression Rule(s) Used

(A + C)(AD + A ) + AC + C Original Expression

(A + C)A(D + ) + AC + C Distributive.

(A + C)A + AC + C Complement, Identity.

A((A + C) + C) + C Commutative, Distributive.

A(A + C) + C Associative, Idempotent.

AA + AC + C Distributive.

A + (A + T)C Idempotent, Identity, Distributive.

A+C Identity, twice.

You can also use distribution of or over and starting from A(A+C)+C to
reach the same result by another route.
Module 2 11
Boolean Algebra and Karnaugh Map

 Simplify: (A + B) + (B + AA)(A + ):

Expression Rule(s) Used

(A + B) + (B + AA)(A + ): Original Expression

Idempotent (AA to A), then Distributive,


A + B + (B + A)A + (B + A) used twice.

Complement, then Identity. (Strictly


speaking, we also used the Commutative
B + (B + A)A + (B + A) Law for each of these applications.)

B + BA + AA + B + A Distributive, two places.

Idempotent (for the A's), then Complement


B + BA + A + A and Identity to remove BB.

Commutative, Identity; setting up for the


B + AB + AT + A next step.

B + A(B + T + ) Distributive.

B+A Identity, twice (depending how you count it).

A+ B Commutative.

(A + )(A + B) Distributive.

A+B Complement, Identity.


Module 2 12
Boolean Algebra and Karnaugh Map

Using Karnaugh Mapping


A Karnaugh map provides a pictorial method of grouping together expressions with
common factors and therefore eliminating unwanted variables. The Karnaugh map can also
be described as a special arrangement of a truth table.
To represent a function of a two variable f(a,b)
a b Y ab b
ab b
0 0 0 0 1
0 1 1 a 2 3
a ab
1 0 2
1 1 3

To represent a function of a three-variable f(a,b,c)


a b C Y abc bc b
0 0 0 0 0 1 3 2
0 0 1 1 a 4 5 7 6
0 1 0 2
0 1 1 3
1 0 0 4 abc bc b
1 0 1 5 000 001 011 010
1 1 0 6 a 100 101 111 110
1 1 1 7

To represent a function of a three-variable f(a,b,c)


A b C D Y
0 0 0 0 0 abcd cd c
0 0 0 1 1 0 1 3 2
0 0 1 0 2 4 5 7 6
0 0 1 1 3 ab 12 13 15 14
0 1 0 0 4 8 9 11 10
0 1 0 1 5
0 1 1 0 6
Module 2 13
Boolean Algebra and Karnaugh Map

0 1 1 1 7
1 0 0 0 8 abcd cd c

1 0 0 1 9 0000 0001 0011 0010

1 0 1 0 10 0100 0101 0111 0110

1 0 1 1 11 ab 1100 1101 1111 1110

1 1 0 0 12 1000 1001 1011 1010

1 1 0 1 13
1 1 1 0 14
1 1 1 1 15

Groupings
The Karnaugh map uses the following rules for the simplification of expressions by grouping
together adjacent cells containing ones
Group 1:
Pair On y coordinate: On x coordinate:

abcd cd c
1
1 0 0 0
Leading to: Combine x and y:
1 0 1 0
ab 0 0 1 0
Group 2:
0 0 0 0
On y coordinate: On x coordinate:

Applying Sum-of-Product:
1
Leading to: Combine x and y:
Module 2 14
Boolean Algebra and Karnaugh Map

Quad Group 1:
On y coordinate: On x coordinate:
abcd cd c
1 1 1 0
1 1
1 1 1 0 Leading to: Leading to:
ab 0 0 1 0
0 0 1 0
Combine the groups:

Group 2:
On y coordinate: On x coordinate:

Leading to 1
Combined the groups:

Applying Sum-of-Product:

Rolling the Map


abcd cd c abcd cd c
1 0 0 1 1 0 0 1
1 0 0 1 0 0 0 0
ab 0 0 0 0 ab 0 0 0 0
0 0 0 0 1 0 0 1

abcd cd c
This group is an octet.
1 0 0 1
The derived expression
1 0 0 1 would be:

ab 1 0 0 1
1 0 0 1
abcd cd c
Module 2 15
Boolean Algebra and Karnaugh Map

Overlapping
abcd cd c abcd cd c
1 1 0 1 1 1 1 1
1 1 0 1 1 1 1 1
ab 0 0 0 0 ab 0 0 1 0
0 0 0 0 0 1 0 0

Don’t Care Condition


abcd cd c
1 d 0 1 Whenever a don’t care
condition appears in the k-
1 d 0 1
map, it can be used to
ab 0 0 0 0 complete the group since
this values represents either
0 0 0 0
0 or 1.

Exercise 3.1
Realization of Boolean Expression:

ABCD CD

0 0 0 1

0 0 0 1
AB
0 0 0 1

1 1 1 1

The simplified form using K-Map is


Module 2 16
Boolean Algebra and Karnaugh Map

A NAND gate is considered being a UNIVERSAL GATE. Every Basic gates can be
represented or redesign using NAND gate. Figure 2.4.1 shows the equivalent
representation of basic gate into NAND Gates. Test the NAND gate equivalent of basic
gates and demonstrate the result to the respective instructor.

Figure 2.4.1 NAND gate representation of Basic gates

Basic Gate Realization


Module 2 17
Boolean Algebra and Karnaugh Map

NAND Gate Realization ( Not Simplified)

NAND Gate Realization

You might also like