See discussions, stats, and author profiles for this publication at: https://www.researchgate.
net/publication/267334709
Fundamentals of Digital Systems
Book · January 2009
CITATIONS READS
0 20,697
4 authors, including:
Sy Najib Sy Salim Muhammad Nizam Kamarudin
Technical University of Malaysia Malacca Technical University of Malaysia Malacca
56 PUBLICATIONS 405 CITATIONS 82 PUBLICATIONS 335 CITATIONS
SEE PROFILE SEE PROFILE
All content following this page was uploaded by Sy Najib Sy Salim on 26 October 2014.
The user has requested enhancement of the downloaded file.
CHAPTER 3
LOGIC GATES & BOOLEAN ALGEBRA
CHAPTER OUTCOMES
Upon completion of this chapter, student should be able to:
1. Describe the basic logic gates operation
2. Construct the truth table for basic logic gates
3. Write the Boolean expression
4. Implement the circuit from Boolean expression.
5. Apply De Morgan’s theorems to simplify logic expressions.
1.1 INTRODUCTION
Logic gate is the most basic type of digital circuit, which consists of two or more inputs and one
output. A gate can be used alone to perform a logic function. It can also be connected to several
other gates to form a logic network.
1.2 BASIC LOGIC GATES
The basic gates are NOT, AND, OR, XOR, XNOR, NAND & NOR. The symbols for these gates
and their corresponding Boolean expressions are briefly discussed in this chapter.
1.2.1 Inverter / NOT gate
BEHAVIOR The output is the inverse of the input.
SYMBOLS
A Y=A
ALGEBRAICALLY Y=A
TRUTH TABLE
Input, A Output, Y
0 1
1 0
TIMING DIAGRAM
1.2.2 OR gate
BEHAVIOR The output is 1 if any or all of the inputs are 1
SYMBOL A
F
B
ALGEBRAICALLY F = A B
TRUTH TABLE Input Output
A B F
0 0 0
0 1 1
1 0 1
1 1 1
TIMING DIAGRAM
A
F=A+B
1.2.3 AND gate
BEHAVIOUR The output is 1 only if all the inputs are 1
SYMBOL
A
F
B
ALGEBRAICALLY F = A B = AB
Input Output
TRUTH TABLE
A B F
0 0 0
0 1 0
1 0 0
1 1 1
TIMING DIAGRAM
A
F = AB
1.2.4 NOR gate
BEHAVIOR The Output is 1 only if all of the inputs are 0
SYMBOL
A
F
B
A
= F
B
ALGEBRAICALLY F = A B
TRUTH TABLE Input Output
A B F
0 0 1
0 1 0
1 0 0
1 1 0
TIMING DIAGRAM
A
B
F
1.2.5 NAND gate
BEHAVIOUR The output is 1 if any or all the inputs are 0.
SYMBOL A A
F = F
B B
ALGEBRAICALLY F = AB
TRUTH TABLE
Input Output
A B F
0 0 1
0 1 1
1 0 1
1 1 0
TIMING DIAGRAM
B
F
1.2.6 X-OR gate (Exclusive-OR gate)
BEHAVIOUR The output is 1 only if an odd number of the inputs are 1
SYMBOL A
F
B
ALGEBRAICALLY F = AB AB = A B
TRUTH TABLE
Input Output
A B F
0 0 0
0 1 1
1 0 1
1 1 0
TIMING DIAGRAM
A
F
1.2.7 X-NOR gate (Exclusive-NOR gate)
BEHAVIOUR The output is 1 only if an odd number of inputs are 0
SYMBOL
A
F
B
ALBEGRAICALLY F = AB AB = A B
TRUTH TABLE
Input Output
A B F
0 0 1
0 1 0
1 0 0
1 1 1
TIMING DIAGRAM
A
B
F
1.3 BOOLEAN EXPRESSIONS
1.3.1 Implementing Circuit From Boolean Expression
Boolean expression is mathematics of logic. It is one of the most basic tools available to the logic
designer and thus can be effectively used for simplification of complex logic expressions. The
simplify logic circuit can be directly draw base on the final equation that obtained from this
Boolean expression.
If an expression contains both AND and OR operation, the AND operations are performed first.
Unless there are parentheses in the expression, where the operation inside the parentheses is to
be performed first.
Example 3-1:
1) Given F = ( A B) C , so the diagram is performed as:
A 𝐴+𝐵
𝐹 = 𝐴+𝐵 .𝐶
B
C
2) Given F = AB CD , the diagram is performed as:
A 𝐴𝐵
B
𝐹 = 𝐴𝐵 + 𝐶𝐷
C
D 𝐶𝐷
3) Given F = ( A B)( B C ) , the diagram is performed as:
A 𝐴+𝐵
B
𝐹 = 𝐴+𝐵 𝐵+𝐶
𝐵+𝐶
C
1.3.2 Evaluating Logic-Circuit Outputs
Example 3.2:
Given A=0, B=1, C=1, D=1 and the Boolean expression is F = ABC ( A D) , determine the
output for the expression.
Solution
F = ABC ( A D)
= 0 1 1(0 1)
= 1(0)
=0
1.3.3 Determining Output Level From Circuit Diagram
Example 3.3:
Determining the output level from a circuit diagram, where the inputs are A=0, B=1, C=1,D=1
B F
Solution
F=0
1.4 BOOLEAN THEOREMS
Boolean theorems can be used to express logic circuit operations mathematically. It can help us
to simplify logic expression. There are two methods to simplify a complicated logic circuit,
which is:
1) Boolean algebra & De Morgan’s theorem
2) Karnaugh Map
The most important of Boolean algebra rules and laws are presented in the following section.
1.4.1 Basic Rules of Boolean Algebra
Laws of Boolean algebra
Commutative Addition
Laws A A+B B B+A
A B = A
B
= B A
Multiplication
A B
AB = BA AB = BA
B A
Associative Addition
Laws A+(B+C) A A+B
A+(B+C) A
=(A+B)+C = B
B (A+B)+C
C B+C C
Distributive
Law A( B C) = AB AC
A AB
B
B+C B AB + AC
C
A(B+C)
=
A A
C AC
1.4.2 Rules of Boolean algebra (Single-variable theorems)
Table 3-2: Multivariable theorems
(10a) A+B = B+A
(10b) AB = BA
(11) A+(B+C) = (A+B)+C
(12) A(BC)=(AB)C
(13a) A(B+C) = AB+AC
(13b) (A+B)(C+D)=AC+BC+AD+BD
(14) A+AB = A
(15a) A+AB=A+B Proof it!
(15b) A+AB = A+B
Example 3.4:
1) Proof the A+AB = A
Solution
A+AB = A(1+B)
= A(1) …theorem (6)
= A
2) Proof the (A+B)(A+C) = A + BC
Solution
( A B)( A C) = AA AC AB BC
= A AC AB BC
= A(1 C) AB BC
= A(1) AB BC
= A(1 B) BC
= A(1) BC
= A BC
1.4.3 DeMorgan’s Theorem
DeMorgan’s theorems are very useful in simplifying expressions for easy transfer back and forth
from the product of variables to the sum of variables form. It allows for elimination of
overbar(s) that are over several variables.
The two theorems are:
First theorem
The inverted of a product of variables is equal to the sum of the inverted individually variable.
A B = A B
A A
B B
INPUTS OUTPUTS
A B AB A B A B A B
0 0 0 1 1 1 1
0 1 0 1 0 1 1
1 0 0 0 1 1 1
1 1 1 0 0 0 0
Second theorem
The inverted of a sum of variables is equal to the product of the inverted individual variable.
A B = A B
A A
B B
INPUTS OUTPUTS
A B A B A B A B A B
0 0 0 1 1 1 1
0 1 1 1 0 0 0
1 0 1 0 1 0 0
1 1 1 0 0 0 0
Example 3.5:
Applying DeMorgan’s theorem to the expression: XYZ = X Y Z .
Solution
XYZ = X Y Z
X Y Z = X Y Z
Example 3.6:
Apply DeMorgan’s theorem to each of the following expressions:
(a) AB (b) ABC
(c) ABC (d) A B
(e) A B C (f) A BC
Solution
(a) A B (b) A B C
(c) AB C = AB C (d) AB
(e) ABC (f) ABC = ABC
1.4.4 Applying DeMorgans Theorems
The following example illustrates the applications of De Morgan’s theorems and Boolean
Algebra to the specific expression:
Example 3.7:
Given A BC D( E F ) , simplify the expression.
Solution:
Let A BC = X
Assume each term as single variable D( E F ) = Y
Rewite the expressions. A BC D( E F ) = X Y
Apply DeMorgan’s Theorem X Y = X Y
Rewrite new expression. ( A BC )( D( E F ))
Use rule 9 ( A = A ) to cancel the
double bars over the left term. ( A BC ) D( E F ) = ( A BC )( D( E F ))
Applying DeMorgan’s Theorem to
the 2nd term ( A BC )( D ( E F ))
Use rule 9 ( A = A ) to cancel the
double bars over the E F part of the A BC D E F ….answer
term.
Example 3.8:
Apply De Morgan’s theorems to each of the following expressions:
a) ( A B C ) D (b) ABC DEF (c) ( A B)C D E F
Solution
(a) ( A B C)D
Let ( A B C) = X
D =Y
Rewrite; A B C D = XY
Apply DeMorgan’s Theorem; XY = X Y
A B C D = A B C D
Apply DeMorgan’s Theorem to the 1st term, A B C = ABC
Rewrite the expression, A B C D = ABC D (answer)
b) ABC DEF
Let ABC = X
DEF = Y
Rewrite; ABC DEF = X Y
Apply DeMorgan’s Theorem; X Y = X Y
ABC DEF = ( ABC )( DEF )
Apply DeMorgan’s Theorem; ABC DEF = A B C D E F answer
c) A BC D E F
A BC D E F
= A B C D E F
= A B C D E F
= A B C D E F
= AB C D EF answer
1.5 SIMPLIFICATION USING BOOLEAN ALGEBRA
Apply the laws, rules and theorems of Boolean algebra to simplify general expressions.
Example 3.9:
Using Boolean algebra techniques, simplify this expression:
AB AB C BB C
Solution
Apply the distributive law to the 2nd and 3rd terms. AB AB AC BB BC
Apply rule 3 (AA = A) to the 4th term. AB AB AC B BC
Apply rule 7 (A+A=A) to the 1st and 2nd term AB AC B BC
Apply rule 14 (A+AB=A) to the 3rd and 4th term AB AC B
Apply rule 14 (A+AB=A) to the 1st and 3rd term B AC …answer
Example 3.10:
Simplify the following Boolean Expression:
(a) ( AB(C BD) A B)C (b) AB AC A B C
Solution
a) ABC BD ABC
ABC BD ABC
= ABC ABBD AB C
= ABCC ABBDC ABC
= ABC ABC
= BC A A
= BC answer
b) AB AC A B C
AB AC A B C
= AB AC ABC
= A B A C ABC
= A A AC AB BC ABC
= A AC AB BC ABC
= A AC AB BC
= A BC answer
1.6 Universality Of NAND Gates & NOR Gates
All Boolean expressions consists of various combinations of the basic operations of OR, AND,
and INVERTER. Therefore, any expression can be implement using combinations of these gates.
NAND Gates can be used to implement any Boolean function
A A
A A
A
AB AB
B AB
A A
A B= A B
A A B
B
B
NOR Gates can be used to implement any Boolean operation
A A
A
A B
B
A AB
B
1.7 IEEE/ANSI Standard Logic Symbols
A standard for logic symbols was developed in 1984; it is called the IEEE/ANSI Standard 91-1984 for
logic symbols. The IEEE/ANSI standard uses rectangular symbols to represent all logic gates and circuits.
A special dependency notation inside the rectangular symbol indicates how the device outputs depend on
the device inputs.
Table 3-3: Standard logic symbols: (a) traditional; (b) IEEE/ANSI
F
F
F
F
F
F
F
F
F
F
Problem
1. What is the Boolean expression for the logic diagram as shown in Fig. 3-1?
C B A
2. Show the logic arrangements for implementing:
(a) four-input NAND gate using AND gates and NOT gates;
(b) three-input NAND gate using NAND gates;
(c) NOT circuit using EX-NOR gate.
3. Construct the truth table base on the diagram as shown in Fig. 3-1?
4. Simplify the Boolean expression obtain from question 1.
5. Given A=0, B=1, C=1and the Boolean expression is base on question 3 , determine the
output for the expression.
6. Draw the circuits that will perform the functions described by both sides of 𝐴 + 𝐵 = 𝐴̅𝐵 by
applying De Morgan's theorems, and also demonstrate the theorem is true using a truth table.
7. Figure 3.2 shows the inputs waveforms for the two-input AND gate. Draw the output
waveform, F.
Figure 3.2
8. Given the timing diagram in Fig. 3-3, write out the truth table for the circuit responsible for
it, the Boolean equation describing its operation and draw the circuit diagram.
̅ BC + B
9. Implement the Boolean expression F = A ̅C + A B
̅ C + BC using XOR gates.
̅ C using NAND gates only
10. Implement the Boolean expression F = A B + C + A
View publication stats