You are on page 1of 24

Laws and Rules

DeMorgan’s Theorem
Universal Gates
Combinational Logic Circuits
• At the end of this chapter, students should be able to:-
– Apply the basic laws and rules of Boolean algebra.
– Apply DeMorgan’s theorems to Boolean expressions.
– Evaluate Boolean expressions.
– Simplify expressions by using the laws and rules of Boolean
algebra.
– Draw the logic circuit using universal gates only.
– Derive the Sum-of-Products (SOP) and Product-of-Sums
(POS) from a truth table.
– Design a combinational logic circuits.

10/9/2012 RA/Sept2013-Jan2014 2
• Boolean Algebra is the mathematics of digital systems.
• A variable is a symbol used to represent a logical
quantity that have a value of 1 or 0.

• The complement is the inverse of a variable and is


indicated by a bar over the variable.

• Three laws of Boolean Algebra are:


Commutative Distributive

10/9/2012 RA/Sept2012-Jan2013 3
10/9/2012 RA/Sept2012-Jan2013 4
10/9/2012 RA/Sept2012-Jan2013 5
10/9/2012 RA/Sept2012-Jan2013 6
10/9/2012 RA/Sept2012-Jan2013 7
A. A  0
AB. AB  0
A.B. A  0.B  0
( A  B)( A  B )  0

A  A 1
AB  AB  1
A  B  A  1 B  1
( A  B)  ( A  B)  1
10/9/2012 RA/Sept2012-Jan2013 8
A A
AB  AB
( A  B)  A  B

(A  BC)  (A  B)(A  C)
A  BCD  ( A  B)( A  CD)
 ( A  B)( A  C )( A  D)

(A  AB)  A
A  AB  A(1  B )
 A.1
A

10/9/2012 RA/Sept2012-Jan2013 9
Example 1

Simplify Y  A  ABC
Solution: Y  A  ABC
 (A  A)(A  BC) Rule 10

 1(A  BC)
 A  BC
Example 2
Simplify Y  A  A.B  A.B.C
Solution: Y  A  A.B  A.B.C
 A  A.B(1  C) Rule 11

 A  A.B
AB Rule 10

10/9/2012 RA/Sept2012-Jan2013 10
Example 3

Prove that A.B.C  A.B.C  A.B.C  A.B  B.C


Solution: A.B.C  A.B.C  A.B.C
 A.B(C  C)  A.B.C Factorise A B Distributive Law

 A.B(1)  A.B.C
 A.B  A.B.C
 B.(A  A C)
 B( A  A)(A  C) * A  BC  (A  B)(A  C) Rule 10

 B( A  C)
 A.B  B.C

10/9/2012 RA/Sept2012-Jan2013 11
Example

Prove that the SOP and POS expressions for an OR gate are equivalent.

SOP, Y  AB  A B  AB
POS, Y = A + B

Solution: Y  A.B  A.B  AB


 A.B  A(B  B) Distributive Law
 A.B  A
 (A  A)(A  B) Rule 10
AB

10/9/2012 RA/Sept2012-Jan2013 12
10/9/2012 RA/Sept2012-Jan2013 13
Example 1 Example 2

Prove that AB.B  AB Prove that AB.B  C  BC


Solution: AB.B Solution: AB.B  C
 (A  B)B  (A  B)  BC
 AB  BB  A  B  C  BBC
 AB  0  A  B  C  BC
 AB  B  C(A  1)
Example 3  BC
Prove that AB.C  D. AB  A  B  C  D
Solution AB.C  D. AB
 A.B.C  D  AB Break the outer most bar
 AB  C  D  A  B
 A BC  D

10/9/2012 RA/Sept2012-Jan2013 14
• NAND and NOR gates are universal gates.
• It can represent basic gates which are NOT, AND and OR.

• The expression Y  A.A  A is equivalent to a NOT gate.


A
Y =

• The expression Y  AB  AB is equivalent to an AND gate.


A
B Y =

• The expression is Y  A.B  A  B  A  B equivalent to the OR gate.


A

B
Y =

10/9/2012 RA/Sept2012-Jan2013 15
Example 1

Draw Y  AB  CD using only NAND gates.

1 Double invert the expression .

Y  AB  CD
 
Keep the top inversion bar. Apply DeMorgan’s Theorem 2 to the bottom inversion
 
 
2 bar to eliminate the OR operation.

Y  AB  CD

3 Draw the circuit using only NAND gates.

A
B
Y
C
D

10/9/2012 RA/Sept2012-Jan2013 16
Example 2

Draw Y  (A  B)(C  D) using only NOR gates.

1 Double invert the expression .

Y  (A  B)(C  D)
 
Keep the top inversion bar. Apply DeMorgan’s Theorem 1 to the bottom inversion
 
 
2 bar to eliminate the AND operation.

Y  (A  B)  (C  D)

3 Draw the circuit using only NOR gates.

A
B
Y
C
D

10/9/2012 RA/Sept2012-Jan2013 17
A B Y SOP
0 0 0
0 1 1 AB
1 0 1 AB Product term

1 1 1 AB

Therefore, Y = A B + A B + A B

10/9/2012 RA/Sept2012-Jan2013 18
A B Y POS
0 0 0 A+B
0 1 0 A+B Sum terms
1 0 0 A+B
1 1 1

Therefore, Y = (A+B) ( A+B) (A+B)

10/9/2012 RA/Sept2012-Jan2013 19
• Combinational logic circuits are constructed by
connecting together logic gates.
• Four steps involve in designing combinational logic
circuits are:-

10/9/2012 RA/Sept2012-Jan2013 20
Example
• The diagram shown below is a water filtering system. A water quality sensing
detector will generate a quality scale from 0 – 7. From this scale, selected
filter will function as follows to produce clean water.
Clean
Water flow Filter Water Scale Filters
water
A B C Condition needed
The cleanest 0 No filters are
activated
Water Logic 1 A
quality circuit
sensing 2 A, B and C
detector
3 B
4 A
Scale 0 - 7 5 A and B
6 A and C
The dirtiest 7 A, B and C
Design the logic circuit. Your solution should include:
a) Truth table.
b) Simplified expression.
c) Based on the simplified expression in (b), draw the
logic circuit.
10/9/2012 RA/Sept2012-Jan2013 21
Solution:

1 Derive the truth table 2 Identify the Boolean expression (SOP)

A B C FA FB FC FA  A BC  ABC  A BC  A BC  ABC  ABC


0 0 0 0 0 0 FB  ABC  ABC  A BC  ABC
0 0 1 1 0 0 FC  ABC  ABC  ABC
0 1 0 1 1 1
Water Scale Filters needed
0 1 1 0 1 0 Condition
The cleanest 0 No filters are
1 0 0 1 0 0 activated
1 A
1 0 1 1 1 0 2 A, B and C
3 B
1 1 0 1 0 1 4 A
1 1 1 1 1 1 5 A and B
6 A and C
The dirtiest 7 A, B and C

10/9/2012 RA/Sept2012-Jan2013 22
Solution:

3 Simplify the Boolean expression using Boolean Algebra

FA  A BC  ABC  A BC  A BC  ABC  ABC


 A BC  ABC  A B(C  C)  AB(C  C) Distributive Law

 A BC  ABC  A(B  B) Rule 8

 A(BC  BC)  A Distributive Law

 (A  A)(A  ( BC  BC)) Rule 10


 A  BC  BC

FB  ABC  ABC  A BC  ABC


 AB(C  C)  AC(B  B) Distributive Law Rule 8
 AB  AC

FC  ABC  ABC  ABC


 BC(A  A)  ABC Distributive Law
 B(C  AC) Rule 8
 B(C  A)(C  C) Rule 10
10/9/2012
 BC  AB RA/Sept2012-Jan2013 23
Solution:

4 Draw the logic circuit based on the simplified Boolean expression

A B C

Filter A

Filter B

Filter C

10/9/2012 RA/Sept2012-Jan2013 24

You might also like