You are on page 1of 47

Chap 4: Boolean algebra &

logic simplification
Hania Usman
Lecturer (AI & Data Science)
FAST-NU Karachi
Boolean Terminologies

➔ A Variable is a symbol used to represent a logical quantity.

➔ Complement is the inverse of a variable and is indicated by a bar over

the variable

➔ A Literal is a variable or the complement of a variable.


Laws of Boolean Algebra

1. Commutative laws: A+B = B+A

AB=BA

2. Associative laws: (A+B)+C = A+(B+C)

(AB)C = A(BC)

3. Distributive laws: A(B+C) = AB+AC


DeMorgan’s theorem

1. The complement of a product of variables is equal to the sum of the


complements of the variables
(AB)’ = A’+B’

2. The complement of a sum of variables is equal to the product of the


complements of the variables.
(A+B)’ = A’ B’
DeMorgan’s theorem
Boolean Rules / Theorems
Distributive law
OPERATOR PRECEDENCE
The operator precedence for evaluating Boolean expression is:

1. Parentheses ( )
2. NOT
3. AND
4. OR
Boolean Expression
A simplified Boolean expression uses the fewest gates possible to implement a given
expression. Gates possible to implement a given expression.

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


Simplification Using Boolean Algebra

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

AB+AB+AC+BB+BC --------- (BB=B)

AB+AB+AC+B+BC --------- (AB+AB=AB)

AB+AC+B+BC --------- (B+BC=B)

AB+B+AC --------- (AB+B=B)

B+AC
Simplification Using Boolean Algebra
Simplification Using Boolean Algebra
Standard Forms of Boolean Expressions

All Boolean expressions, regardless of their form, can be converted into either of two
form standard forms:

1. The sum-of-products (SOP) form


2. The product-of-sums (POS) form

Standardization makes evaluation and implementation of Boolean expressions much more


systematic and easier.
Sum-of-Products (SOP)
A way of representing a Boolean expression using min terms or product terms
Sum-of-Products (SOP) Form
1. An SOP expression when two or more product terms are summed by Boolean addition.

Examples:

2. In an SOP form, a single overbar cannot extend over more than one variable; however more
than one variable in a term can have an overbar.

Examples: ABC OK ……… but Not ABC


Implementation of an SOP
X=AB+BCD+AC

AND/OR implementation NAND/Negative OR implementation


General Expression SOP

Any logic expression can be changed into SOP form by applying Boolean algebra techniques.
The Standard SOP Form

1. A standard SOP expression is one in which all the variables in the domain appear
variables in the domain appear in each product term.

Example:

2. Standard SOP expressions are important in:

➔ Constructing truth tables

➔ The Karnaugh map simplification method


Converting Product Terms to Standard SOP (example)
Binary Representation of a Standard Product Term

A standard product term is equal to 1 for only one combination of variable values.
Example:

ABCD is equal to 1 when A=1, B=0, C=1 and D=0

ABCD = 1 0 1 0 =1.1.1.1=1

And this term is 0 for all other combinations of values for the variables.
Determining Standard SOP expression from a Truth Table
Product-of-Sums (POS)
A way of representing a Boolean expression using max terms or sum terms.
The Product-of-Sums (POS) Form

When two or more sum terms are multiplied the resultant expression is a product-of-sums (POS):

Examples:

In a POS form, a single overbar cannot extend over more than one variable; however, more than
one variable in a term can have an overbar.

Examples:
A+B+C is ok , But not A + B + C
Implementation of a POS
X=(A+B)(B+C+D)(A+C)

OR/AND implementation
The Standard POS Form
A standard POS expression is one in which all the variables in the domain appear in each sum
term in the expression.

Example:

Standard POS expressions are important in:

1. Constructing truth tables


2. The Karnaugh map simplification method
Converting a Sum Term to Standard POS

Step 1: Add to each nonstandard product term a made up of the product of the missing

Variable and its complement. I.e, (A.A) This results in two sum terms.

➔ As you know, you can add 0 to anything without changing its value.

Step 2: Apply rule, A+BC=(A+B)(A+C)A+BC=(A+B)(A+C)

Step 3: Repeat Step 1 until all resulting sum terms contain all variables in the domain either

In complemented or complemented form.


Converting a Sum Term to Standard POS
Binary Representation of standard product forms

A standard product term is equal to 1 for only one combination of variable values.

Example: A + B + C + D is equal to 0 when A=0 , B=1 , C=0 and D=1

A+B+C+D=0+1+0+1 =0+0+0+0=0

And this term is 1 for all other combination of values for variables.
Determining Standard POS expression from a Truth Table
SOP/POS Conversion
Converting standard SOP to standard POS

Step 1: Evaluate each product term in the SOP expression. That is, determine the

binary numbers that represent the product terms.

Step 2: Determine all of the binary numbers not included in the evaluation in Step 1.

Step 3: Write the equivalent sum term for each binary number from Step 2 and

express in POS form


Convert the following SOP expression to an equivalent POS expression.

000 + 010 + 011 + 101 + 111


1. Three variables in the domain of this expression, there are a total of eight (2^3) possible

combinations.

2. POS must contain the other three which are 001, 100, and 110.

3. These are the binary values that make the sum term 0.

4. The POS expression.


Karnaugh Map
Karnaugh 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.
Karnaugh Map
1. It is similar to truth table
2. Instead of being organized (i/ p and o/ p) into columns and rows, the
K-map is an array of cells in which each cell represents a binary value
of the input variables.

3. K-maps can be used for expressions with 2, 3, 4, and 5 variables.

3 and 4 variables will be discussed to illustrate the principles.


A 3-variable karnaugh Map
Example of mapping a standard SOP expression in 3-variable k-Map
A 4-variable karnaugh Map
Example of mapping a standard SOP expression in 4-variable k-Map
Cell Adjacency
Adjacency is defined by a single variable change.
Cell Adjacency & expression minimization

ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD


Implementation in K-map
Expression Minimization
POS implementation on K-map

You might also like