Professional Documents
Culture Documents
Slide CHP2 Latest 2021
Slide CHP2 Latest 2021
Slide CHP2 Latest 2021
Kemaskini: 09092021
Upon completion of this course, students
should be able to:
01 05
AND gate NAND gate
02 OR gate 06 NOR gate
03 NOT gate Exclusive NOR
07
04 Exclusive OR gate 7
gate
8
Basic Symbolic Logic
OR Gate
• Logical addition, commonly known as the OR function, is performed by an OR gate.
• The OR gate has two or more inputs and a single output.
• For a 2-input OR gate, it only has two inputs and one output. Mandatorily, the output is HIGH when
any of its inputs are HIGH.
OR gate
A
X X=A+B
B
Input Output
A B X
0 0 0
0 1 1 10
1 0 1
1 1 1
Basic Symbolic Logic
AND Gate
• Logical multiplication, commonly known as the AND function, is performed by an AND gate.
• The AND gate has two or more inputs and a single output.
• For example, for a 2-input AND gate, it has only two inputs and one output. Mandatorily, the output
is HIGH only when all its inputs are HIGH.
AND gate
A
X X=A.B
B
Input Output
A B X
0 0 0
0 1 0 12
1 0 0
1 1 1
Basic Symbolic Logic
NOT Gate
• The logical function called inversion or complementation is performed by a NOT gate, which is also
called an inverter.
• This gate has only a single input and a single output.
• The main purpose of this gate is to convert one logic level into the opposite logic level—from 0 to 1,
and 1 to 0.
NOT gate
A X X=A
Input Output
A X
0 1
1 0 14
Basic Symbolic Logic
NOR Gate
• The NOR gate is a NOT-OR gate that is connected in cascade.
• Similar to the OR gate, it has two or more inputs and only one output. Basically, the output of the
NOR gate is HIGH when all of its inputs are LOW.
NOR gate
A
X X=A+B
B
Input Output
A B X
0 0 1
0 1 0 16
1 0 0
1 1 0
Basic Symbolic Logic
NAND Gate
• The NAND gate is actually the combination of NOT and AND gate. Both gates are connected in
cascade.
• Similar to an AND gate, it may have two inputs or more with a single output. The output will go
HIGH when any of its inputs is LOW.
NAND gate
A
X X=A.B
B
Input Output
A B X
0 0 1
0 1 0 18
1 0 0
1 1 0
Basic Symbolic Logic
XOR Gate
• An Exclusive-OR (XOR) gate is a special gate where the output is exclusively HIGH when either of
its inputs is HIGH, and exclusively LOW when both of the inputs are LOW or HIGH.
• The XOR gate can be built from simple gates.
Exclusive OR gate
A
X X=A+B
B
Input Output
A B X
0 0 0
0 1 1 20
1 0 1
1 1 0
Basic Symbolic Logic
XNOR Gate
• Another special gate is the Exclusive-NOR (XNOR) gate, which opposes the NOR gate.
• The output of a 2-input XNOR gate will go exclusively HIGH when both inputs are the same, either
both are zero or both are one. The output will then go LOW when both inputs are not similar.
Exclusive NOR gate
A
X X=A+B
B
Input Output
A B X
0 0 1
0 1 0 22
1 0 0
1 1 1
State the logic type and expression for the logic
gate in figure below
Solution:
Example
Logic type: AND gate 4 inputs
Expression: 𝑋 = 𝐴. 𝐵. 𝐶. 𝐷
23
Draw logic symbol for NOR gate 3 inputs
Solution:
Example
24
Named of logic symbol below
Solution:
Example
25
Universal Gate
• NAND and NOR gates are universal gates—the other gates like AND, OR and NOT can be
constructed from NOR and NAND gates.
• To do any conversions for this purpose and to facilitate understanding, the graphic symbols for
NAND and NOR gates are shown in Figures 2.19 and 2.20. However, some rules need to be
followed for conversions.
26
Universality Of NAND Gate
NOT gate
AND gate
OR gate 27
Construct function of NOR gate using
NAND gate
A
X
B
Solution:
Self Assessment
A
X
28
Convert combination gates below using NAND
gates :
A
B
X
C
Solution:
Example
A
B
X
C
Logic Circuit Expression
𝑨𝑩 𝑨𝑩
A
B
Z = 𝑨𝑩 + (𝑨 + 𝑩)
C
(𝑨 + 𝑩)
30
𝑹+𝑺 𝑹+𝑺
R
S
W= 𝑹 + 𝑺 (𝑺 𝑻)
𝑺𝑻
31
Write the output X for combination
logic circuit below
A
B
Self Assessment X
C
32
Write the output X for combination
logic circuit below
𝑨+𝑩
Solution:
A
B
Self Assessment X = 𝑨 + 𝑩 .𝑪
33
Write the output X for combination
logic circuit below
A
Self Assessment B
X
C
34
Write the output X for combination
logic circuit below
𝑨
Solution:
𝑨+𝑩
A
Self Assessment B
X = 𝑪 + 𝑩 .𝑪
35
Write the output X for combination
logic circuit below
A
B
X
Self Assessment
C
36
Write the output X for combination
logic circuit below
𝑨𝑩
Solution:
A
B
X =𝑨𝑩+𝑩+𝑪
Self Assessment
C
𝑩+𝑪
𝑪
37
Expression Logic Circuit
𝑨+𝑩 𝒀 = 𝑨+ 𝑩 .𝑪
𝑨
𝒀 = 𝑨 + 𝑩 .𝑪
A
B
Y
C
𝑪
38
Draw logic circuit for following
expression using combinational logic
gates
Self Assessment
39
Draw logic circuit for following
expression using combinational logic
gates
Solution:
Self Assessment A
B
C
X
D
E
F
40
Draw logic circuit for following
expression using combinational logic
gates
Solution:
Self Assessment
A
B
C
D
Y
E 41
F
Draw logic circuit for following
expression using combinational logic
gates
Solution:
Self Assessment 𝑨𝑩 𝑨 𝑩 + 𝑪𝑫 + 𝑩𝑪
A
B Z
𝑩 C𝑫
C
D
𝑨 𝑩 + 𝑪𝑫 + 𝑩𝑪
42
𝑩𝑪
𝑪
Named of logic symbol below
Solution:
Example
43
• Simplification of Boolean expressions is very critical in order to reduce the gate count of a design,
hence reducing power consumption.
• Sometimes, with fewer gates, the circuit works faster and the production cost will be reduced as
well.
• There are many ways to simplify a Boolean expression
• The most popular methods are:
44
45
Algebraic Simplification Method
•The algebraic simplification method is one of the easiest methods to simplify Boolean expressions.
•In this method, Boolean theorems are used to simplify expressions.
•Example:
F(X,Y, Z) = XY + XY’ . (X’ + Y’)
= XY + XY’ X’ + XX’ Y’ (since X.X’ = 0)
= XY+ XYʹZʹ
•Try to simplify the expression of F(X, Y, Z) = (X’ + Y)(X + Y + Z)Z’
Boolean algebra is relatively easy to work with as
compared to ordinary algebra because of only two
values involved.
There are only three basic functions which have been
defined previously—NOT, OR and AND. The basic laws
of Boolean algebra are given as:
47
48
49
Using Boolean algebra techniques, simplify
expression below
𝑋 = 𝐴𝐵 + 𝐴 𝐵 + 𝐶 + 𝐵(𝐵 + 𝐶 )
Solution:
𝑋 = 𝐴𝐵 + 𝐴 𝐵 + 𝐶 + 𝐵(𝐵 + 𝐶 )
Example = 𝐴𝐵 + 𝐴𝐵 + 𝐴𝐶 + 𝐵𝐵 + 𝐵𝐶 )
= 𝐴𝐵 + 𝐴𝐶 + 𝐵𝐵 + 𝐵𝐶 )
= 𝐴𝐵 + 𝐴𝐶 + 𝐵 + 𝐵𝐶 )
= 𝐴𝐵 + 𝐴𝐶 + 𝐵 (1 + 𝐶 )
= 𝐴𝐵 + 𝐴𝐶 + 𝐵
= 𝐵 (𝐴 + 1) + 𝐴𝐶 50
= 𝐵 + 𝐴𝐶
Using Boolean algebra techniques, simplify
expression below
𝑌 = 𝐴𝐵 + 𝐶𝐷 + 𝐸𝐹
Solution:
𝑌 = 𝐴𝐵 + 𝐶𝐷 + 𝐸𝐹
Example
= 𝐴𝐵. 𝐶𝐷 . 𝐸𝐹
= (𝐴 + 𝐵) . (𝐶 + 𝐷) . (𝐸 + 𝐹 ቁ
= (𝐴 + 𝐵) . (𝐶 + 𝐷) . (𝐸 + 𝐹 ൯
51
Using Boolean algebra techniques, simplify
expression below
X= AB + A(B+C) + B(B+C)
= AB + AB + AC + BB + BC DISTRIBUTIVE LAWS
= AB + AC + BB + BC A+A=A
Example = AB + AC + B + BC A.A=A
= AB + AC + B (1+C) ASSOCIATIVE LAWS
= AB + AC + B (1) A+1=1
= B (A+1) + AC ASSOCIATIVE LAWS
= B (1) + AC A+1=1
= B + AC
52
Using Boolean algebra techniques, simplify
expression below
Y = AB + CD + EF A+B = A . B
Example DE MORGAN’S THEOREM
= AB . CD . EF
A.B = A + B
= (A+B) . (C+D) . (E+F) DE MORGAN’S THEOREM
53
Using Boolean algebra techniques,
simplify expression below
1. Y = AB + AB + AB
Self Assessment 2. (A+B) (A+C) = X
3. ABC + ABC + ABC + ABC = Y
4. ABCD + ABCD + ABCD + ABCD = Z
54
Using Boolean algebra techniques,
simplify expression below
Y = 𝐴 𝐵 + A B + (𝐴𝐵൯
Solution:
Self Assessment Y = AB + AB + AB
= AB + B(A+A)
= AB + B(1)
= A
55
Using Boolean algebra techniques,
simplify expression below
X= 𝐴+𝐵 +(A+C)
Solution:
X = (A+B) (A+C)
Self Assessment
= AA + AC + AB + BC
= A + AC + AB + BC
= A (1 + C + B) + BC
= A (1) + BC 56
= A + BC
Using Boolean algebra techniques,
simplify expression below
Y=𝐴𝐵𝐶+𝐴𝐵𝐶+𝐴𝐵𝐶+𝐴𝐵𝐶
Solution:
Y=𝐴𝐵𝐶+𝐴𝐵𝐶+𝐴𝐵𝐶+𝐴𝐵𝐶
Self Assessment
=𝐴𝐵𝐶+𝐴𝐵𝐶+𝐴𝐵𝐶
= 𝐴 𝐶( 𝐵 + 𝐵) + 𝐴 𝐵 𝐶
= 𝐴 𝐶( 1) + 𝐴 𝐵 𝐶
57
Using Boolean algebra techniques,
simplify expression below
Y = 𝐴 𝐵 𝐶𝐷 + 𝐴 𝐵 𝐶 𝐷 + 𝐴 𝐵 𝐶 𝐷 + 𝐴 𝐵 𝐶 𝐷
Solution:
= BD
59
Standard Form
SOP POS
(Sum of
Product) (Product of Sum)
60
STANDARD FORM
SOP
61
STANDARD FORM
POS
62
Boolean Expressions
SOP and POS
• The concept of SOP & POS similar as concept of minterms and maxterms
allows us to introduce very simple notations to express any Boolean
expression.
• The term ‘literal’ used describes a single variable within a term which may or
may not be complemented.
• A number of literals will appear in the product terms.
• Generally, a minterm (SOP) represents a sum term of literals for output 1,
while the maxterm (POS) represents a sum term of literals for output 0.
• Below is an example of how the minterm and maxterm can be generally
produced from a truth table of 2-variable expressions.
Input Output
A B SOP POS
0 0 A’.B’ A+B
0 1 A’.B A + B’
1 0 A.B’ A’ + B
1 1 A.B A’ + B’
2.3 Boolean Expressions
• Let’s produce a minterm and maxterm, which has 3 inputs and one output.
Input Output
A B C X SOP POS
0 0 0 0 A+B+C
0 0 1 0 A+B+C’
0 1 0 1 A.B’.C
0 1 1 1 A’.B.C
1 0 0 0 A’+B+C
1 0 1 0 A’+B+C’
1 1 0 0 A’+B’+C
1 1 1 1 A.B.C
2.3 Boolean Expressions
Input Output
A B C X SOP POS
0 0 0 0 A+B+C
0 0 1 0 A+B+C’
0 1 0 1 A’.B’.C
0 1 1 1 A’.B.C
1 0 0 0 A’+B+C
1 0 1 0 A’+B+C’
1 1 0 0 A’+B’+C
1 1 1 1 A.B.C
Example
66
Convert this Boolean equation into standard
form of POS
F = (A + B) · (A + B + C) · (B + C)
𝒕𝒆𝒓𝒎 𝟏 𝒕𝒆𝒓𝒎 𝟐 𝒕𝒆𝒓𝒎 𝟑
Example
67
Categorize the form of expression as state
below and develop truth table from the logic
expression.
Self Assessment
68
Categorize the form of expression as state
below and develop truth table from the logic
expression.
Self Assessment
Input Output
A B C P
SOP 0
0
0
0
1
0
0
1
1
0
0
1
0
1
0
1
0
1
0
0
1 0 1 1
1 1 0 0
69
1 1 1 1
Categorize the form of expression as state
below and develop truth table from the logic
expression.
Q=𝐴 𝐵 C +𝐴 𝐵𝐶+𝐴𝐵𝐶
Self Assessment
70
Categorize the form of expression as state
below and develop truth table from the logic
expression.
Q=𝐴 𝐵 C +𝐴 𝐵𝐶+𝐴𝐵𝐶
Self Assessment
Input Output
A B C Q
SOP
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1 71
Categorize the form of expression as state
below and develop truth table from the logic
expression.
R=(𝐴+ 𝐵+ 𝐶 )+(𝐴+𝐵+𝐶 )
Self Assessment
72
Categorize the form of expression as state
below and develop truth table from the logic
expression.
R=(𝐴+ 𝐵+ 𝐶 )+(𝐴+𝐵+𝐶 )
Self Assessment
Input Output
POS
A B C R
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1 73
1 1 1 1
Write logic expressions from the truth table in
the form of SOP and POS.
1 2 3
Input Output Input Output Input Output
A B C D X A B C D Y A B C D Z
0 0 0 0 1 0 0 0 0 0 0 0 0 0 1
0 0 0 1 0 0 0 0 1 0 0 0 0 1 1
0 0 1 0 1 0 0 1 0 0 0 0 1 0 1
0 0 1 1 0 0 0 1 1 0 0 0 1 1 0
Self Assessment 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0
0 1 0 1 1 0 1 0 1 1 0 1 0 1 1
0 1 1 0 0 0 1 1 0 0 0 1 1 0 1
0 1 1 1 1 0 1 1 1 1 0 1 1 1 1
1 0 0 0 1 1 0 0 0 1 1 0 0 0 0
1 0 0 1 0 1 0 0 1 0 1 0 0 1 0
1 0 1 0 1 1 0 1 0 1 1 0 1 0 0
1 0 1 1 0 1 0 1 1 1 1 0 1 1 0
1 1 0 0 0 1 1 0 0 0 1 1 0 0 1
1 1 0 1 0 1 1 0 1 0 1 1 0 1 1
1 1 1 0 0 1 1 1 0 0 1 1 1 0 1 74
1 1 1 1 0 1 1 1 1 0 1 1 1 1 1
Write logic expressions from the truth table in
the form of SOP and POS.
1 SOP
Input Output
A B C D X
X=𝐴 𝐵 𝐶 𝐷+𝐴 𝐵 𝐶 𝐷+𝐴 𝐵 𝐶 𝐷+𝐴𝐵𝐶𝐷
0 0 0 0 1
+𝐴 𝐵 𝐶 𝐷+𝐴 𝐵 𝐶 𝐷
0 0 0 1 0
0 0 1 0 1
0 0 1 1 0
Self Assessment 0 1 0 0 0
0 1 0 1 1
0 1 1 0 0
POS
0 1 1 1 1
1 0 0 0 1 X = ( 𝐴 + 𝐵 + 𝐶 + 𝐷 ) ( 𝐴 + 𝐵 + 𝐶 + 𝐷 ) ( 𝐴 + 𝐵 + 𝐶 + 𝐷)
1 0 0 1 0 ( A + 𝐵 + 𝐶 + 𝐷) ( 𝐴 + 𝐵 + 𝐶 + 𝐷 )+ ( 𝐴 + 𝐵 + 𝐶 + 𝐷 )
1 0 1 0 1
( 𝐴 + 𝐵 + 𝐶 + 𝐷) ( 𝐴 + 𝐵 + 𝐶 + 𝐷) ( 𝐴 + 𝐵 + 𝐶 + 𝐷 )
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
75
1 1 1 0 0
1 1 1 1 0
Write logic expressions from the truth table in
the form of SOP and POS.
2 SOP
Input Output
A B C D Y Y=𝐴 𝐵 𝐶 𝐷 +𝐴 𝐵 𝐶 𝐷+𝐴 𝐵𝐷𝐷+ 𝐴 𝐵𝐶𝐷 +𝐴 𝐵 𝐶 D
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
Self Assessment 0 1 0 0 0
0 1 0 1 1
0 1 1 0 0
POS
0 1 1 1 1
1 0 0 0 1
1
1
1
1
1
0
0
0
1
1
0
1
1
0
0
1
0
1
0
1
0
1
1
0
0
Y=
DIY 76
1 1 1 0 0
1 1 1 1 0
Write logic expressions from the truth table in
the form of SOP and POS.
3 SOP
Input Output
DIY
A B C D Z
0 0 0 0 1 Z=
0 0 0 1 1
0 0 1 0 1
0 0 1 1 0
Self Assessment 0 1 0 0 0
0 1 0 1 1
0 1 1 0 1
POS
0 1 1 1 1
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 1
1 1 0 1 1
77
1 1 1 0 1
1 1 1 1 1
78
Simplification of Boolean Expressions
80
81
82
The Karnaugh map uses the following rules for the simplification of
expressions by grouping together adjacent cells containing ones
Summmary:
1. No zeros allowed.
2. No diagonals.
3. Only power of 2 number of cells in each group.
4. Groups should be as large as possible.
5. Every one must be in at least one group.
6. Overlapping allowed.
7. Wrap around allowed.
8. Fewest number of groups possible.
83
The Karnaugh map uses the following rules for the simplification of expressions
by grouping together adjacent cells containing ones
84
•Groups must contain 1, 2, 4, 8, or in general 2n cells.
That is if n = 1, a group will contain two 1's since 21 = 2.
If n = 2, a group will contain four 1's since 22 = 4.
85
•Each group should be as large as possible.
86
•Groups may overlap.
•Groups may wrap around the table. The leftmost cell in a row may be grouped with
the rightmost cell and the top cell in a column may be grouped with the bottom cell.
87
•There should be as few groups as possible, as long as this does not contradict any of
the previous rules.
88
Consider the following map. The function
plotted is : Z = f(A,B) = A + AB
Example
90
2. Example of Looping group of four
Looping a quad of adjacent 1s eliminate the two
variables that appear in both complemented and
uncomplemented form
91
3. Example of Looping group of eight
Looping an octet of adjacent 1s eliminates the three
variables that appear in the both complemented and
uncomplemented form
92
• Examples
Simplify this Boolean equation by using K-maps
F = X Y Z+ X Y Z + X Y Z
93
• Examples
Find out the equation based on the given K-Map
94
• Solution
95
FASILITI DI JKE
Exercise
Exercise
98
Exercise
99
Exercise
100
Exercise
101
Summary
• The basic Boolean algebra operations are OR, NOT and AND, which come together with the logic
gates.
• Boolean algebra is a mathematical tool to analyse and design digital circuits and systems.
• Boolean theorems and laws can be used to simplify the Boolean expressions, which can lead to a
simpler logic circuit.
• K-map is the most used method to simplify any Boolean expression.
Digital Electronics