0% found this document useful (0 votes)
20 views15 pages

Digital Lecture 3

Uploaded by

a7madsala7ussain
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)
20 views15 pages

Digital Lecture 3

Uploaded by

a7madsala7ussain
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/ 15

Prepared by: Dana S.

Abdullah Digital 3rd Lecture

LOGIC GATES:
Digital systems are said to be constructed by using logic gates. These gates
are the AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates. The basic
operations are described below with truth tables.

AND Gate:
The AND gate is an electronic circuit that gives a high output, (1) only if all
its inputs are high. A dot (.) is used to show the AND operation i.e. A.B keep
in mind that this dot is sometimes omitted i.e.AB

OR Gate:
The OR gate is an electronic circuit that gives a high output (1) if one or
more of its inputs are high. A plus (+) is used to show the OR operation.

NOT Gate:
The NOT gate is an electronic circuit that produces an inverted version of
the input at its output. It is also known as an inverter. If the input variable is

1
Prepared by: Dana S. Abdullah Digital 3rd Lecture

A, the inverted output is known as NOT A. This is also shown as A', or 𝐴̅


with a bar over the top, as shown at the outputs.

NAND Gate:
This is a NOT-AND gate which is equal to an AND gate followed by a NOT
gate. The outputs of all NAND gates are high if any of the inputs are low.
The symbol is an AND gate with a small circle on the output. The small
circle represents inversion.

NOR Gate:
This is a NOT-OR gate which is equal to an OR gate followed by a NOT
gate. The outputs of all NOR gates are low if any of the inputs are high. The
symbol is an OR gate with a small circle on the output. The small circle
represents inversion.

2
Prepared by: Dana S. Abdullah Digital 3rd Lecture

EXOR Gate:
The 'Exclusive-OR' gate is a circuit which will give a high output if either,
(but not both), of its two inputs are high. An encircled plus sign ( ) is
used to show the EXOR operation

EXNOR Gate:
The 'Exclusive-NOR' gate circuit does the opposite to the EXOR gate. It
will give a low output if either, (but not both), of its two inputs are high.
The symbol is an EXOR gate with a small circle on the output. The small
circle represents inversion.

3
Prepared by: Dana S. Abdullah Digital 3rd Lecture

Boolean Algebra and Logic Simplification:


Boolean algebra finds its most practical use in the simplification of logic
circuits. If we translate a logic circuit's function into symbolic (Boolean)
form, and apply certain algebraic rules to the resulting equation to reduce the
number of terms and/or arithmetic operations, the simplified equation may
be translated back into circuit form for a logic circuit performing the same
function with fewer components. If equivalent function may be achieved
with fewer components, the result will be increased reliability and decreased
cost of manufacture.
There are several rules of Boolean algebra presented in this section for use in
reducing expressions to their simplest forms.

Boolean Algebra Laws (rules):


1- Idempotency Law
(a) A + A = A
(b) A. A = A

2- Double negation Law

̅= A
A

3- Identity Laws
(a) 0 + A = A
(b) 1 . A = A

4- Domination Laws
(a) 1 + A = 1
(b) 0 . A = 0

5- Inverse Laws
̅= 1
(a) A + A
̅= 0
(b) A . A

4
Prepared by: Dana S. Abdullah Digital 3rd Lecture

6- Commutative Laws

• A·B=B·A
• A+B=B+A
• A⊕B=B⊕A

7- Associative Laws

• (A · B) · C = A · (B · C)
• (A + B) + C = A + (B + C)
• (A ⊕ B) ⊕ C = A ⊕ (B ⊕ C)

8- Distributive Laws

• A · (B + C) = (A · B) + (A · C)
• A + (B · C) = (A + B) · (A + C)
• A · (B ⊕ C) = (A · B) ⊕ (A · C)

9- De Morgan’s laws

10-Redundancy laws: The following laws will be proved with the


basic laws. Counter intuitively, it is sometimes necessary to
complicate the formula before simplifying it.
➢ Absorption
• A+A·B=A

Proof:
A+A·B
=A·1+A·B
= A · (1 + B)
5
Prepared by: Dana S. Abdullah Digital 3rd Lecture

=A·1
=A

• A · (A + B) = A

Proof:
A· (A + B)
= (A + 0) · (A + B)
= A + (0 · B)
=A+0
=A

➢ Other useful laws

• A+A ̅· B = A + B
Proof:
A+ A · B
= (A + ) · (A + B)
= 1 · (A + B)
=A+B

• A · (A̅ + B) = A · B
Proof:
̅ + B)
A · (A
=A·A ̅+A·B
=0+A·B
=A·B

• A·B+A·B ̅=A
Proof:
A·B+A·B ̅
̅)
= A · (B + B
=A·1
=A

• ̅) = A
(A + B) · (A + B
Proof:
̅)
(A + B) · (A + B
6
Prepared by: Dana S. Abdullah Digital 3rd Lecture

̅)
= A + (B · B
=A+0
=A

Ex1: Simplify the following logic expression by using Boolean algebra rules
AB+ A (B+C)+ B(B+C)
Solution:
AB+ A (B+C)+ B(B+C)
= AB+AB+AC+BB+BC (Applying Distributive Law)

= AB+AC+B+BC (Applying Idempotency Law)

= AB+B+AC (Applying Commutative & Absorption Law)

= B+AC (Applying Absorption Law)

Ex2: Simplify the following logic expression by using Boolean algebra rules
ABC+AB𝐶̅ +𝐴̅C+AC
Solution:
ABC+ ABC̅+A
̅ C +AC
= AB(C+C̅) + C(A
̅ +A)
= AB +C
Ex3: Simplify the following logic expression by using Boolean algebra rules
̅̅̅̅̅̅̅̅̅̅̅̅
AB + AC + A ̅B
̅C

7
Prepared by: Dana S. Abdullah Digital 3rd Lecture

Solution:
̅̅̅̅̅̅̅̅̅̅̅̅
AB + AC + A ̅B
̅C
̅̅̅̅) (AC
= (AB ̅̅̅̅) + A
̅B̅C (Applying DeMorgan’s law)
̅+B
= (A ̅ + C̅) + A
̅) . (A ̅B̅C (Applying DeMorgan’s law, for the next time)
̅A
=A ̅+A
̅ C̅ + A
̅B ̅C̅ + A
̅+B ̅B̅C (Applying Disributive law)
̅+A
=A ̅ C̅ + A
̅B ̅C̅
̅+B (Applying Idempotency & Absorption law)
̅ +A
=A ̅B ̅C̅
̅+B (Applying Absorption law)
̅+B
=A ̅C̅ (Applying Absorption law, for the next time)

Standard and Canonical Forms:


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:
When two or more product terms are summed by Boolean addition, the
resulting expression is a sum-of-products (SOP). Some examples are:
̅C
AB + AB
ABC + C̅DE + B
̅CD
̅
̅ B + BCD + AC
A
Also, an SOP expression can contain a single-variable term, as in
A + ABC̅ + BCD
̅.
In an SOP expression a single overbar cannot extend over more than
one variable.

8
Prepared by: Dana S. Abdullah Digital 3rd Lecture

The Standard SOP Form:


So far, you have seen SOP expressions in which some of the product terms
do not contain all of the variables in the domain of the expression. For
̅ BC̅ + AB
example, the expression A ̅D + ABC̅D
̅ 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 in the first two terms of the expression; that
̅ is missing from the first term and C or C̅ is missing from the
is, D or D
second term.
A standard SOP expression is one in which all the variables in the domain
̅ BCD
appear in each product term in the expression. For example, A ̅ + ABC̅D
̅CD is a standard SOP expression.
+ AB

Converting Product Terms to Standard SOP:


Each product term in an SOP expression that does not contain all the
variables in the domain can be expanded to standard SOP to include all
variables in the domain and their complements. As stated in the following
steps, a nonstandard SOP expression is converted into standard form using
̅ = 1). A variable added to its complement equals 1.
Boolean algebra (A + A

Step 1. Multiply each nonstandard product term by a term made up of the


sum of a missing variable and its complement. This results in two product
terms. As you know, you can multiply anything by 1 without changing its
value.
Step 2. Repeat Step 1 until all resulting product terms contain all variables
in the domain in either complemented or uncomplemented form. In

9
Prepared by: Dana S. Abdullah Digital 3rd Lecture

converting a product term to standard form, the number of product terms is


doubled for each missing variable.
Example:
Convert the following Boolean expression into standard SOP form:
̅B
̅C + A
AB ̅ + ABC̅D
Solution:
The domain of this SOP expression A, B, C, D. Take one term at a time.
̅C, is missing variable D or D, so multiply the first term by
The first term, AB
̅ ) as follows:
(D + D
̅C = AB
AB ̅C (D + D
̅ ) = AB
̅CD + AB
̅CD
̅
In this case, two standard product terms are the result.
The second term, AB, is missing variables C or C̅ and D or D
̅ , so first
multiply the second term by C + C̅ as follows:
̅B
A ̅B
̅=A ̅ (C + C̅) = A
̅B ̅B
̅C + A ̅
̅C
The two resulting terms are missing variable D or D, so multiply both terms
̅ ) as follows:
by (D + D
̅B
A ̅C (D + D ̅B
̅) + A ̅C̅ (D + D ̅B
̅) = A ̅B
̅CD + A ̅CD ̅B
̅+A ̅C̅D + A
̅B̅C̅D
̅
In this case, four standard product terms are the result.
The third term, ABC̅D, is already in standard form. The complete standard
SOP form of the original expression is as follows:
̅B
̅C+A
AB ̅+ABC̅D = AB
̅CD+AB
̅CD ̅B
̅ +A ̅B
̅CD+A ̅CD ̅B
̅ +A ̅ D+A
̅C ̅B̅C̅D
̅ +ABC̅D

The Product-of-Sums (POS) Form:


A sum term was defined before as a term consisting of the sum (Boolean
addition) of literals (variables or their complements). When two or more

10
Prepared by: Dana S. Abdullah Digital 3rd Lecture

sum terms are multiplied, the resulting expression is a product-of-sums


(POS). Some examples are
̅ + B)(A + B
(A ̅ + C)
̅ + C̅) (C + D
(A + B ̅ + E)(B + C + D)
̅)(A + B
(A + B ̅ + C)(A + C)
A POS expression can contain a single-variable term, as in
A(A + B + C)(B + C̅ + D).
In a POS expression, a single overbar cannot extend over more than one
variable; however, more than one variable in a term can have an overbar. For
̅ +B
example, a POS expression can have the term A ̅+C̅ but not ̅̅̅̅̅̅̅̅̅̅̅̅̅
𝐴+𝐵+𝐶.

The Standard POS Form:


So far, you have seen POS expressions in which some of the sum terms do
not contain all of the variables in the domain of the expression. For example,
̅ + C) (A + B + D
the expression (A + B ̅ + C̅ + D)
̅ ) (A + B
has a domain made up of the variables A, B, C, and D. Notice that the
complete set of variables in the domain is not represented in e first two terms
̅ is missing from the first term and C or C̅ is
of the expression; that is, D or D
missing from the second term.
A standard POS expression is one in which all the variables in the domain
appear in each sum term in the expression. For example,
̅+B
(A ̅ + C + D)(A + B
̅ + C + D)(A + B + C + D)
is a standard POS expression. Any nonstandard POS expression (referred to
simply as POS) can be converted to the standard form using Boolean
algebra.

11
Prepared by: Dana S. Abdullah Digital 3rd Lecture

Converting a Sum Term to Standard POS:


Each sum term in a POS expression that does not contain all the variables in
the domain can be expanded to standard form to include all variables in the
domain and their complements. As stated in the following steps, a
nonstandard POS expression is converted into standard form using Boolean
̅ = 0).
algebra rule (A. A
Step 1. Add to each nonstandard product term a term made up of the product
of the missing variable and its complement. This results in two sum terms.
As you know, you can add 0 to anything without changing its value.
Step 2. Apply Distributive Law: A + BC = (A + B)(A + C)
Step 3. Repeat Step 1 until all resulting sum terms contain all variables in
the domain in either complemented or non-complemented form.
Example:
Convert the following Boolean expression into standard POS form:
̅ + B + C)(B
(A ̅+C+D ̅ + C̅ + D)
̅ )(A + B
Solution:
The domain of this POS expression is A, B, C, D. Take one term at a time.
̅ + B + C, is missing variable D or D, so add DD as follows:
The first term, A
̅+B+C=A
A ̅ + B + C + DD ̅ + B + C + D)( A
̅ = (A ̅+B+C+D
̅)
̅ + C + D
The second term, B ̅ , so add AA
̅ , is missing variable A or A ̅ as
follows:
̅+C+D
B ̅=B
̅+C+D ̅ = (A + B
̅ + AA ̅+C+D ̅+B
̅ ) (A ̅+C+D
̅)
̅ + C̅ + D, is already in standard form. The standard
The third term, A + B
POS form of the original expression is as follows:
̅ + B + C)(B
(A ̅+C+D ̅ + C̅ + D) = (A
̅ )(A + B ̅ + B + C + D)( A
̅+B+C+D
̅)
̅+C+D
(A + B ̅+B
̅ ) (A ̅+C+D ̅ + C̅ + D)
̅ ) (A + B

12
Prepared by: Dana S. Abdullah Digital 3rd Lecture

CANONICAL FORMS OF BOOLEAN EXPRESSIONS:


n variables can be combined to form 2𝑛 minterms, and each maxterm is the
complement of its corresponding minterm and vice versa.

13
Prepared by: Dana S. Abdullah Digital 3rd Lecture

Any Boolean function can be expressed as a sum of minterms (sum of


products SOP) or product of maxterms (product of sums POS).
F̅=x̅y̅z̅ + x̅yz̅ + x̅yz + xy̅z + xyz̅
The complement of F̅ = F̅ = F
F = (x + y + z) (x + y̅ + z) (x + y̅ + z̅) (x̅ + y + z̅) (x̅ + y̅ + z)

Example:
̅C in a sum of minterms (SOP).
Express the Boolean function F = A + B

Solution:
The term A is missing two variables because the domain of F is (A, B, C)
̅) = AB + AB
A = A(B + B ̅ because B + B̅=1
AB(C + C̅) = ABC + ABC̅
̅ (C + C̅) = AB
AB ̅C̅
̅C + AB
̅C missing A, so
B
B ̅ ) = AB
̅C (A + A ̅B
̅C + A ̅C
F = ABC + ABC̅+ AB ̅C̅ + AB
̅C + AB ̅B
̅C + A ̅C
Because A + A = A
F = ABC + ABC̅+ AB ̅C̅ +A
̅C + AB ̅B̅C
F = m7 + m6 + m5 + m4 + m1
In short notation
F(A, B, C) = Σ(1, 4, 5, 6, 7)
F̅(A, B, C) = Σ(0, 2, 3)
The complement of a function expressed as the sum of minterms equal
to the sum of minterms missing from the original function.
̅C
Truth table for F = A + B

14
Prepared by: Dana S. Abdullah Digital 3rd Lecture

Example:
Express F = xy + x̅z in a product of maxterms form.
Solution:
F = xy + x̅z = (xy + x̅)(xy + z) = (x + x̅)(y + x̅)(x + z)(y + z)
remember x + x̅ = 1
F = (y + x̅)(x + z)(y + z)
F = (x̅ + y + zz̅)(x + yy̅ + z )(xx̅ + y + z)
F = (x̅ + y + z)( x̅ + y + z̅)(x + y + z)(x + y̅ + z)(x + y +z)( x̅ + y + z)
F = (x̅ + y + z)( x̅ + y + z̅)(x + y + z)(x + y̅ + z)
F = M4 M5M0M2
F(x, y, z) = Π(0, 2, 4, 5)
F̅(x, y, z) = Π(1, 3, 6, 7)
The complement of a function expressed as the product of maxterms
equal to the product of maxterms missing from the original function.
To convert from one canonical form to another, interchange the symbols Σ,
Π and list those numbers missing from the original form.
F = M4 M5M0M2 = m1 + m3 + m6 + m7
F(x, y, z) = Π(0, 2, 4, 5) = Σ(1, 3, 6, 7)

15

You might also like