Digital Electronics: CT 304N Unit-2 (Part-1) Binary Logic and Boolean Algebra
Digital Electronics: CT 304N Unit-2 (Part-1) Binary Logic and Boolean Algebra
Unit–2(Part-1)
Binary Logic and Boolean
Algebra
Dr. Anand J. Patel
Index
Logic Circuit:
Logic circuit is made up of Various logic gate.
Input and Output signals are binary:
X Y
X Y 0 1
1 0
Logical Expression : Y = X’
y is only TRUE if x is FALSE
AND Gate
X Y Z
X 0 0 0
Z 0 1 0
Y 1 0 0
1 1 1
Logical Expression: Z = X . Y
z is only TRUE only if x is TRUE and y is
TRUE
OR Gate
X Y Z
X 0 0 0
Z 0 1 1
Y
1 0 1
1 1 1
Logical Expression: Z = X + Y
z is TRUE if x is TRUE or y is TRUE (or both)
NAND Gate
X Y Z
X 0 0 1
Z 0 1 1
Y 1 0 1
1 1 0
X Y Z
X 0 0 1
Z 0 1 0
Y
1 0 0
1 1 0
X Y Z
X
Z
Y 0 0 0
0 1 1
1 0 1
1 1 0
Logical Expression: Z = X Y
z is TRUE if x is TRUE or y is TRUE (but not both)
Exclusive-NOR Gate(XNOR)
X
Z X Y Z
Y
0 0 1
0 1 0
1 0 0
Logical Expression: Z = X Y 1 1 1
Multiple-input Gates
Z1 Z2
Z3 Z4
BUBBLED GATE
Not gate
A Y=A’
0 1
1 0
Input is A
Output is Y
Y = A’
AND gate
A B Y1 Y
0 0 1 0
0 1 1 0
1 0 1 0
1 1 0 1
Y1 = A.B
Y = Y1
= A.B
= A.B
OR gate
A B Y1 Y2 Y
0 0 1 1 0
0 1 1 0 1
1 0 0 1 1
1 1 0 0 1
Y1 =A’
Y2 = B’
Y = (Y1. Y2)’
= [ (A)’ . (B)’ ]’ { Apply De-Morgan’s theorem }
= [ (A+B)’ ]’
= A+B
NOR gate
A B Y1 Y2 Y3 Y
0 0 1 1 0 1
0 1 1 0 1 0
1 0 0 1 1 0
1 1 0 0 1 0
Y1 =A’
Y2 = B’
Y3 = (Y1. Y2)’
= [ (A)’ . (B)’ ]’ { Apply De-Morgan’s theorem }
= [ (A+B)’ ]’
= A+B
Y = (Y3)’
= (A+B)’
EX-OR gate (Exclusive-OR gate)
=Y1
=Y
=Y2
A B A’ B’ Y1 Y2 Y
0 0 1 1 1 1 0
0 1 1 0 0 1 1
1 0 0 1 1 0 1
1 1 0 0 1 1 0
EX-NOR gate (Exclusive-NOR gate)
=Y1
=Y
=Y2
A B A’ B’ Y1 Y2 Y3 Y
0 0 1 1 1 1 0 1
0 1 1 0 0 1 1 0
1 0 0 1 1 0 1 0
1 1 0 0 1 1 0 1
NOR as Universal gate
NOT gate
Y A Y=A’
0 1
1 0
Input is A
Output is Y
Y = A’
OR gate
Y1
A B Y1 Y
A
Y 0 0 1 0
B
0 1 0 1
1 0 0 1
Y1 = A+B 1 1 0 1
Y = Y1
= A+B
= A+B
AND gate
A B Y1 Y2 Y
Y1 0 0 1 1 0
A
0 1 1 0 0
Y
B 1 0 0 1 0
Y2 1 1 0 0 1
Y1 = A’
Y2 = B’
Y = (Y1+Y2)’
= [ (A)’ + (B)’ ]’{Apply De-Morgan’s theorem}
= [ (A .B)’ ]’
= A.B
NAND gate
Y1
Y3
Y
Y2
A B Y1 Y2 Y3 Y
0 0 1 1 0 1
0 1 1 0 0 1
1 0 0 1 0 1
1 1 0 0 1 0
Y1 = A’
Y2 = B’
Y3 = (Y1+Y2)’
= [ (A)’ + (B)’ ]’ {Apply De-Morgan’s theorem}
= [ (A .B)’ ]’
= A.B
Y = (Y3)’
= (A.B)’
EX-OR gate
A B A’ B’ Y1 Y2 Y3 Y
0 0 1 1 0 0 1 0
0 1 1 0 0 1 0 1
1 0 0 1 1 0 0 1
1 1 0 0 0 0 1 0
EX-NOR gate
A B A’ B’ Y1 Y2 Y
0 0 1 1 0 0 1
0 1 1 0 0 1 0
1 0 0 1 1 0 0
1 1 0 0 0 0 1
Logic Function Implementation
Switches in parallel => OR
• Using Switches
• For inputs:
• logic 1 is switch closed
• logic 0 is switch open
• For outputs: Switches in series => AND
• logic 1 is light on
• logic 0 is light off.
• NOT uses a switch such
that: Normally-closed switch => NOT
• logic 1 is switch open
C
• logic 0 is switch closed
Logic Function Implementation (Continued)
• Example: Logic Using Switches
B C
A
• Light is on (L = 1) for
L(A, B, C, D) = A ((B C') + D) = A B C' + A D
Y 0 1 0 1
(AND) X ·Y 0 0 0 1
(OR) X1 Y 0 1 1 1
(NOT) X 1 1 0 0
(b) Timing diagram
Example : Uses of Simple Logic
• Example – Heating Boiler
– If chimney is not blocked and the house is cold and the pilot light is
lit, then open the main fuel valve to start boiler.
b = chimney blocked
c = house is cold
p = pilot light lit
v = open fuel valve
-So give a logical (Boolean) expression for the statement ??....
Solution : Uses of Simple Logic Example
• Example – Heating Boiler
– If chimney is not blocked and the house is cold and the pilot light is
lit, then open the main fuel valve to start boiler.
b = chimney blocked
c = house is cold
p = pilot light lit
v = open fuel valve
– So in terms of a logical (Boolean) expression
v = (NOT b) AND c AND p
Boiler Example
• If chimney is not blocked and the house is
cold and the pilot light is lit, then open the
main fuel valve to start boiler.
b
c v b.c.p
p
Introduction to Boolean Algebra:
• English mathematician George Boole invented symbolic logic in
1854,which is known as Boolean algebra.
• Boolean logic operations:
There are three basic operations in Boolean algebra:
1) AND
2) OR
3) NOT or INVERSION
Properties of Boolean algebra:
1) Commutative property:
A+B = B+A
A.B = B.A
2)Associative property:
A+(B+C) = (A+B)+C
A.(B.C) = (A.B).C
3) Distributive property:
A+B.C = (A+B) (A+C)
A.(B+C) = A.B + A.C
4) Absorption property:
A+A.B = A
A.(A+B) = A
A+A’. B = A+B
A.(A’+ B) = A.B
Properties of Boolean algebra:
5) Consensus property:
A.B+A’.C+B.C = A.B+A’.C
(A+B)(A’+C)(B+C) = (A+B)(A’+C)
Laws of Boolean Algebra
• Basic Boolean Laws
• Idempotent Law
• A.A=A
• A+A=A
• Identity Law
• A.0=0 ; A.1=A
• A+1=1 ; A+0=A
• Complement Law
• A . A’ = 0
• A + A’ = 1
• Involution Law
• (A’)’ = A
Principle of duality:
• Each law is described by two parts that are duals of each other. The
Principle of duality is:
• Interchanging the + (OR) and * (AND) operations of the expression.
• Interchanging the 0 and 1 elements of the expression.
• Not changing the form of the variables.
• E.g. A+0=A then A.1=A
De-Morgan’s theorems:
1.Complement of the product is equal to the sum of the
complement.
(A.B)’ = A’+B’
Solution:
LHS = A + A’B + AB’
= A + AB’ + A’B
= A (1+B’) + A’B {1+B’=1}
= A (1) + A’B
= A + A’B
= (A + A’) (A + B) Distributive Property
= (A + B) {(A + A’) =1}
= A+B
= RHS
So, A + A’B + AB’ = A + B
Statement : Simplify A (A’ + C) (A’B + C’)
Y = ( A + B )’ .C + ( A + C )’ . B
Statement : Write Boolean expression for the circuit
shown in figure.
Solution:
Given, F(A,B,C)=(A+B)(A+C)
Or, F(A,B,C)=A.A+A.C+B.A+B.C [Applying distributive Rule]
Or, F(A,B,C)=A+A.C+B.A+B.C [Applying Idempotent Law: A.A=A]
Or, F(A,B,C)=A(1+C)+B.A+B.C [Applying distributive Law]
Or, F(A,B,C)=A+B.A+B.C [Applying dominance Law]
Or, F(A,B,C)=A+B.C [Applying absorption Law]
= A’B + (B + A)A + (B + A)B’ Complement, then Identity. (Strictly speaking, we also used the
Commutative Law for each of these applications.)
= A’B + BA + AA + BB’ + AB’ Distributive, two places.
=A’B + BA + A + AB’ Idempotent (for the A's), then Complement and Identity to
remove BB.
=A’B + AB + AT + AB’ Commutative, Identity; setting up for the next step.
= A’B + A(B + T + B’) Distributive.
= A’B + A Identity, twice (depending how you count it).
= A + A’B Commutative.
=(A + A’)(A + B) Distributive.
=A+B Complement, Identity.