0% found this document useful (0 votes)
27 views51 pages

Digital Logic Design (ES216) Lec 12-14

Uploaded by

rodili8762
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views51 pages

Digital Logic Design (ES216) Lec 12-14

Uploaded by

rodili8762
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

Digital Logic Design (ES216)

Department of Mechatronic
Engineering

Lec # 12-14

Engr. Muhammad Arsalan Jalees


Abro

[email protected]
Lecture contents
• What is Boolean Algebra? • De Morgan's Law
• Boolean Algebra Laws • Verification of De Morgan's
• 10 important Boolean rules Law

• Combinational Logic Circuits • Bubble Pushing (Alternate


Logic gate representation)
• Simplification Of Combinational Logic
Using Boolean Algebra • Sum of Product Form
• Product of Sum Form
What is Boolean Algebra?
• In computing, the term Boolean means a result that can only have one of
two possible values: true or false.
• Boolean algebra is a branch of mathematics that deals with operations
on logical values with binary variables.
• Boolean algebra is the mathematics of digital logic.
• The Boolean variables are represented as binary numbers to represent
truths: 1 = true and 0 = false.
• We will see how the operation of the different logic gates can be described
and analyzed using Boolean algebra.
Basic Terminology
• Variable is a symbol (usually an italic uppercase letter or word) used to represent an action, a
condition, or data. Any single variable can have only a 1 or a 0 value.
• The complement is the inverse of a variable and is indicated by a bar over the variable (overbar).
• For example, the complement of the variable A is A. If A = 1, then A = 0. If A = 0, then A = 1. The
complement of the variable A is read as “not A” or “A bar”. Sometimes a prime symbol rather than
an overbar is used to denote the complement of a variable; for example, B’ indicates the
complement of B.
• A literal is a variable or the complement of a variable.
• For example: Take the function of a, b, and c. It is represented as: f(a,b,c). Here we have 3
variables and 6 literals. Variables being, a, b, and c. Literals being, a, a’, b, b’, c, c’.
• Domain of a Boolean Expression is the set of variables contained in the expression in either
complemented or uncomplemented form.
ҧ ABC is the set of variables A, B, C.
• For example, the domain of the expression 𝐴𝐵+
Boolean Algebra ----------------------------------------- Mathematical tool
Truth tables ----------------------------------------------- Data Organizational tool
Schematic symbols -------------------------------------- Drawing tool
Timing diagrams ----------------------------------------- Graphing tool

Boolean Algebra simplifies


circuits' Boolean expressions so
that the circuit can be rebuilt
using fewer logic gates and/or
connections.
Boolean Addition
• Boolean addition is equivalent to the OR operation.

In Boolean algebra, a sum term is a sum of literals. In logic circuits, a sum term is
produced by an OR operation with no AND operations involved.
For example:

A sum term is equal to 1 when one or more of the literals in the term are 1. A sum term
is equal to 0 only if each of the literals is 0
Example
Boolean Multiplication
• Boolean multiplication is equivalent to the AND operation.

A product term is the product of literals. In logic circuits, a product term is produced by
an AND operation with no OR operations involved.

A product term is equal to 1 only if each of the literals in the term is 1. A product term is
equal to 0 when one or more of the literals are 0.
example
Boolean algebra Laws
The ‘or’ function is Boolean addition. X=A+B
The ‘and’ function is Boolean multiplication. X = A.B

Associative law of addition is; A + (B + C) = (A+ B) + C


Associative law of multiplication is; A.(B.C) = (A.B).C
Commutative law of addition is; A+B=B+A

Commutative law of multiplication is; A.B = B.A

Distributive laws are; A.(B + C) = A.B + AC

(A+B)(C + D) = A.C +AD + B.C + B.D

*NOTE: The above laws hold true for any number of variables.
10 Important Boolean Rules
Boolean Rules
A.0 = 0
Rule1. Anything ANDed with a ‘0’ is equal to ‘0’.
A.1 = A
Rule2. Anything ANDed with a ‘1’ is equal to ‘itself’.
A+0 =A
Rule3. Anything ORed with a ‘0’ is equal to ‘itself’.
A+1=1
Rule4. Anything ORed with a ‘1’ is equal to ‘1’.
A.A = A
Rule5. Anything ANDed with ‘itself’ is equal to ‘itself’.
A+A=A
Rule6. Anything ORed with ‘itself’ is equal to ‘itself’.
Rule7. Anything ANDed with ‘its own compliment’ is equal to ‘0’. A.A = 0
Rule8. Anything ORed with ‘its own compliment’ is equal to ‘1’. A+A= 1
Rule9. A variable which is complimented twice will return to its original logic level. A=A
Rule10. This Rule has two important factors a) A + A’B = A + B
b) A’ + AB = A’ + B
Combinational Logic
• Combinational logic employs the use of two or more of the basic
logic gates to form a more useful, complex function.
• For eg:, let’s design the logic for an automobile warning buzzer using
combinational logic.
• The criteria of the activation of the warning buzzer is as follows: the buzzer B
activates if the headlights H are on AND the driver's door is opened, OR if the
key is in ignition K AND the door is opened.
Example
• Symbolically,

D B

WARNING BUZZER

• The figure illustrates a combination of logic functions that can be written as a Boolean
equation in the form
• B = K AND D OR H AND D i.e. B = (K.D) + (H.D) Note that brackets and
• B is high if K AND D are high or H AND D are high or both) parentheses mean the same
• B = D(K + H) thing: the term inside is
multiplied (ANDed) with the
term outside.
Example cont.
• Hence the new reduced simplified circuit is:

D B
K
H

• Verify by drawing up the truth tables of both the circuits.


Example 2
Draw the logic circuit that could be used to implement the following
Boolean equation.
X = AB + C(M+N)

Solution:
A
B X

C
M
N
Example 3
Write down Boolean equation for the logic circuit given below:
A
B
C X
D
E

Solution:

(AB + CD).E
Tasks
Write the Boolean expression for each of the logic circuits shown
below.
X= AB+BC
W= (A+B) (C+D)

Z= (AB+B+ (B+C)) D
Y= (AB+B) C
Tasks
Draw the logic circuit that would be used to implement the following Boolean equations.
(a) M= (AB) + (C+D) (b) N= (A+B+C) D

(c) P= (AC+BC) (A+C) (d) Q= (A+B) BCD


Simplification Of Combinational Logic Using Boolean Algebra
• If an equivalent circuit can be formed with fewer gates, the
cost of the circuit is reduced and its reliability is improved.
• This process is called the simplification or reduction of
combinational logic circuits & it is done by using the laws
and rules of Boolean algebra.
Example 4
The logic circuit shown is used to turn on a warning buzzer at X based
on the input conditions at A, B, and C. Write the equation of the circuit
in figure, simplify the equation, and draw the logic circuit of the
simplified equation.
Example 4 solution
The Boolean equation for the logic circuit is X
X = B (A + C) + C //using law 3, B (A + C) = AB + AC
X = AB + BC + C //Take C common
X = AB + C (B + 1) //B + 1 = 1
X = AB + C. 1 //C.1 = C
X = AB + C (Simplified equation)

Using simplified equation, the simplified circuit is,

A
B

X = AB + C
C
Example 5

Solution: The Boolean equation of the logic circuit X is


X = (A + B) BC + A //using Law 3 (A + B) BC = ABC + B.BC
X = ABC + B.BC + A //Apply Rule 5 B.B = B
X = ABC + BC + A
X = BC (A + 1) + A //Apply Rule 4 A + 1 = 1
X = BC. 1 + A
X = A + BC (Simplified Equation)
Therefore, the simplified logic circuit is
Example 6

Solution: The Boolean equation of the logic circuit X is


X = (A + B) B + B + BC //using Law 3 (A + B) B = AB + BB
X = AB + BB + B + BC //Apply Rule BB = 0
X = AB + 0 + B + BC //Take B common
X = B (A + 1) + BC //Apply rule 4 A + 1 = 1
X = B. 1 + BC //Apply rule 10(b) B + BC = B + C
X = B + C (Simplified equation)
The simplified circuit is
Task
Write the equation of the circuit in figure, simplify the equation, and draw the logic
circuit of the simplified equation.

C
De-Morgan’s Laws
• To simplify circuits containing NANDS & NORS, we need to use a theorem known as
DE-MORGAN’S THEOREM developed by mathematician AUGUSTUS DE MORGAN.
• This theorem allows us to convert an expression having an inversion bar over 2 or more variables
into an expression having an inversion bar over single variables only.
The theorems are stated as follows:
1) The complement of a product of variables is equal to the sum of the complements of the
variables.
OR
2) The complement of a sum of variables is equal to the product of the complements of the
variables.
For 3 or more variables:
Verification of De Morgan's Law
Applying DeMorgan’s Theorems (EXAMPLE)
Example 7
Write the Boolean eq: for the circuit shown in figure below. Use De Morgan’s theorem and then
Boolean Algebra rules to simplify the eq:.

Solution: The Boolean Eq: is 𝑋 = 𝐵 𝐴. 𝐵


𝑋 = 𝐵 𝐴ҧ + 𝐵ത
𝑋 = 𝐴𝐵 ҧ + 𝐵 𝐵ത
𝑋 = 𝐴𝐵 ҧ +0
𝑋 = 𝐴𝐵ҧ

Simplified circuit
Example 8
A

B X

Solution:
𝑋 = (𝐴. 𝐵)(𝐵 + 𝐶)
𝑋 = 𝐴ҧ + 𝐵ത (𝐵. ത 𝐶)ҧ
𝑋 = 𝐴ҧ𝐵ത 𝐶ҧ + 𝐵ത 𝐶ҧ
𝑋 = 𝐵ത 𝐶(ҧ 𝐴ҧ + 1)
Simplified circuit
𝑋 = 𝐵ത 𝐶ҧ
Example 9

Start off by
breaking the
longest bar
first.

Solution:
TASk
• Draw the logic circuit for the following equation, simplify the
equation, and construct a truth table for the simplified
equation
𝑋 = 𝐴. 𝐵ത + 𝐴. (𝐴ҧ + 𝐶)
Task
Apply DeMorgan’s theorems to the following expressions:
Bubble pushing
• This is just a graphical way of expressing the "Break the line and change the sign"
expression used to simplify logic statements, by changing an AND expression to
OR and vice versa.

Rules:
1. Change the logic gate
(AND to OR or OR to
AND)
2. Add bubbles to the inputs
and outputs where there
were none and remove
the original bubbles.
example
Using bubble pushing convert the AND gate with one inverted input

AND gate with one inverted input NOR gate equivalent of AND gate with inverted input

Using bubble pushing convert the OR gate with inverted inputs

Inverter inputs OR gate NAND gate equivalent of inverted inputs of OR gate


Example of graphical representation of Demorgan’s law
ത 𝐶
𝐴 + 𝐵.

Step 1: Draw the graphical representation of the equation


Step 2: Change the output bubble to input bubble
Step 3: Change the output gate.
Step 4: Repeat the same for the input gate.
example
𝐴 + 𝐵 + 𝐶ҧ

Solution:
Add bubbles at A and B inputs

c
Example

𝐴 + 𝐵 + 𝐶 = 𝐴.ҧ 𝐵.
ത 𝐶ҧ

Solution
Standard Forms of Boolean Expressions
• All Boolean expressions, regardless of their form, can be converted
into either of two standard forms:
THE SUM-OF-PRODUCTS FORM
or
THE PRODUCT-OF-SUMS FORM
• Standardization makes the evaluation, simplification, and
implementation of Boolean expressions much more systematic and
easier.
The Sum-of-Products (SOP) Form
• A Product term consists of the product (Boolean multiplication) of literals
(variables or their complements).
• When two or more product terms are summed by Boolean addition, the resulting
expression is a sum-of-products (SOP).
Examples:
𝐴𝐵𝐶 + 𝐴𝐵ҧ 𝐶ҧ
Boolean expression in this form is known as SOP form and ҧ 𝐶ҧ + 𝐶ҧ 𝐷
𝐴𝐵 + 𝐴𝐵 ഥ+D
is widely used. ҧ + 𝐶𝐷
𝐴𝐵 ഥ + 𝐸𝐹 + 𝐺𝐾 + 𝐻𝐿ത
In a SOP expression, one inversion bar cannot cover
more than one variable in a term (e.g., we cannot have
𝑨𝑩𝑪) but can have 𝑨 ഥ𝑩
ഥ𝑪ഥ. AND ORed Product
together
SOP example

AND/OR Implementation of an SOP Expression

NAND/NAND Implementation of an SOP Expression


Conversion of a General Expression to SOP Form
Any logic expression can be changed into SOP form by applying
Boolean algebra techniques. For example, the expression A(B + CD)
can be converted to SOP form by applying the distributive law:

A(B + CD) = AB + ACD


Sop examples
The Standard SOP Form
For example, the expression has a domain made up of the
variables A, B, C, and D.
However, notice that the complete set of variables in the domain is not represented
ഥ is missing from the first term
in the first two terms of the expression; that is, D or 𝐷
and C or 𝐶ҧ is missing from the second term.

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

For example, A𝐵CD + AB𝐶D ҧ + 𝐴BC
ҧ 𝐷ഥ is a standard SOP expression.
Convert SOP to Standard SOP
Convert the following Boolean expression into standard SOP form:

Solution: The domain of this SOP expression is A, B, C, D. Take one term at a time.

1st Term

The second term, AB, is missing variables C or 𝐶ҧ First, add C, and then add D

and D or 𝐷
2nd Term

Adding D

The third term, is already in standard form. Therefore, the standard equation is
The Product-of-Sums (POS) Form
It consists of two or more OR terms that are ANDed together. Each OR
term contains one or more variables in complemented or un-
complemented form.
Some examples are:
1. 𝐴 + 𝐵ത + 𝐶 𝐴 + 𝐶
2. 𝐴 + 𝐵ത 𝐶 + 𝐷 𝐸
3. 𝐴 + 𝐶 𝐵 + 𝐷ഥ 𝐴+𝐷
ഥ + 𝐸ത
POS Example
Standard POS expression
A standard POS expression is one in which all the variables in the
domain appear in each sum term in the expression. For example

is a standard POS expression. Any nonstandard POS expression (referred to simply


as POS) can be converted to the standard form using Boolean algebra.
Boolean Expression to standard pos
Convert the following Boolean expression into standard POS form:
Determining Expression from Truth Table
From the Truth table below get the SOP and POS expressions.

Solution: For SOP,


• Look for binary values inputs having output X=1
• If the input is 0 then represent that term with a bar.
A B C X
• AND the terms together
0 0 0 0
• Finally, OR all the terms:
ҧ
X = 𝐴𝐵𝐶 + 𝐴𝐵ത 𝐶ҧ + 𝐴𝐵 𝐶ҧ + 𝐴𝐵𝐶 0 0 1 0
0 1 0 0

For POS, 0 1 1 1
• Look for binary values inputs having output X=0 1 0 0 1
• If the input is 1 then represent that term with a bar. 1 0 1 0
• OR the terms together 1 1 0 1
• Finally, AND all the terms: 1 1 1 1
ҧ
𝑋 = (𝐴 + 𝐵 + 𝐶)(𝐴 + 𝐵 + 𝐶)(𝐴 + 𝐵ത + 𝐶)(𝐴ҧ + 𝐵 + 𝐶)ҧ

You might also like