Topic 1 Introduction To Digital Logic and Boolean Algebra
Topic 1 Introduction To Digital Logic and Boolean Algebra
Lecture 1
Introduction to Digital Logic and
Boolean Algebra
TOPIC COVERAGE IN THE
LECTURE (1(A))
□ Introductory Digital Concepts
■ Analog Vs Digital Quantities
■ Analog Vs Digital Electronic Systems – Examples
■ Advantages and Limitations of Digital Systems
■ Logic levels – Positive and Negative Logic
2
TOPIC COVERAGE IN THE
LECTURE (1(B))
□ Logic Gates - NOT, AND, OR, NAND, NOR, XOR,
XNOR
■ Standard Logic Symbols
■ Truth Tables
■ Logic expression
■ Logical operation
■ Timing Diagram
■ Application examples
□ IC Gates
■ DIP, Pin configurations
3
TOPIC COVERAGE IN THE
LECTURE (1(C))
□ Boolean Algebra
■ Laws and Rules of Boolean Algebra
■ Demorgan’s theorems
□ Boolean Analysis of Logic circuits
■ Evaluation of logic circuit output
■ Constructing a truth table for a logic circuit
□ Simplification using Boolean Algebra
4
Introduction to Digital Logic
and Boolean Algebra
– Part 1 of 3
6
Digital Quantities
A digital quantity is one having a discrete set of values.
Examples: Digital Watch reading – (Time of the day in minutes/seconds)
Number of coins
Human population of a city (it changes with the time)
People travel from/to the city
7
Analog Electronic System
– An Example
□ Analog system
■ A combination of devices that
manipulate values represented
in an analog form
- Here the variable is
allowed to take any value
in a specified range.
8
Digital System
- Examples
□ Digital system
■ A combination of devices that
manipulate values
represented in digital form.
Examples:
■ Digital Computer
■ Handheld Calculator
■ Digital Watch
■ Telephone system
Analog Watch and Digital Watch
■ Digital audio and video
equipment
9
Advantages of Digital over Analog
□ Data Processing and Transmission – more efficient and reliable
□ Data Storage – more compact storage and greater accuracy and
clarity in reproduction
□ Ease of design – In switching circuits, only the range in which
the voltage or current fall is important not the exact values
□ Accuracy and precision are easier to maintain – In analog
systems, voltage and current signals are affected by
temperature, humidity but in digital systems, info. does not
degrade
□ Easy Programmable operation
□ Less affected by noise - since exact value is not important in
digital systems
□ Ease of fabrication on IC chips – analog devices cannot be
economically integrated.
10
Limitations of Digital Techniques
11
Digital and Analog electronics together
- Examples
12
Digital and Analog electronics together
-Examples
13
Introduction to Digital Logic
and Boolean Algebra
– Part 2 of 3
Logic Gates
- NOT, AND, OR, NAND, NOR, XOR, XNOR
TOPIC COVERAGE
- PART 2 of 3
□ Logic Gates - NOT, AND, OR, NAND, NOR, XOR,
XNOR
■ Standard Logic Symbols
■ Truth Tables
■ Logic expression
■ Logical operation
■ Timing Diagram
■ Application examples
□ IC Gates
■ DIP, Pin configurations
15
Logic Gates - Introduction
16
The Inverter (NOT gate)
17
The Inverter (NOT gate)
- Symbol, Truth Table, Boolean Expression,
Logical Operation, Timing Diagram
Basic Logical Function:
NOT gate can have only one input and
performs logical inversion or
complementation.
Logical operation:
The output of an inverter is always
the complement (opposite) of the
input.
18
The Inverter (NOT gate)
- Problem
19
The Inverter
- An example application
A group of inverters can be used to form the 1’s complement of
a binary number
Binary number
1 0 0 0 1 1 0 1
0 1 1 1 0 0 1 0
1’s complement
20
The AND Gate
21
The AND Gate
- Symbol, Truth Table, Boolean Expression,
Logical operation, Timing Diagram
Basic Logical Function:
An AND gate can have two or more
inputs and performs logical
multiplication.
Logical Operation:
The output of an AND gate is HIGH
only when all inputs are HIGH.
Boolean expression
Truth table
(2-input AND gate)
0 = LOW Timing Diagram
1 = HIGH
22
The AND gate (3-inputs)
23
The AND gate (4-inputs)
24
The AND gate
- Problem 1
If two waveforms, A and B are applied to AND gate inputs as shown in
figure below, what is the resulting output waveform?
25
The AND gate
- Problem 2
If two waveforms, A and B are applied to AND gate inputs as shown in
figure below, what is the resulting output waveform?
26
The AND gate
- An example application
□ A common application of the AND gate is to enable (to allow) the passage of a
signal (pulse waveform) from one point to another at certain times and to inhibit
(prevent) the passage at other times.
□ Example : A seat belt Alarm system
An AND gate is used to detect when the ignition switch is ON and the seat belt is unbuckled.
If the ignition switch is on, a HIGH is produced on input A of the AND gate.
If the seat belt is not properly buckled, a HIGH is produced on input B.
Also, when the ignition switch is turned on, a timer is started that produces a HIGH on input C for 30s.
If all three conditions exist- that is, if the ignition is on and the seat belt is unbuckled and timer is running-
the output of AND gate is HIGH and audible alarm is energized to remind the driver.
27
The AND gate
- An example application
The AND operation is used in computer programming as a
selective mask.
If you want to retain certain bits of a binary number but
reset the other bits to 0, you could set a mask with 1’s in
the position of the retained bits.
Ans: 00000011
28
The OR Gate
29
The OR Gate
- Symbol, Truth Table, Boolean Expression,
Logical operation, Timing Diagram
Basic Logical Function:
The OR gate can have two or more
inputs and performs logical addition.
Logical Operation:
The output of an OR gate is LOW only
when all inputs are LOW.
Boolean expression
Truth table
(2-input OR gate)
0 = LOW
1 = HIGH Timing Diagram
30
The OR gate (3-inputs)
Note:
There is no carry in
Boolean addition.
3-Input OR Gate
31
The OR gate (4-inputs)
4-Input OR Gate
32
The OR gate
- Problem 1
If two waveforms, A and B are applied to OR gate inputs as shown in
figure below, what is the resulting output waveform?
33
The OR gate
- Problem 2
If two waveforms, A and B are applied to OR gate inputs as shown in
figure below, what is the resulting output waveform?
34
The OR gate
- An example application
The OR operation can be used in computer programming to
set certain bits of a binary number to 1.
35
The NAND Gate
36
The NAND Gate
- Symbol, Truth Table, Boolean Expression,
Logical operation, Timing Diagram
Boolean expression
Truth table
(2-input NAND Gate)
0 = LOW
1 = HIGH
Timing Diagram
37
The NAND gate (3-inputs)
38
The NAND gate (4-inputs)
39
The NAND gate
- Problem
If two waveforms, A and B are applied to NAND gate inputs as shown in
figure below, what is the resulting output waveform?
40
The NAND Gate
- Negative-OR Equivalent operation
□ A NAND gate produces HIGH output, when one or more
inputs are LOW.
□ From this view point, a NAND gate can be used for an
OR operation that requires one or more LOW inputs to
produce a HIGH output. This aspect of NAND operation is
referred to as negative-OR
41
The NOR Gate
42
The NOR Gate
- Symbol, Truth Table, Boolean Expression,
Logical operation, Timing Diagram
Boolean expression
Truth table
(2-input NOR Gate)
0 = LOW
1 = HIGH
Timing Diagram
43
The NOR gate (3-inputs)
44
The NOR gate (4-inputs)
45
The NOR gate
- Problem
If two waveforms, A and B are applied to NOR gate inputs as shown in
figure below, what is the resulting output waveform?
46
The NOR Gate
- Negative-AND Equivalent operation
□ A NOR gate produces HIGH output, when all inputs are
LOW.
□ From this view point, a NOR gate can be used for an
AND operation that requires all LOW inputs to produce a
HIGH output. This aspect of NOR operation is referred to
as negative-AND
47
The XOR Gate
48
The XOR (Exclusive-OR) Gate
- Symbol, Truth Table, Boolean Expression,
Logical operation, Timing Diagram
Basic Logical Function:
The XOR gate can have two or more
inputs and performs ODD function
(output is equal to 1 if the input
variables have an odd number of 1’s).
Logical Operation:
The output of XOR gate is HIGH
whenever the two inputs are different
(2-input XOR gate)
Boolean expression
Truth table
(2-input XOR gate)
0 = LOW
1 = HIGH
Timing Diagram
49
The XOR gate (2-inputs)
- using AND-OR-NOT Gates
50
The XOR gate (3-inputs)
51
The XOR gate
- Problem
If two waveforms, A and B are applied to XOR gate inputs as shown in
figure below, what is the resulting output waveform?
A
B
X
If the A and B waveforms are both inverted for the above waveforms,
how is the output affected?
52
The XNOR Gate
53
The XNOR (Exclusive-NOR) Gate
- Symbol, Truth Table, Boolean Expression,
Logical operation, Timing Diagram
Basic Logical Function:
The XNOR gate can have two or more
inputs and performs EVEN function
(output is equal to 1 if the input
variables have an even number of 1’s).
Logical Operation:
The output of XNOR gate is HIGH
whenever the two inputs are identical
(2-input XNOR gate - can be called as
equivalence gate)
Boolean expression
Truth table
(2-input XNOR Gate)
0 = LOW
1 = HIGH Timing Diagram
54
The XNOR gate (3-inputs)
A B C X
0 0 0 1
0 0 1 0
0 1 0 0
3-input even function 0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
Truth Table
55
The XNOR gate
- Problem
If two waveforms, A and B are applied to XNOR gate inputs as
shown in figure below, what is the resulting output waveform?
A
B
X
56
Basic Logic Gates
(Summary)
57
Integrated Circuit (IC) Packages
Pin 1
60
Introduction to Digital Logic
and Boolean Algebra
– Part 3 of 3
Boolean Algebra
- Laws, Rules and Theorems
- Analysis of Logic Circuits
- Simplification
TOPIC COVERAGE
- PART 3 of 3
□ Boolean Algebra
■ Laws and Rules of Boolean Algebra
■ Demorgan’s theorems
□ Boolean Analysis of Logic circuits
■ Evaluation of logic circuit output
■ Constructing a truth table for a logic circuit
□ Simplification using Boolean Algebra
62
BOOLEAN ALGEBRA
– Rules, Laws, and Theorems
63
Boolean Algebra
64
Laws of Boolean Algebra
□ Commutative Law
□ Associative Law
□ Distributive Law
65
Laws of Boolean Algebra
□ Commutative Law of Addition: A+B=B+A
66
Laws of Boolean Algebra
□ Associative Law of Addition: A + (B + C) = (A + B) + C
67
Laws of Boolean Algebra
□ Distributive Law:
A(B + C) = AB + AC
68
Rules of Boolean Algebra
69
Rules of Boolean Algebra
□ Rule 1
□ Rule 2
OR Truth Table
70
Rules of Boolean Algebra
□ Rule 3
□ Rule 4
AND Truth
Table
71
Rules of Boolean Algebra
□ Rule 5
□ Rule 6
OR Truth Table
72
Rules of Boolean Algebra
□ Rule 7
□ Rule 8
AND Truth
Table
73
Rules of Boolean Algebra
□ Rule 9
74
Rules of Boolean Algebra
□ Rule 10: A + AB = A
75
Rules of Boolean Algebra
□ Rule 11:
76
Rules of Boolean Algebra
□ Rule 12: (A + B)(A + C) = A + BC
77
De Morgan’s Theorems
De Morgan’s first theorem:
The complement of a product of variables is equal to the sum
of the complements of the variables.
Stated in another way,
The complement of two or more variables ANDed is equivalent to
the OR of the complements of the individual variables.
The formula for expressing this theorem for two variables is:
78
De Morgan’s Theorems
De Morgan’s second theorem:
The complement of a sum of variables is equal to the product
of the complements of the variables.
Stated in another way,
The complement of two or more variables Ored is equivalent to
the AND of the complements of the individual variables
The formula for expressing this theorem for two variables is:
79
De Morgan’s Theorem
□ De Morgan’s theorems provide mathematical verification of the
equivalency of the NAND and negative-OR gates and equivalency of
the NOR and negative- AND gates.
□ These theorems are extremely useful in simplifying expressions in
which a product or sum of variables is inverted
Gate equivalencies
and
corresponding
truth tables
80
BOOLEAN ANALYSIS OF LOGIC
CIRCUITS
81
Boolean Analysis of Logic Circuits
82
Example 1 : Problem
X= AB+(C+D)
X= AB + C+ D
83
Example 2 : Problem
Solution:
X = (AB)(CD)
X = ABCD
84
Example 3 : Problem
Solution:
X = ABCD +A
X = A + BCD
85
Example 4 : Problem
Solution:
X=AB
C
86
Example 5 : Problem
Solution:
87
Example 5 : Problem
Solution (continued):
88
Example 5 : Problem
Solution (continued):
Simplification:
X = (A +AB) +(B(C+D))
X =(A + B) + (B(C + D))
X = (A + B) + (B C + B D)
X = A + B + BC + BD
X=A+B+C+B D
X=A+B+C+D
89
Example 5 : Problem
The circuits
are different
but the
outputs are the
same
90
Example 6 : Problem
Solution:
(A + B)(CD) = A + B + CD
= A + B + CD
91
Example 6 : Problem
X and Y are
the same
92
SIMPLIFICATION USING
BOOLEAN ALGEBRA TECHNIQUES
93
Problem 1
Simplify: A’B + A’ B’ C’ D’ + A B C D’
Problem 2
Simplify: F = A’ B C + A B’ C + A B C’ + A B C
F=BC+AC+AB
Problem 3
Simplify:
W = M + N’P
Problem 4
Express the complement f’(w,x,y,z) of the following
expression in a simplified form.
f(w,x,y,z) = wx(y’z + yz’)
f’(w,x,y,z) = w’ + x’ + (y’z +yz’)’
= w’ + x’ + (y’z)’(yz’)’
= w’ + x’ + (y + z’)(y’ + z)
= w’ + x’ + yy’ + yz + z’y’ + z’z
= w’ + x’ + 0 + yz + z’y’ + 0
= w’ + x’ + yz + y’z’
Simplification using Boolean Algebra
– More Problems
1. AB+A(B+C)+B(B+C)
2. [AB’(C+BD)+A’B’]C
3. A’BC+AB’C’+A’B’C’+AB’C+ABC
4. (AB+AC)’+A’B’C
98
References
Slides adopted from the books
99