Unit-1 - First Part
Unit-1 - First Part
DIGITAL ELECTRONIC
PRINCIPLES
Unit-1
1
Index
Unit-I: Binary Codes, Digital Arithmetic and Simplification of Boolean Functions
CLO1: Simplify Boolean expressions; carry out arithmetic operations with binary
numbers; apply parity method for error detection and correction.
Decimal 10 0, 1, … 9
Binary 2 0, 1
Octal 8 0, 1, … 7
Hexa-decimal 16 0, 1, … 9, A, B, … F
3
Number System Quantities
Hexa- Hexa-
Decimal Binary Octal decimal Decimal Binary Octal decimal
0 0 0 0 16 10000 20 10
1 1 1 1 17 10001 21 11
2 10 2 2
18 10010 22 12
3 11 3 3
4 100 4 4 19 10011 23 13
5 101 5 5
20 10100 24 14
6 110 6 6
21 10101 25 15
7 111 7 7
8 1000 10 8 22 10110 26 16
9 1001 11 9 23 10111 27 17
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
4
Number System Conversion
Decimal Octal
Binary Hexadecimal
5
Logic Gates
6
Gates
BASIC
AND
OR
NOT
UNIVERSAL
NAND
NOR
DERIVED
EX-OR
EX-NOR
7
• AND gate
8
OR gate
9
NOT gate (or inverter)
10
A logic buffer gate
11
NAND gate
12
NOR gate
13
Exclusive OR gate (Ex-OR)
14
Exclusive NOR gate (Ex-NOR)
15
LOGIC GATES
16
Minimization of Boolean Functions: Algebraic simplification
17
Boolean Operations and Expressions
Addition Multiplication
0+0=0 0*0=0
0+1=1 0*1=0
1+0=1 1*0=0
1+1=1 1*1 =1
18
Laws and Rules of Boolean Algebra
19
Laws Boolean Algebra
• Commutative Laws
• Associative Laws
• Distributive Law
20
Laws of Boolean Algebra
Commutative Law of Addition:
A+B=B+A
21
Laws of Boolean Algebra
22
Laws of Boolean Algebra
23
Laws of Boolean Algebra
24
Laws of Boolean Algebra
Distributive Law:
A(B + C) = AB + AC
Rules of Boolean Algebra
26
Rules of Boolean Algebra
Rule 1
OR Truth Table
27
Rules of Boolean Algebra
Rule 2
OR Truth Table
28
Rules of Boolean Algebra
Rule 3
30
Rules of Boolean Algebra
Rule 5
OR Truth Table
31
Rules of Boolean Algebra
Rule 6
OR Truth Table
32
Rules of Boolean Algebra
Rule 7
33
Rules of Boolean Algebra
Rule 8
34
Rules of Boolean Algebra
Rule 9
35
Rules of Boolean Algebra
Rule 10: A + AB = A
36
Rules of Boolean Algebra
Rule 11:
39
DeMorgan’s Theorems
• Theorem 1
• Theorem 2
Remember:
“Break the bar,
change the sign”
40
DE MORGANS
41
Standard Forms of Boolean
Expressions
42
Standard Forms of Boolean Expressions
43
Converting between Circuits and Equations
x+y
(x+y)y
Answer: (x+y)y
44
Recollect the Boolean Rules
COMMUTATIVE
A+B=B+A A.B=B.A
ASSOCIATIVE PROPERTY
A+(B+C)=(A+B)+C
A.(B.C)=(A.B).C
DISTRIBUTIVE
A+BC= (A+B)(A+C)
A.(B+C)=(A.C)+(A.B)
45
Solve
46
47
(vi)
48
IMPLEMENT INVERTER USING NAND GATE
A
OUT
B
A B OUT
0 0 1
0 1 1
1 0 1
1 1 0
49
50
Example
51
Example
52
Example
53
Example
54
Karnaugh Maps
(K – MAPS)
55
K-Map
• Karnaugh maps (K-maps) are graphical representations of Boolean
functions.
• One map cell corresponds to a row in the truth table.
• Also, one map cell corresponds to a minterm or a maxterm in the Boolean
expression
• Multiple-cell areas of the map correspond to standard terms.
• A K-map provides a systematic method for simplifying Boolean expressions and,
if properly used, will produce the simplest SOP or POS expression possible,
known as the minimum expression.
• It’s similar to truth table; instead of being organized (i/p and o/p) into columns
and rows, the K-map is an array of cells in which each cell represents a binary
value of the input variables.
• The cells are arranged in a way so that simplification of a given expression is
simply a matter of properly grouping the cells.
• K-maps can be used for expressions with 2, 3, 4, and 5 variables. 56
Grouping
Rules of grouping -
diagonal 1’s
can not be
grouped
Minimum Groups
should be formed
57
Elements in a group
should be 2n
58
59
Cell Adjacency
CD
00 01 11 10
AB
00
01
11
10
60
Two-Variable Map
61
Two-Variable Map
x2 x1
x 0 x
0 1 0 2
m0 m
1
OR m0 M
2
2 3 1 3
m2 m 1 m1 m
3 3
63
3 Variable K-Map
___ _
ABC = 000 = 0 ABC = 010 = 2
_ _
ABC = 111 = 7
ABC = 101 = 5
Using this fill the k-map
CD
00 01 11 10
AB
00 ABCD ABCD ABCD ABCD
67
Solve the given k-
map
• Step I -grouping
• Step II -output of
each group
• Step III -final output
⮚Here answer is ,
_ _ _
Y=CD+BC+BD
68
Three-Variable K-Maps
BC BC BC BC
A 00 A 00 A 00 01 A 00
01 01 11 10 01
0 1 0 11
0 0 0 0 0 11
0 0 0 1 1 0 0 0 1 1 11
1 1
10 10 10
1 1 0 0 0 1 1 1 0 0 1 1 1 0 0 1 0 0 0 0
BC BC BC BC
A 00 A 00 A 00 A 00
01 01 01 01
0 0 1 11
1 0 0 0 0 11
0 0 0 1 0 11
0 1 0 1 0 11
0 1
10 10 10 10
1 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1
69
Four-Variable K-
Maps
CD CD CD CD
00 00 00 00
AB AB AB AB
00 1 0 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0
01 01 01 01
01 0 0 0 0 01 0 1 0 0 01 0 0 0 0 01 1 0 0 1
11 10 11 10 11 10 11 10
11 0 0 0 0 11 0 1 0 0 11 0 1 1 0 11 0 0 0 0
10 1 0 0 0 10 0 0 0 0 10 0 0 0 0 10 0 0 0 0
CD CD CD CD
00 00 00 00
AB AB AB AB
00 0 0 1 1 00 0 0 0 0 00 0 0 1 1 00 1 0 0 1
01 01 01 01
01 0 0 1 1 01 1 0 0 1 01 0 0 0 0 01 0 0 0 0
11 10 11 10 11 10 11
11 0 0 0 0 11 1 0 0 1 11 0 0 0 0 11 0 0 0 0
10
10 0 0 0 0 10 0 0 0 0 10 0 0 1 1 10 1 0 0 1
70
Four-Variable K-
Maps
CD CD CD CD
00 00 00 00
AB AB AB AB
00 0
01 0 0 0 00 0
01 0 1 0 00 1
01 0 1 0 00 0
01 1 0 1
01 1 1 1 1 01 0 0 1 0 01 0 1 0 1 01 1 0 1 0
11 10 11 10 11 10 11 10
11 0 0 0 0 11 0 0 1 0 11 1 0 1 0 11 0 1 0 1
10 0 0 0 0 10 0 0 1 0 10 0 1 0 1 10 1 0 1 0
f = ∑ (0, 3, 5, 6, f = ∑ (1, 2, 4,
f = ∑ (4, 5, 6, 7) = A ∙ B f = ∑(3, 7,11,15) = C∙ D
9,10,12,15) 7,8,11,13,14)
f=A⊗B⊗C⊗D f=A⊕B⊕C⊕D
CD CD CD CD
00 00 00 00
AB AB AB AB
00 0
01 1 1 0 00 1
01 0 0 1 00 0
01 0 0 0 00 1
01 1 1 1
01 0 1 1 0 01 1 0 0 1 01 1 1 1 1 01 0 0 0 0
11 10 11 10 11 10 11 10
11 0 1 1 0 11 1 0 0 1 11 1 1 1 1 11 0 0 0 0
10 0 1 1 0 10 1 0 0 1 10 0 0 0 0 10 1 1 1 1
AB 0
0 0
AB
X
There was no advantage in treating this
don’t care condition as a (1), thus it
was treated as a (0) and not grouped.
73
Example
Solution:
A B C D Y
0 0 0 0 X
0 0 0 1 0
0 0 1 0 1 CD
0 0 1 1 X
AC
AB X 0
0 1 0 0 0
X 1
CD
0 1 0 1 X
0 1 1 0 X AB
0 X 1 X
0 1 1 1 1
1 0 0 0 1 AB
X 0 0 0 AB
1 0 0 1 1
1 0 1 0 1 AB
1 1 X 1
1 0 1 1 X
1 1 0 0 X
1 1 0 1 0 Y =A
1 1 1 0 0
C+AB
1 1 1 1 0
74
IMPLEMENTATION OF K-MAPS with don’t care
▪ In some logic circuits, the output responses for some input conditions
are don’t care whether they are 1 or 0.
-
▪ In K-maps, don’t-care conditions are represented
by d’s in the corresponding cells.
1 d d 1
x d 1
yz’
x
F
y
z 75
K-Map SOP Minimization
76
Mapping a Standard SOP Expression
variable map.
• For an SOP expression C ABC
in standard form: 0 1
AB
– A 1 is placed on the K-map for
each product term in the 00 ABC ABC
expression.
– Each 1 is placed in a cell 01 ABC ABC
corresponding to the value of
a product term. 11 ABC ABC
10 ABC ABC
77
– Example: for the product term , a 1 goes in the 101 cell on a 3-
Mapping a Standard SOP Expression
The
expression: C
ABC + ABC + ABC + ABC 0 1
AB
000 001 110 100
00
1 1
01
Practice:
ABC + ABC + ABC + ABC
ABC + ABC + ABC 11 1
ABCD + ABCD + ABC D + ABCD+ ABC D + ABCD + ABCD
10 1
78
Mapping Directly from a
Truth
I/P
A B C
Table
O/P
X C
0 1
0 0 0 1 AB
0 0 1 0
00 1
0 1 0 0
0 1 1 0 01
1 0 0 1
1 0 1 0 11 1
1
1 1 0 1
10 1
1 1 1 1
79
IMPLEMENTATION OF K-MAPS Sum- of- Products
Form(SOP)
❑Logic function represented by a Karnaugh map
can be implemented in the form of not-AND-OR
x’
y’ x
z’
x’ ⇒ z
y F F
z’ y
x z
y
z’
not
AN 80
D OR
Determining the Minimum SOP Expression from the
Map
CD
00 01 B + AC + ACD
AB
11
00 101 1 AC
01 1 1 1 1
B
11 1 1 1 1
10 1 ACD
81
K-Map POS Minimization
• The approaches are much the same (as SOP) except that with
POS expression, 0s representing the standard sum terms are
placed on the K-map instead of 1s.
82
Mapping a Standard POS Expression
The
expression: C
0 1
( A + B + C)( A + B + C)( A + B + C)( A + B +
C) AB
000 010 110 101
00
0
01
0
11 0
10
0
83
IMPLEMENTATIONOFK-MAPS Product-of- Sums Form(POS)
▪ Logic function represented by a Karnaugh map can be implemented in the form
of I-OR-AND
▪ If we implement a Karnaugh map using 0-cells, the complement of F, i.e., F’, can
be obtained. Thus, by complementing F’ using DeMorgan’s theorem F can be
obtained
y
F(x,y,z) = F’ = xy’ +
1 0 z z
(0,2,6) 0
x 0 0 0 1 F = (xy’)z’
x z 1 = (x’ + y)z’
y’
x
y
F
z
I AND
84
OR
K-map Simplification of POS
Expression
( A + B + C)( A + B + C )( A + B + C)( A + B + C )( A + B
+ C)
C
0 1
AB A
00 0 0 A(B + C)
01 AB
0 0 + AC
AC
0 1
1 1 AB
11 85
B+C
10
Determining the Minimum SOP Expression from the
Map
C C
AB 0 1 0 1
AB
00 1 00 1 1
01 1 01 1
11 1 1 11 1
10 10 1 1
AB + BC + ABC B + AC + AC
86
Design of combinational digital
circuits
▪ Steps to design a combinational digital circuit:
01
2 010 0 ∑
X = (3, 5, 6,
3 0 1 7)
X
BC
1 00
A
0 0 0 1 00
1 1
4 1 0 1 0 1 1 11
1 10
0
0 X = AC + AB +
A B C 88
5 1 1 BC
1
6 1 1
Example: Design a 4-input (A,B,C,D) digital circuit that will give at its output (X) a logic 1 only if
the binary number formed at the input is between 2 and 9 (including).
Inputs Output
ABCD X
0 0 0 0
X=
∑(2,3,4,5,6,7,8,9)
0
X
0
CD
1 0 0 0 00 01 11 10
AB
0 00 0 0 1 1 Same
1
01 1 1 1 1
2 0 0 1
1 11 0 0 0 0
0 10 1 1 0 0
3 0 0 1
1
1
X = AC + AB + AB
4 0 1 1
C
0
0 A B C D X
5 0 1 1
0 89
1
6 0 1 1
1
0
7 0 1 1
Quine McClusky method
(Tabular Method)
90
EXAMPLE:
Simplify the Boolean Expression using Quine McClusky
method (Tabular Method)
F ( A, B, C, D) =
∑m(0,1,3,7,8,9,11,15)
91
Convert Decimal Numbers To Binary
Numbers
Table 1
0 0000 m0
1 0001 m1
3 0011 m3
7 0111 m7
8 1000 m8
9 1001 m9
92
11 1011 m11
15 1111 m15
STEP: 2
STEP: 1 Compare each minterm in group ‘n’ with each
Arrange all Minterms according to number of 1 minterm in group (n+1) and identify the match
as shown in table 2 pairs. A match pair is a pair of minterms which
differ only in one variable. For the variables differ
place (-) dash, as shown in Table 3
TABLE : 3
TABLE : 2
Group Minterm No. IN BINARY
Minterm IN BINARY
Group A B C D
No.
A B C D (0,1) 0 0 0 -
0
0 0 0 0 0 0 (0,8) - 0 0 0
1 0 0 0 1 (1,3) 0 0 - 1
1 1 (1,9) - 0 0 1
8 1 0 0 0
(8,9) 1 0 0 -
3 0 0 1 1
2 (3,7) 0 - 1 1
9 1 0 0 1
2 (3,11) - 0 1 1
7 0 1 1 1
3 (9,11) 1 0 - 1
11 1 0 1 1 (7,15) - 1 1 93 1
4 15 1 1 1 1 3
(11,15) 1 - 1 1
STEP 3:
Now compare all the pairs of mintermsof table 3 with those in the
adjacent groups. As shown in table 4
TABLE : 2 TABLE : 3 TABLE : 4
IN BINARY
Gro Minter IN BINARY Group Minterm IN BINARY Group
up m No. Minter m No.
No. A B C D A B C D A B C D
0 0 0 0 0 0 (0,1) 0 0 0 -
0 0,1,8,9 - 0 0 -
1 0 0 0 1 (0,8) - 0 0 0 1
1 (1,3) 0 0 - 1
8 1 0 0 0 0,8,1,9 - 0 0 -
1 (1,9) - 0 0 1
3 0 0 1 1
2 (8,9) 1 0 0 - 1,3,9,11 - 0 - 1
9 1 0 0 1 2
(3,7) 0 - 1 1
7 0 1 1 1 2 (3,11) - 0 1 1
3 1,9,3,11 - 0 - 1
11 1 0 1 1 (9,11) 1 0 - 1
4 15 1 1 1 1 (7,15) - 1 1 1 3,7,11,15 - - 1 1
3
(11,15) 1 - 1 1 3
3,11,7,15 - - 1 1
94
TABLE: 5
GROUP MINTERMS BINARY REPRESENTATION
A B C D
1 m0-m1-m8-m9 - 0 0 -
m0-m8-m1-m9 - 0 0 - BC
2 m1-m3-m9-m11 - 0 - 1
m1-m9-m3-m11 - 0 - 1 B 'D
3 m3-m7-m11-m15 - - 1 1
m3-m11-m7-m15 - - 1 1
CD
STEP: 4
Repeat the procedure for grouping. If can group the Quads of minterms in the adjacent groups of
table 4 to obtain groups of eight minterms. There are no such matching.
Now prepare Prime Implicant Table as shown in Table 5
95
TABLE: 6
Required Output
Y= B C + CD
96