Digital Lecture 3
Digital Lecture 3
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
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
̅= 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
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
• 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)
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)
8
Prepared by: Dana S. Abdullah Digital 3rd Lecture
9
Prepared by: Dana S. Abdullah Digital 3rd Lecture
10
Prepared by: Dana S. Abdullah Digital 3rd Lecture
11
Prepared by: Dana S. Abdullah Digital 3rd Lecture
12
Prepared by: Dana S. Abdullah Digital 3rd Lecture
13
Prepared by: Dana S. Abdullah Digital 3rd Lecture
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