3. Digital Electronics
Digital Logic is concerned with the
interconnection among digital components and
modules and is a term used to represent the
design and analysis of digital systems.
4. Digital systems
Digital systems are used in communication,
business transactions, traffic control, spacecraft
guidance, medical treatment, weather monitoring,
the Internet, and many other commercial,
industrial, and scientific enterprises
5. Digital Computers and Digital Systems
Digital computers have made possible many
scientific, industrial and commercial advances
The most striking property of a digital computer is its
generality
It can follow a sequence of instructions, called a program,
that operates on given data
Digital system manipulates discrete elements of
information
Discrete elements of information are represented in
digital system by signals
6. Digital Computers and Digital Systems
The signals in all present day electronic digital
systems have only two discrete values and are said
to be binary.
Discrete quantities of information emerge either from
the nature of the process or may be purposely
quantized from a continuous process
Any set that is restricted to a finite number of
elements contains discrete information.
7. Analog vs digital
An analog quantity is one having continuous values.
A digital quantity is one having a discrete set of values
8.
9.
10. Information Represented
10
The signals in most present‐day electronic digital
systems use just two discrete values and are therefore
said to be binary.
A binary digit is called a bit
Information in computers is represented by groups of bits
called binary codes.
(e.g., the number 7 is represented by 0111).
A digital system is a system that manipulates discrete
elements of information represented internally in binary
form.
Groups of bits can specify
the instructions to be executed and
the data to be processed
Continuous data is converted into discrete data in order
to be presented to the computer
11. Structure - Top Level
Computer
Main
Memory
Input
Output
Systems
Interconnection
Peripherals
Communication
lines
Central
Processing
Unit
Computer
11
12. Structure - The CPU
Computer Arithmetic
and
Login Unit
Control
Unit
Internal CPU
Interconnection
Registers
CPU
I/O
Memory
System
Bus
CPU
12
13. Digital System
• A digital system is an interconnection of digital modules.
• To understand the operation of each digital module, it is
necessary to have a basic knowledge of digital circuits
and their logical function.
14. Course Outline
Chapter 1:
Binary systems for information representation in digital
components
Binary Numbers
Binary Codes
Binary Logic
Chapter 2:
Boolean algebra
Boolean gates
Boolean functions
15. Course Outline
Chapter 3:
Map and tabulation methods for simplifying Boolean
function
Chapter 4:
Design and analysis of Combinational Circuit
Adders
Code converters
Multilevel NAND and NOR combinational circuit
16. Course Outline
Chapter 5:
Parallel adders
Decoders
Multiplexers
Read Only Memory (ROM)
Programmable Logic Array (PLA)
Chapter 6:
Design and Analysis of clocked sequential Circuit
Flip-flops
State Diagram, State Table and State Equation
20. Decimal Number System
Base (also called radix) = 10
10 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }
Digit Position
Integer & fraction
Digit Weight
Weight = (Base) Position
Magnitude
Sum of “Digit x Weight”
Formal Notation
1 0 -1
2 -2
5 1 2 7 4
10 1 0.1
100 0.01
500 10 2 0.7 0.04
d2*B2
+d1*B1
+d0*B0
+d-1*B-1
+d-2*B-2
(512.74)10
20
21. Decimal Number System
• A decimal number such as 7,392 represents a
quantity equal to 7 thousands, plus 3 hundreds,
plus 9 tens, plus 2 units.
• The thousands, hundreds, etc., are powers of 10
implied by the position of the coefficients (symbols)
in the number.
7 × 103 + 3 × 102 + 9 × 101 + 2 × 100
22. Binary Number System
• The binary system is a different number system.
• The coefficients of the binary number system have
only two possible values: 0 and 1.
• Each coefficient is multiplied by a power of the
radix, e.g., , and the results are added to obtain
the decimal equivalent of the number
𝑎𝑗
2𝑗
23. Binary Number System
Base = 2
2 digits { 0, 1 }, called binary digits or “bits”
Weights
Weight = (Base) Position
Magnitude
Sum of “Bit x Weight”
Formal Notation
Groups of bits 4 bits = Nibble
8 bits = Byte
1 0 -1
2 -2
2 1 1/2
4 1/4
1 0 1 0 1
1 *22
+0 *21
+1 *20
+0 *2-1
+1 *2-2
=(5.25)10
(101.01)2
23
24. Binary Number System
The decimal equivalent of the binary number 11010.11
is 26.75, as shown from the multiplication of the
coefficients by powers of 2:
1 × 24 + 1 × 23 + 0 × 22 + 1 × 21 + 0 × 20 + 1 × 2−1 + 1 × 2−2 = 26.75
There are many different number systems.
In general, a number expressed in a base‐r system
has coefficients multiplied by powers of r:
44. signed /unsigned numbers
• Positive integers (including zero) can be represented as unsigned
numbers.
• For negative integers, we need a notation.
• In ordinary arithmetic, a negative number is indicated by a minus sign
and a positive number by a plus sign.
• Because of hardware limitations, computers must represent everything
with binary digits.
• It is customary to represent the sign with a bit placed in the leftmost
position of the number.
• The convention is to make the sign bit 0 for positive and 1 for negative.
45. signed /unsigned numbers
• The user determines whether the number is signed or unsigned.
• If the binary number is signed, then the leftmost bit represents the sign
and the rest of the bits represent the number.
• If the binary number is assumed to be unsigned, then the leftmost bit is
the most significant bit of the number.
• the string of bits 01001 can be considered as 9 (unsigned binary) or as
+9 (signed binary) because the leftmost bit is 0.
• The string of bits 11001 represents the binary equivalent of 25 when
considered as an unsigned number and the binary equivalent of -9 when
considered as a signed number.
• This is because the 1 that is in the leftmost position designates a
negative and the other four bits represent binary 9.
46. signed /unsigned numbers
• signed‐magnitude convention
• Signed complement system
• In this system, a negative number is indicated by its complement.
• the 2’s complement is the most common.
signed‐magnitude representation: 10001001
signed‐1’s‐complement representation: 11110110
signed‐2’s‐complement representation: 11110111
47. signed /unsigned numbers
• In signed‐magnitude, -9 is obtained from +9 by changing only the sign bit
in the leftmost position from 0 to 1.
• In signed‐1’s-complement, -9 is obtained by complementing all the
• bits of +9, including the sign bit.
• The signed‐2’s‐complement representation of -9 is obtained by taking the
2’s complement of the positive number, including the sign bit.
(+9)
00001001
signed‐magnitude representation: 10001001
signed‐1’s‐complement representation: 11110110
signed‐2’s‐complement representation: 11110111
48.
49. Arithmetic Addition
• The addition of two numbers in the signed‐magnitude system follows the
rules of ordinary arithmetic.
• If the signs are the same, we add the two magnitudes and give the sum
the common sign.
• If the signs are different, we subtract the smaller magnitude from the
larger and give the difference the sign of the larger magnitude.
• For example, (+25) + (-37) = -(37 - 25) = -12 is done by subtracting the
smaller magnitude, 25, from the larger magnitude, 37, and appending the
sign of 37 to the result.
50. Arithmetic Addition
The addition of two signed binary numbers with negative numbers
represented in signed‐ 2’s‐complement form is obtained from the addition of
the two numbers, including their sign bits. A carry out of the sign‐bit position
is discarded.
Note that negative numbers must be initially in 2’s‐complement form and that if
the sum obtained after the addition is negative, it is in 2’s‐complement form.
51. Arithmetic Addition
In each of the four cases, the
operation performed is addition
with the sign bit included. Any
carry out of the sign‐bit position
is discarded, and negative
results are automatically in
2’s‐complement form.
52. Arithmetic Subtraction
Subtraction of two signed binary numbers when negative numbers are in
2’s‐complement form is simple and can be stated as follows:
Take the 2’s complement of the subtrahend (including the sign bit) and add
it to the minuend (including the sign bit). A carry out of the sign‐bit position is
discarded.
It is worth noting that binary numbers in the signed‐complement system are added and subtracted by
the same basic addition and subtraction rules as unsigned numbers.
53. Addition Rules
0 + 0 = 00 ( 0 with a 0 carry )
0 + 1 = 01 ( 1 with a 0 carry )
1 + 0 = 01 ( 1 with a 0 carry )
1 + 1 = 10 ( 0 with a 1 carry )
54. Addition Rules w/Carries
0+0+0 = 00 (0 WITH 0 CARRY)
0+0+1 = 01 (1 WITH 0 CARRY)
0+1+1 = 10 (0 WITH 1 CARRY)
1+1+1 = 11 (1 WITH 1 CARRY)
57. Complements
Complements are used in digital computers to simplify the subtraction
operation and for logical manipulation.
• There are two types of complements for each base‐r system:
• the radix complement (r’s complement)
• the diminished radix complement (r - 1)’s complement
58. r’s Complement
•Given a number N in base r having n digits,
•the r’s complement of N is defined as
rn - N for N!= 0 and 0 for N = 0
•For decimal numbers the
base or r = 10,
•so the 10’s complement of N
is 10n-N.
•100000……. - N
Digit
n
Digit
n-1
Next
digit
Next
digit
First
digit
0 0 0 0 0
-
1
59. 10’s complement Examples (DECIMAL)
Find the 10’s complement of
546700 and 12389
The 10’s complement of 546700
is 1000000 - 546700= 453300
and the 10’s complement of
12389 is
100000 - 12389 = 87611.
5 4 6 7 0
- 0
0 0 0 0 0 0
4 5 3 3 0 0
1 2 3 8
- 9
1 0 0 0 0 0
8 7 6 1 1
1
60. 10’s complement Examples (fractional part)
rn - N
100 - N
Find 10s complement of 0.327
1-0.327 = 0.673
61. For binary numbers, r = 2,
r’s complement is the 2’s complement.
The 2’s complement of N is 2n - N.
2’s complement (BINARY)
Digit
n
Digit
n-1
Next
digit
Next
digit
First
digit
0 0 0 0 0
-
1
rn - N
62. 2’s complement Example (integer part)
The 2’s complement of
1011001 is 0100111
The 2’s complement of
0001111 is 1110001
0 1 1 0 0
- 1
0 0 0 0 0 0
1 0 0 1 1 1
0 0 1 1 1
- 1
1 1 0 0 0 1
1
0
0
0
1
1
0 0 0 0 0 0
0
1
2n - N
64. 2’s complement Example (fractional part)
The 2’s complement of (0.0110)2
20 - N
0.1010
65. Complements of numbers
(r-1 )’s Complement
•Given a number N in base r having n digits,
•the (r- 1)’s complement of N is defined as
(rn – r -m - N ) (rn – 1) - N
where n = num. of digits in integer part
and m = num. of digit in fractional part
•For decimal numbers the r = 10
and r- 1= 9,
•so the 9’s complement of N
(integer part only ) is (10n-1)-N
•99999……. - N
Digit
n
Digit
n-1
Next
digit
Next
digit
First
digit
9 9 9 9 9
-
66. Find the 9’s complement of 546700 and 12389
The 9’s complement of 546700 is
999999 - 546700= 453299
and the 9’s complement of 12389 is
99999- 12389 = 87610.
9’s complement Examples (DECIMAL)
5 4 6 7 0
- 0
9 9 9 9 9 9
4 5 3 2 9 9
1 2 3 8
- 9
9 9 9 9 9
8 7 6 1 0
67. 9’s complement Examples (DECIMAL)
9s complement of 0.3267
(rn – r -m - N )
where n = num. of digits in integer part
and m = num. of digit in fractional part
68. 9’s complement Examples (DECIMAL)
9s complement of 0.3267
(rn – r -m - N )
where n = num. of digits in integer part
and m = num. of digit in fractional part
0.673
2
69. l’s complement (BINARY)
For binary numbers, r = 2 and r - 1 = 1,
r-1’s complement is the l’s complement.
The l’s complement of N is (2n - 1) - N.
Digit
n
Digit
n-1
Next
digit
Next
digit
First
digit
1 1 1 1 1
Bit n-1 Bit n-2 ……. Bit 1 Bit 0
-
70. l’s complement (BINARY)
Find r-1 complement for binary number N with four binary digits.
r-1 complement for binary means 2-1 complement or 1’s complement.
n = 4, we have 24 = (10000)2 and 24 - 1 = (1111)2.
The l’s complement of N is (24 - 1) - N. = (1111) - N
(rn – r -m - N )
where n = num. of digits in integer part
and m = num. of digit in fractional part
72. Fast Methods for 2’s Complement
Method 1:
The 2’s complement of binary number is obtained by adding 1 to the
l’s complement value.
Example:
1’s complement of 101100 is 010011 (invert the 0’s and 1’s)
2’s complement of 101100 is 010011 + 1 = 010100
73. Fast Methods for 2’s Complement
Method 2:
The 2’s complement can be formed by leaving all least significant 0’s
and the first 1 unchanged, and then replacing l’s by 0’s and 0’s by l’s
in all other higher significant bits.
Example:
The 2’s complement of 1101100 is
0010100
Leave the two low-order 0’s and the first 1 unchanged, and then
replacing 1’s by 0’s and 0’s by 1’s in the four most significant bits.
74. Examples
Finding the 2’s complement of (01100101)2
Method 1 – Simply complement each bit and then
add 1 to the result.
(01100101)2
[N] = 2’s complement = 1’s complement (10011010)2 +1
=(10011011)2
Method 2 – Starting with the least significant bit,
copy all the bits up to and including the first 1 bit
and then complement the remaining bits.
N = 0 1 1 0 0 1 0 1
[N] = 1 0 0 1 1 0 1 1
75. Subtraction of Unsigned Numbers
using r’s complement
Subtract N from M : M – N
1. Add M to the r’s complement of N
2. Inspect the result obtained in step 1 for an end
carry
a. If an end carry occurs, discard it.
b. If an end carry does not occur, take the r’s
complement of the sum obtained in step 1 and
place a negative sign.
76. Example 1 (Decimal unsigned numbers),
perform the subtraction 72532 - 13250 = 59282.
M > N : “Case 1” “Do not take complement of sum
and discard carry”
The 10’s complement of 13250 is 86750.
Therefore:
M = 72532
10’s complement of N =+86750
Sum= 159282
Discard end carry 105= - 100000
Answer = 59282 no complement
77. Example 2 (Decimal unsigned numbers),
Now consider an example with M <N.
The subtraction 13250 - 72532 produces negative 59282. Using
the procedure with complements, we have
M = 13250
10’s complement of N = +27468
Sum = 40718
Take 10’s complement of Sum = 100000
-40718
The number is : 59282
Place negative sign in front of the number: -59282
79. Subtraction of Unsigned Numbers
using (r -1)’s complement
Subtract N from M : M – N
1. Add M to the (r-1)’s complement of N
2. Inspect the result obtained in step 1 for an end
carry
a. If an end carry occurs, add 1 to the least
significant digit(end-around carry)
b. If an end carry does not occur, take the (r-1)’s
complement of the sum obtained in step 1 and
place a negative sign.
82. Comparison
1’s complement
1. Easier to implement
2. Needs two additions
for subtraction
procedure
2’s complement
1. Harder to implement
2. Needs one additions
for subtraction
procedure
84. Overview
Chapter 2 - Part 1
84
Part 1 – Gate Circuits and Boolean Equations
Binary Logic and Gates
Boolean Algebra
Standard Forms
Part 2 – Circuit Optimization
Two-Level Optimization
Map Manipulation
Practical Optimization (Espresso)
Multi-Level Circuit Optimization
Part 3 – Additional Gates and Circuits
Other Gate Types
Exclusive-OR Operator and Gates
High-Impedance Outputs
85. Binary Logic and Gates
Chapter 2 - Part 1
85
Binary variables take on one of two values.
Logical operators operate on binary values
and binary variables.
Basic logical operators are the logic
functions AND, OR and NOT.
Logic gates implement logic functions.
Boolean Algebra: a useful mathematical
system for specifying and transforming
logic functions.
We study Boolean algebra as a foundation
for designing and analyzing digital
systems!
86. Binary Variables
Chapter 2 - Part 1
86
Recall that the two binary values have
different names:
True/False
On/Off
Yes/No
1/0
We use 1 and 0 to denote the two values.
Variable identifier examples:
A, B, y, z, or X1 for now
RESET, START_IT, or ADD1 later
87. Logical Operations
Chapter 2 - Part 1
87
The three basic logical operations are:
AND
OR
NOT
AND is denoted by a dot (·).
OR is denoted by a plus (+).
NOT is denoted by an overbar ( ¯ ), a single
quote mark (') after, or (~) before the variable.
88. Notation Examples
Chapter 2 - Part 1
88
Examples:
is read “Y is equal to A AND B.”
is read “z is equal to x OR y.”
is read “X is equal to NOT A.”
Note: The statement:
1 + 1 = 2 (read “one plus one equals two”)
is not the same as
1 + 1 = 1 (read “1 or 1 equals 1”).
= B
A
Y
y
x
z +
=
A
X =
89. Operator Definitions
Chapter 2 - Part 1
89
Operations are defined on the
values "0" and "1" for each
operator:
AND
0 · 0 = 0
0 · 1 = 0
1 · 0 = 0
1 · 1 = 1
OR
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 1
NOT
1
0 =
0
1=
90. Logic Function Implementation
Chapter 2 - Part 1
90
Using Switches
For inputs:
logic 1 is switch closed
logic 0 is switch open
For outputs:
logic 1 is light on
logic 0 is light off.
Switches in series => AND
Switches in parallel => OR
92. Logic Gate Symbols and Behavior
Chapter 2 - Part 1
92
Logic gates have special symbols:
And waveform behavior in time as follows:
(b) Timing diagram
X 0 0 1 1
Y 0 1 0 1
X · Y
(AND) 0 0 0 1
X 1 Y
(OR) 0 1 1 1
(NOT) X 1 1 0 0
(a) Graphic symbols
OR gate
X
Y
Z = X + Y
X
Y
Z = X · Y
AND gate
X Z = X
NOT gate or
inverter
93. Gate Delay
Chapter 2 - Part 1
93
In actual physical gates, if one or more input
changes causes the output to change, the output
change does not occur instantaneously.
The delay between an input change(s) and the
resulting output change is the gate delay denoted by
tG:
tG tG
Input
Output
Time (ns)
0
0
1
1
0 0.5 1 1.5
tG = 0.3 ns
94. Truth Tables
Chapter 2 - Part 1
94
Truth table - a tabular listing of the values of a function
for all possible combinations of values on its arguments
Example: Truth tables for the basic logic operations:
0
1
1
0
X
NOT
X
Z =
1
1
1
0
0
1
0
1
0
0
0
0
Z = X.Y
Y
X
AND OR
X Y Z = X+Y
0 0 0
0 1 1
1 0 1
1 1 1
95. Logic Diagrams and Expressions
Chapter 2 - Part 1
95
Boolean equations, truth tables and logic diagrams describe the same
function!
Truth tables are unique; expressions and logic diagrams are not. This
gives flexibility in implementing functions.
X
Y F
Z
Logic Diagram
Equation
Z
Y
X
F +
=
Truth Table
1
1 1 1
1
1 1 0
1
1 0 1
1
1 0 0
0
0 1 1
0
0 1 0
1
0 0 1
0
0 0 0
X Y Z Z
Y
X
F
+
=
96. Boolean Algebra
Chapter 2 - Part 1
96
1.
3.
5.
7.
9.
11.
13.
15.
17.
Commutative
Associative
Distributive
DeMorgan’s
2.
4.
6.
8.
X . 1 X
=
X . 0 0
=
X . X X
=
0
=
X . X
An algebraic structure defined on a set of at least two elements,
B, together with three binary operators (denoted +, · and ) that
satisfies the following basic identities:
10.
12.
14.
16.
X + Y Y + X
=
(X + Y) Z
+ X + (Y Z)
+
=
X(Y + Z) XY XZ
+
=
X + Y X . Y
=
XY YX
=
(XY) Z X(Y Z)
=
X + YZ (X + Y) (X + Z)
=
X . Y X + Y
=
X + 0 X
=
+
X 1 1
=
X + X X
=
1
=
X + X
X = X
97. Boolean algebra
• Boolean algebra is the mathematics of digital logic.
• A basic knowledge of Boolean algebra is indispensable
to the study and analysis of logic circuits
The most common postulates used to formulate various
algebraic structures are as follows:
Closure. Associative law. Commutative law. Identity element.
Inverse. Distributive law.
98. Boolean algebra
Closure. A set S is closed with respect to a binary operator
if, for every pair of elements of S, the binary operator
specifies a rule for obtaining a unique element
of S.
Associative law. A binary operator * on a set S is said to be
associative whenever
99. Boolean algebra
Commutative law. A binary operator * on a set S is said to
be commutative whenever
Identity element. A set S is said to have an identity element
with respect to a binary operation * on S if there exists an
element e in S with the property that
100. Boolean algebra
Inverse. A set S having the identity element e with respect
to a binary operator * is said to have an inverse whenever,
for every x ϵ S, there exists an element y ϵ S such that
Distributive law. If (*) and (.) are two binary operators on a
set S, (*) is said to be distributive over (.) whenever
101. Boolean Operator Precedence
Chapter 2 - Part 1
101
The order of evaluation in a Boolean
expression is:
1. Parentheses
2. NOT
3. AND
4. OR
Consequence: Parentheses appear
around OR expressions
Example: F = A(B + C)(C + D)
102. AXIOMATIC DEFINITION OF BOOLEAN
ALGEBRA
• In 1854, George Boole developed an algebraic system
now called Boolean algebra.
• In 1938, Claude E. Shannon introduced a two‐valued
Boolean algebra called switching algebra.
• For the formal definition of Boolean algebra, we shall
employ the postulates formulated by E. V. Huntington in
1904.
Boolean algebra is an algebraic structure defined by a set
of elements, together with two binary operators, (+) and (.) ,
provided that the following (Huntington) postulates are
satisfied:
103. Huntington postulates
1) (a) The structure is closed with respect to the operator
(+).
(b) The structure is closed with respect to the operator
(.) .
2) (a) The element 0 is an identity element with respect to
+; that is, x + 0 =0 + x = x.
(b) The element 1 is an identity element with respect to
(.) ; that is, x . 1 = 1 . x = x.
3) (a) The structure is commutative with respect to +; that
is, x + y = y + x.
(b) The structure is commutative with respect to . ; that
is, x . y = y . x.
104. Huntington postulates
4) (a) The operator . is distributive over +; that is, x . (y + z)
= (x . y) + (x . z).
(b) The operator + is distributive over . ; that is, x + (y . z) =
(x + y) . (x + z).
5) For every element x ϵ B, there exists an element x’ ϵ B
(called the complement of x) such that (a) x + x’ = 1 and (b)
x . x’ = 0.
6) There exist at least two elements x, y ϵ B such that x y.
105. Two‐Valued Boolean Algebra
A two‐valued Boolean algebra is defined on a set of two
elements, B = {0, 1}, with rules for the two binary operators
+ and . as shown in the following operator tables
117. BOOLEAN FUNCTIONS
• Boolean algebra is an algebra that deals with binary variables
and logic operations.
• A Boolean function described by an algebraic expression
consists of binary variables, the constants 0 and 1, and the
logic operation symbols.
• For a given value of the binary variables, the function can be
equal to either 1 or 0.
F1 = x + y’z
120. Boolean Function
2) (a) x + 0 =0 + x = x.
(b) x . 1 = 1 . x = x.
3) (a) x + y = y + x.
(b) x . y = y . x.
4) (a) x . (y + z) = (x . y) + (x . z).
(b) x + (y . z) = (x + y) . (x + z).
5) (a) x + x’ = 1
(b) x . x’ = 0.
three terms and eight literals
121. Algebraic Manipulation
A literal is a single variable within a term
The manipulation of Boolean algebra consists mostly of reducing
an expression for the purpose of obtaining a simpler circuit.
123. Complement of a Function
• The complement of a function F is F’ and is obtained from an
interchange of 0’s for 1’s and 1’s for 0’s in the value of F.
• The complement of a function may be derived algebraically
through DeMorgan’s theorems
The three‐variable form of
the first DeMorgan’s
theorem
124. Complement of a Function
• The generalized form of DeMorgan’s theorems states that the
complement of a function is obtained by interchanging AND
and OR operators and complementing each literal.
127. CANONICAL FORMS
Minterms
• A binary variable may appear either in its normal form (x) or in its
complement form (x’).
• Now consider two binary variables x and y combined with an AND
operation.
• Since each variable may appear in either form, there are four possible
combinations: x’y’, x’y, xy’, and xy.
• Each of these four AND terms is called a minterm, or a standard product.
• n variables can be combined to form 2𝑛 minterms
128. CANONICAL FORMS
Each minterm is obtained from an AND term of the n variables, with each
variable being primed if the corresponding bit of the binary number is a 0
and unprimed if a 1
A symbol for each minterm is of the form 𝑚𝑗, where the subscript j denotes
the decimal equivalent of the binary number of the minterm designated.
Maxterms
In a similar fashion, n variables forming an OR term, with each variable
being primed or unprimed, provide 2𝑛
possible combinations, called
maxterms, or standard sums
129. CANONICAL FORMS
It is important to note that (1) each maxterm is obtained from an OR term of
the n variables, with each variable being unprimed if the corresponding bit is
a 0 and primed if a 1, and (2) each maxterm is the complement of its
corresponding minterm and vice versa.
A Boolean function can be expressed algebraically from a given
truth table by forming a minterm for each combination of the
variables that produces a 1 in the function and then taking the
OR of all those terms.
130. Minterms and Maxterms
Minterms:
AND term with every variable in normal or complemented form.
n variables can be combined to form 2n minterms.
0 => complement and 1 => normal
Maxterms:
OR term with every variable in normal or complemented form.
n variables can be combined to form 2n maxterms.
1 => complement and 0 => normal
131. Maxterms and Minterms
Examples: Two variable minterms and
maxterms.
The index above is important for
describing which variables in the terms
are true and which are complemented.
Index Minterm Maxterm
0 x y x + y
1 x y x + y
2 x y x + y
3 x y x + y
132. Index Examples – Four
Variables
Chapter 2 - Part 1
132
Index Binary Minterm Maxterm
i Pattern mi Mi
0 0000
1 0001
3 0011
5 0101
7 0111
10 1010
13 1101
15 1111
d
c
b
a d
c
b
a +
+
+
d
c
b
a
d
c
b
a +
+
+
d
c
b
a d
c
b
a +
+
+
d
c
b
a +
+
+
d
c
b
a d
c
b
a +
+
+
d
b
a
d
c
b
a d
c
b
a +
+
+
?
?
?
?
c
134. Function Representation by Canonical
Forms
Sum of Minterms (SOM)
Form a minterm for each combination of the variables (input) which produces a 1 in truth
table, and then taking the OR of all those minterms.
x y z F1 F2
0 0 0 0 0
0 0 1 1 0
0 1 0 0 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
135. Minterm Function Example
Example: Find F1 = m1 + m4 + m7
F1 = x y z + x y z + x y z
x y z index F1
0 0 0 0 0
0 0 1 1 1
0 1 0 2 0
0 1 1 3 0
1 0 0 4 1
1 0 1 5 0
1 1 0 6 0
1 1 1 7 1
137. CANONICAL FORMS
Any Boolean function can be expressed as a
sum of minterms (with “sum” meaning the
ORing of terms).
138. Function Representation by Canonical
Forms
Product of Maxterms (POM)
Form a maxterm for each combination of the variables (input) which produces a 0 in truth
table, and then taking the AND of all those maxterms.
x y z F1 F2
0 0 0 0 0
0 0 1 1 0
0 1 0 0 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
F1 = (x+y+z). (x+y’+z).
(x+y’+z’). (x’+y+z’). (x’+y’+z)
F2 = = (x+y+z). (x+y+z’).
(x+y’+z). (x’+y+z)
139. Maxterm Function Example
Example: Implement F1 in maxterms:
F1 = M0 · M2 · M3 · M5 · M6
)
z
y
z)·(x
y
·(x
z)
y
(x
F1 +
+
+
+
+
+
=
z)
y
x
)·(
z
y
x
·( +
+
+
+
x y z index F1
0 0 0 0 0
0 0 1 1 1
0 1 0 2 0
0 1 1 3 0
1 0 0 4 1
1 0 1 5 0
1 1 0 6 0
1 1 1 7 1
140. Maxterm Function Example
F2 = = (x+y+z). (x+y+z’). (x+y’+z). (x’+y+z)
• Example: Implement F1 in maxterms:
F1 = M0 · M2 · M3 · M5 · M6
)
z
y
z)·(x
y
·(x
z)
y
(x
F1 +
+
+
+
+
+
=
z)
y
x
)·(
z
y
x
·( +
+
+
+
F2 = M( ) · M ( ) · M ( ) · M ( )
?
143. CANONICAL FORMS
Any Boolean function can be expressed as a product of maxterms (with
“product” meaning the ANDing of terms). The procedure for obtaining the
product of maxterms directly from the truth table is as follows: Form a
maxterm for each combination of the variables that produces a 0 in the
function, and then form the AND of all those maxterms.
Boolean functions expressed as a sum of minterms or product of
maxterms are said to be in canonical form .
A Boolean function can be expressed algebraically from a given
truth table by forming a minterm for each combination of the
variables that produces a 1 in the function and then taking the
OR of all those terms.
144. Sum of Minterms
The minterms whose sum defines the Boolean function are those
which give the 1’s of the function in a truth table.
n variables -> 22𝑛
functions
• Any Boolean function can be expressed as a Sum of
Minterms.
• For the function table, the minterms used are the
terms corresponding to the 1's
• For expressions, expand all terms first to explicitly
list all minterms. Do this by “ANDing” any term
missing a variable v with a term ( v + v ).
• Example: Implement f = x + x’ . Y’ as a sum of
minterms.
First expand terms: f =x .(y + y’) + x’ . Y’
Then distribute terms: x . y + x . Y’ + x’ . Y’
Express as sum of minterms: f = m3 + m2 + m0
145. Another SOM Example
Example:
There are three variables, A, B, and C which we
take to be the standard order.
Expanding the terms with missing variables:
Collect terms (removing all but one of duplicate
terms):
Express as SOM:
C
B
A
F +
=
146. Shorthand SOM Form
From the previous example, we started with:
We ended up with:
F = m1+m4+m5+m6+m7
This can be denoted in the formal shorthand:
Note that we explicitly show the standard
variables in order and drop the “m” designators.
)
7
,
6
,
5
,
4
,
1
(
)
C
,
B
,
A
(
F m
=
C
B
A
F +
=
147.
148. Product of Maxterms (POM)
Any Boolean Function can be expressed as a Product of Maxterms
(POM).
For the function table, the maxterms used are the terms
corresponding to the 0's.
For an expression, expand all terms first to explicitly list all
maxterms. Do this by first applying the second distributive law ,
“ORing” terms missing variable v with a term equal to
and then applying the distributive law again.
Example: Convert to product of maxterms:
Apply the distributive law:
Add missing variable z:
Express as POM: f = M2 · M3
y
x
x
)
z
,
y
,
x
(
f +
=
y
x
)
y
(x
1
)
y
)(x
x
(x
y
x
x +
=
+
=
+
+
=
+
( )
z
y
x
)
z
y
x
(
z
z
y
x +
+
+
+
=
+
+
v
v
150. Product of Maxterms
A functions of n binary variables can be also expressed as a product
of maxterms.
151. Conversion between Canonical Forms
To convert between sum-of-minterms (SOM) and product-of-maxterms
(POM) form (or vice-versa) we follow these steps:
Find the function complement by swapping terms in
the list with terms not in the list.
Change from products to sums, or vice versa.
Example: Given F as before:
Form the Complement:
Then use the other form with the same indices – this forms the
complement again, giving the other form of the original function:
)
7
,
5
,
3
,
1
(
)
z
,
y
,
x
(
F m
=
)
6
,
4
,
2
,
0
(
)
z
,
y
,
x
(
F m
=
)
6
,
4
,
2
,
0
(
)
z
,
y
,
x
(
F M
=
152. Conversion between Canonical Forms
F(A, B, C) =∑ (1, 4, 5, 6, 7)
F’(A, B, C) = ∑(0, 2, 3) = m0 + m2 + m3
F = (m0 + m2 + m3)’ = m0’ m2’ m3’ = M0M2M3 = ∏(0, 2, 3)
To convert from one canonical form to another, interchange the symbols
∑ and ∏ and list those numbers missing from the original form.
153. Function Complements
The complement of a function expressed as a
sum of minterms is constructed by selecting the
minterms missing in the sum-of-minterms
canonical forms.
Alternatively, the complement of a function
expressed by a Sum of Minterms form is simply
the Product of Maxterms with the same indices.
Example: Given
)
7
,
5
,
3
,
1
(
)
z
,
y
,
x
(
F m
=
)
6
,
4
,
2
,
0
(
)
z
,
y
,
x
(
F m
=
)
7
,
5
,
3
,
1
(
)
z
,
y
,
x
(
F M
=
154. Function
F = xy + x’z
F(x, y, z) = ∑(1, 3, 6, 7)
F(x, y, z) = ∏(0, 2, 4, 5)
155. Standard Forms
• The two canonical forms of Boolean algebra are basic forms that one
obtains from reading a given function from the truth table.
• These forms are very seldom the ones with the least number of literals,
because each minterm or maxterm must contain, by definition, all the
variables, either complemented or uncomplemented
• Another way to express Boolean functions is in standard form.
• In this configuration, the terms that form the function may contain one,
two, or any number of literals.
• There are two types of standard forms: the sum of products and
products of sums.
156. Standard Forms
It is assumed that the input variables are
directly available in their complements,
so inverters are not included in the
diagram. This circuit configuration is
referred
to as a two‐level implementation.
157. Standard Forms
A product of sums is a Boolean expression containing OR terms, called sum
terms.
A Boolean function may be expressed in
a nonstandard form
158. OTHER LOGIC OPERATIONS
• AND
• OR
Two Variables
functions for n binary variables
2
2 n
The AND and OR functions are only 2 of a total of 16 possible functions
formed with two binary variables
159. OTHER LOGIC OPERATIONS
2
2 n
The 16 functions listed can be subdivided into three categories:
1. Two functions that produce a constant 0 or 1.
2. Four functions with unary operations: complement and transfer.
3. Ten functions with binary operators that define eight different operations:
AND, OR, NAND, NOR, exclusive‐OR, equivalence, inhibition, and implication.
167. Positive and Negative Logic
Choosing the high‐level H to represent logic 1 defines a positive logic
system. Choosing the low‐level L to represent logic 1 defines a
negative logic system.
169. Demonstration of positive and negative
logic
polarity indicator
Thus, the same physical gate can operate either as a positive‐logic AND gate or as a
negative‐logic OR gate.
170.
171. A Simplification Example:
Writing the minterm expression:
F = A B C + A B C + A B C + ABC + ABC
Simplifying:
F =
Simplified F contains 3 literals compared to 15
in minterm F
Standard Sum-of-Products (SOP)
)
7
,
6
,
5
,
4
,
1
(
m
)
C
,
B
,
A
(
F
=
Chapter 2 - Part 1
171
172. Implementation of SOP
Expression
The two implementations for F are shown
below – it is quite apparent which is simpler!
F
A
B
C
A
B
C
A
B
C
A
B
C
A
B
C F
B
C
A
Chapter 2 - Part 1
172
173. SOP and POS Observations
The previous examples show that:
Canonical Forms (Sum-of-minterms, Product-of-
Maxterms), or other standard forms (SOP, POS)
differ in complexity
Boolean algebra can be used to manipulate
equations into simpler forms.
Simpler equations lead to simpler two-level
implementations
Questions:
How can we attain a “simplest” expression?
Is there only one minimum cost circuit?
The next part will deal with these issues.
Chapter 2 - Part 1
173
174. Karnaugh Maps (K-map)
A K-map is a collection of squares
Each square represents a minterm
The collection of squares is a graphical
representation of a Boolean function
Adjacent squares differ in the value of one
variable
Alternative algebraic expressions for the same
function are derived by recognizing patterns of
squares
The K-map can be viewed as
A reorganized version of the truth table
Chapter 2 - Part 1
174
175. Some Uses of K-Maps
Provide a means for:
Finding optimum or near optimum
SOP and POS standard forms, and
two-level AND/OR and OR/AND circuit implementations
for functions with small numbers of variables
Visualizing concepts related to manipulating
Boolean expressions, and
Demonstrating concepts used by computer-aided
design programs to simplify large circuits
Chapter 2 - Part 1
175
176. Two Variable Maps
A 2-variable Karnaugh Map:
Note that minterm m0 and
minterm m1 are “adjacent”
and differ in the value of the
variable y
Similarly, minterm m0 and
minterm m2 differ in the x variable.
Also, m1 and m3 differ in the x variable as well.
Finally, m2 and m3 differ in the value of the
variable y
y = 0 y = 1
x = 0
m0 = m1 =
x = 1 m2 = m3 =
y
x y
x
y
x y
x
Chapter 2 - Part 1
176
177. K-Map and Truth Tables
The K-Map is just a different form of the truth table.
Example – Two variable function:
We choose a,b,c and d from the set {0,1} to
implement a particular function, F(x,y).
Function Table K-Map
Input
Values
(x,y)
Function
Value
F(x,y)
0 0 a
0 1 b
1 0 c
1 1 d
y = 0 y = 1
x = 0 a b
x = 1 c d
Chapter 2 - Part 1
177
178. K-Map Function Representation
Example:
For function F(x,y), the two adjacent cells
containing 1’s can be combined using the
Minimization Theorem:
F = x y = 0y = 1
x = 0 0 0
x = 1 1 1
y
x
y
x
)
y
x
(
F +
=
Chapter 2 - Part 1
178
179. K-Map Function Representation
Example: G(x,y) =
x y+x y+x y
G = x+y y = 0 y = 1
x = 0 0 1
x = 1 1 1
Chapter 2 - Part 1
179
180. Three Variable Maps
A three-variable K-map:
Where each minterm corresponds to the product
terms:
Note that if the binary value for an index differs in
one bit position, the minterms are adjacent on the
K-Map
yz=00 yz=01 yz=11 yz=10
x=0 m0 m1 m3 m2
x=1 m4 m5 m7 m6
yz=00 yz=01 yz=11 yz=10
x=0
x=1
z
y
x z
y
x z
y
x z
y
x
z
y
x z
y
x z
y
x z
y
x
Chapter 2 - Part 1
180
181. 181
Any two adjacent squares in the map differ by only one variable
Thus, any two minterms in adjacent squares (vertically
or horizontally, but not diagonally, adjacent) that are
ORed together will cause a removal of the dissimilar
variable.
182. Alternative Map Labeling
Map use largely involves:
Entering values into the map, and
Reading off product terms from the
map.
Alternate labelings are useful:
y
z
x
1
0 2
4
3
5 6
7
x
y
z
z
y
y z
z
1
0 2
4
3
5 6
7
x
0
1
00 01 11 10
x
Chapter 2 - Part 1
182
183. Example Functions
By convention, we represent the minterms of F by
a "1" in the map and leave the minterms of blank
Example:
Example:
Learn the locations of the 8
indices based on the variable
order shown (x, most significant
and z, least significant) on the
map boundaries
y
x
1
0 2
4
3
5 6
7
1
1
1
1
z
x
y
1
0 2
4
3
5 6
71 1
1
1
z
(2,3,4,5)
z)
y,
F(x, m
=
(3,4,6,7)
c)
b,
G(a, m
=
F
Chapter 2 - Part 1
183
184. Combining Squares
By combining squares, we reduce number of
literals in a product term, reducing the literal
cost, thereby reducing the other two cost
criteria
On a 3-variable K-Map:
One square represents a minterm with three
variables
Two adjacent squares represent a product term
with two variables
Four “adjacent” terms represent a product term
with one variable
Eight “adjacent” terms is the function of all
ones (no variables) = 1.
Chapter 2 - Part 1
184
185. Example: Combining Squares
Example: Let
Applying the Minimization Theorem three
times:
Thus the four terms that form a 2 × 2 square
correspond to the term "y".
y
=
z
y
yz+
=
z
y
x
z
y
x
z
y
x
z
y
x
)
z
,
y
,
x
(
F +
+
+
=
x
y
1
0 2
4
3
5 6
71 1
1
1
z
m(2,3,6,7)
F
=
Chapter 2 - Part 1
185
186. Three-Variable Maps
Reduced literal product terms for SOP
standard forms correspond to rectangles on
K-maps containing cell counts that are
powers of 2.
Rectangles of 2 cells represent 2 adjacent
minterms; of 4 cells represent 4 minterms
that form a “pairwise adjacent” ring.
Rectangles can contain non-adjacent cells
as illustrated by the “pairwise adjacent” ring
above.
Chapter 2 - Part 1
186
187. Three-Variable Maps
Example Shapes of 2-cell Rectangles:
Read off the product terms for the rectangles
shown
y
0 1 3 2
5 6
4 7
x
z
Chapter 2 - Part 1
187
188. Three-Variable Maps
Example Shapes of 4-cell Rectangles:
Read off the product terms for the rectangles
shown
y
0 1 3 2
5 6
4 7
x
z
Chapter 2 - Part 1
188
189. Three Variable Maps
z)
y,
F(x, =
y
1
1
x
z
1 1
1
z
z
y
x
+
y
x
K-Maps can be used to simplify Boolean functions by
systematic methods. Terms are selected to cover
the
“1s”in the map.
Example: Simplify
)
(1,2,3,5,7
z)
y,
F(x, m
=
Chapter 2 - Part 1
189
201. FOUR-VARIABLE K-MAP
16 minterms
rows and columns → only one digit changing value between two
adjacent rows or columns
The map minimization of four-variable Boolean functions is similar to the
method used to minimize three-variable functions.
One square represents one minterm, giving a term with four literals.
Two adjacent squares represent a term with three literals.
Four adjacent squares represent a term with two literals.
Eight adjacent squares represent a term with one literal.
Sixteen adjacent squares produce a function that is always equal to 1.
203. EXAMPLE 3.5
F (w, x, y, z) = (0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 14)
204.
205. EXAMPLE 3.6
F = A’B’C’ + B’CD’ + A’BCD’ +
AB’C’
F = B’D’ +B’C’ +A’CD’
206.
207. Prime Implicants
In choosing adjacent squares in a map, we must ensure that
(1) all the minterms of the function are covered when we combine the
squares,
(2) the number of terms in the expression is minimized, and
(3) there are no redundant terms (i.e., minterms already covered by other
terms).
A prime implicant is a product term obtained by combining the maximum
possible number of adjacent squares in the map.
If a minterm in a square is covered by only one prime
implicant, that prime implicant is said to be essential
208. The prime implicants of a function can be obtained from the map by
combining all possible maximum numbers of squares
F(A, B, C, D) = (0, 2, 3, 5, 7, 8, 9, 10, 11, 13, 15)
211. EXAMPLE 3.7
Simplify the following Boolean function into (a) sum-of-products form and
(b) product-of-sums form:
F (A, B, C, D) = (0, 1, 2, 5, 8, 9, 10)
Combining the squares with 1’s gives the simplified function in sum-of-
products form:
F = B’D’ + B’C’ + A’C’D
212. If the squares marked with 0’s are combined, as shown in the diagram, we
obtain the simplified complemented function:
F’ = AB + CD + BD’
Applying DeMorgan’s
theorem we obtain the
simplified function in
productof-
sums form:
F = (A’ + B’) (C’ + D’) (B’ + D)
213.
214. F (x, y, z) = (1, 3, 4, 6)
F (x, y, z) = (0, 2, 5, 7)
215. For the sum of products, we combine the 1’s to obtain
For the product of sums, we combine the 0’s to obtain the simplified
complemented function
F = x’z + xz’
F’ = xz + x’z’
F = (x’ + z’)(x + z)
216. DON’T-CARE CONDITIONS
Incompletely Specified Functions .
Functions that have unspecified outputs for some input
combinations
In most applications, we simply don’t care what
value is assumed by the function for the
unspecified minterms.
For this reason, it is customary to call the
unspecified minterms of a function don’t-care
conditions .
217. DON’T-CARE CONDITIONS
These don’t-care conditions can be used on a map to provide further
simplification of the Boolean expression.
A don’t-care minterm is a combination of variables whose logical value is
not specified.
Such a minterm cannot be marked with a 1 in the map, because it would
require that the function always be a 1 for such a combination.
Likewise, putting a 0 on the square requires the function to be 0.
To distinguish the don’t-care condition from 1’s and 0’s, an X is used.
218. DON’T-CARE CONDITIONS
An X inside a square in the map indicates that we don’t care whether the
value of 0 or 1 is assigned to F for the particular minterm.
In choosing adjacent squares to simplify the function in a map, the don’t-
care minterms may be assumed to be either 0 or 1.
When simplifying the function, we can choose to include each don’t-care
minterm with either the 1’s or the 0’s, depending on which combination
gives the simplest expression.
219. EXAMPLE 3.8
F (w, x, y, z) = (1, 3, 7, 11, 15)
d (w, x, y, z) = (0, 2, 5)
220. NAND AND NOR IMPLEMENTATION
Digital circuits are frequently constructed with NAND or NOR
gates rather than with AND and OR gates.
NAND and NOR gates are easier to fabricate with electronic
components and are the basic gates used in all IC digital logic
families.
221. NAND Circuits
The NAND gate is said to be a universal gate because any logic circuit can
be implemented with it.
To show that any Boolean function can be implemented with NAND gates,
we need only show that the logical operations of AND, OR, and complement
can be obtained with NAND gates alone.
222. NAND Circuits
The complement operation is obtained from a one-input NAND gate that
behaves exactly like an inverter.
The AND operation requires two NAND gates. The first produces the NAND
operation and the second inverts the logical sense of the signal.
The OR operation is achieved through a NAND gate with additional inverters
in each input.
223. NAND Circuits
A convenient way to implement a Boolean function with NAND
gates is to obtain the simplified Boolean function in terms of
Boolean operators and then convert the function to NAND logic.
The conversion of an algebraic expression from AND, OR, and complement
to NAND can be done by simple circuit manipulation techniques that change
AND–OR diagrams to NAND diagrams.
228. NAND Circuits
The implementation of Boolean functions with NAND gates requires
that the functions be in sum-of-products form.
A
B
C
D
G(A,B,C,D) = A*B + C*D
G(A,B,C,D)
237. NOR Implementation
The NOR gate is another universal gate that can be used to implement any
Boolean function.
The NOR operation is the dual of the NAND operation
The complement operation is obtained from a one input NOR gate that
behaves exactly like an inverter
The OR operation requires two NOR gates, and the
AND operation is obtained with a NOR gate that has inverters in each input
245. Odd Function
In general, an n -variable exclusive-OR function is an odd function defined
as the logical sum of the minterms whose binary numerical values
have an odd number of 1’s.
The complement of an odd function is an even function
2 2
n
248. Parity Generation and Checking
• Exclusive-OR functions are very useful in systems requiring error
detection and correction codes.
• A parity bit is used for the purpose of detecting errors during the
transmission of binary information.
• A parity bit is an extra bit included with a binary message to make the
number of 1’s either odd or even.
• The message, including the parity bit, is transmitted and then checked at
the receiving end for errors.
• An error is detected if the checked parity does not correspond with the
one transmitted.
• The circuit that generates the parity bit in the transmitter is called a parity
generator. The circuit that checks the parity in the receiver is called a
parity
• checker.
250. Even Parity Checker
The three bits in the message,
together with the parity bit, are
transmitted to their destination,
where they are applied to a parity-
checker circuit to check for possible
errors in the transmission.
251. Even Parity Checker
• The information was transmitted
with even parity, the four bits
received must have an even number
of 1’s.
• An error occurs during the
transmission if the four bits received
have an odd number of 1’s,
indicating that one bit has changed
in value during transmission.