DLD-Notes--
DLD-Notes--
OBJECTIVES
This course provides in-depth knowledge of switching theory and the logic design techniques of digital
circuits, which is the basis for design of any digital circuit. The course objectives are:
To learn basic techniques for the design of digital circuits and fundamental concepts used in the design
of digital systems.
To understand common forms of number representation in digital electronic circuits and to be able to convert
between different representations.
To implement simple logical operations using combinational logic circuits
To design combinational logic circuits, sequential logic circuits.
To impart to student the concepts of sequential circuits, enabling them to analyze sequential systems in
terms of state machines.
To implement synchronous state machines using flip-flops.
Arithmetic Logic Unit (ALU), Memory Modules, Programmable Logic Devices, Microcontroller and
Microprocessor, Digital Display Modules, Communication Modules.
Best digital system Example: General Purpose computer.
Logic Design:
Deals with basic concepts and tools used to design digital hardware consisting of logic circuits.
Circuit to perform arithmetic operations.
Digital systems use digital circuits that can process digital signals which can take either 0 or 1 for binary
system.
Figure 1
NUMBER SYSTEM:
For Ex: Let us consider decimal number 18. This number is represented in binary as 10010.
We observe that binary number system take more digits to represent the decimal number.
For large numbers we have to deal with very large binary strings. So this fact gave rise to three new number
systems
COMPLEMENTS
Complements are used in the digital computers in order to simplify the subtraction operation and for the
logical manipulations.
For each radix-r system (radix r represents base of number system)
there are two types of complements.
R's complement/Radix
(R-1)'s complement/Diminished Radix
Radix Complement and Diminished Radix Complement
The mostly used complements are 1's, 2's, 9's, and 10's complement. Apart from these
complements, there are many more complements.
For finding the subtraction of the number base system, the complements are used.
If r is the base of the number system, then there are two types of complements that are
possible, i.e. r's and (r-1)'s. We can find the r's complement, and (r-1)'s complement of the
number, here r is the radix. The r's complement is also known as Radix complement (r-1)'s
complement, is known as Diminished Radix complement.
If the base of the number is 2, then we can find 1's and 2's complement of the number.
Similarly, if the number is the octal number, then we can find 7's and 8's complement of
the number.
formula for finding the r's and (r-1)'s complement:
This number has a base of 2, which means it is a binary number. So, for the
binary numbers, the value of r is 2, and r-1 is 2-1=1. So, we can calculate the
1's and 2's complement of the number.
Example 2: (155)10
This number has a base of 10, which means it is a decimal number. So, for the
decimal numbers, the value of r is 10, and r-1 is 10-1=9. So, we can calculate the
10's and 9's complement of the number.
9's complement of the number 155 is calculated as:
={(103 )10-1}-(155)10
=(1000-1)-155
=999-155
=(844)10
10's complement of the number 155 is calculated as:
=(103 )10-(155)10
=1000-155
=(845)10
Example 3: (172)8
This number has a base of 8, which means it is an octal number. So, for the
octal numbers, the value of r is 8, and r-1 is 8-1=7. So, we can calculate the 8's
and 7's complement of the number.
7's complement of the number 172 is calculated as:
={(83 )10-1}-(172)8
=((512)10-1)-(122)8
=(511)10-(122)10
=(389)10
=(605)8
This number has a base of 16, which means it is a hexadecimal number. So, for
the hexadecimal numbers, the value of r is 16, and r-1 is 16-1=15. So, we can
calculate the 16's and 15's complement of the number.
15's complement of the number F9 is calculated as:
{(162 )10-1}
(F9)16 (256-1)10-
F916 25510-24910
(6)10
(6)16
= (111)2.
(r-1)'s complement
The (r-1)'s complement of a number in any number system with base r can be
found out by subtracting every single digit of a number by r-1.
For Example: In the binary number system, the base is 2. Hence, its (r- 1)'s i.e.,
(2-1 =1)'s complement can be obtained by subtracting each bit from 1, i.e., 1's
complement for 001 can also be calculated by
Similarly, in the octal number system, the base is 8 so its 7's complement can be
calculated by subtracting each bit by 7, i.e., 7's complement
for 347 in octal number system can be calculated by subtracting
347 from 777 which will yield (777 – 347) = (430)8.
Solution: 10's complement for (2457)10 is calculated by adding 1 to (7542)10 which is the 9's
complement. Therefore, 10's complement of (2457)10 is (7543)10
The 1's complement of a number is found by changing all 1's to 0's and all 0's to 1's. This is called
as taking complement or 1's complement. Example of 1's Complement is as follows
2's complement
The 2's complement of binary number is obtained by adding 1 to the Least
Significant Bit (LSB) of 1's complement of the number.
Boolean Algebra
A system of mathematical logic.
It is an algebraic system consisting of the set of elements (0, 1), two binary operators called OR, AND, and one unary
operator NOT.
It is the basic mathematical tool in the analysis and synthesis of switching circuits.
It is set of rules, used to simplify the given logic expression without changing its functionality.
Axioms and laws of Boolean algebra
Axioms or Postulates of Boolean algebra are a set of logical expressions that we accept without proof and upon which we can build a
set of useful theorems.
ASSOCIATIVE LAW:
COMMUTATIVE LAW:
• xy = yx
• x + ( y + z ) = ( x + y ) +z
• x (yz) = (xy) z
• x ( y + z ) = xy + xz
• x + yz = ( x + y )( x + z) Distributive
• ( x + y )’ = x’ y’
• ( xy )’ = x’ + y’
• (x’)’ = x
DeMorgan's Theorem
Associative law
Distributive law
Absorption law
Part-A Part-B
A+0=A A.0=0
A+1=1 A.1=A
A+A=A (Impotence law) A.A=A (Impotence law)
A+ ̅ A
=1 A. ̅ A
=0
̅A
= A (double inversion law) --
Commutative law: A+B=B+A A.B=B.A
Associative law: A + (B +C) = (A +B) +C A(B.C) = (A.B)C
Distributive law: A.(B + C) = AB+ AC A + BC = (A + B).(A +C)
Absorption law: A +AB =A A(A +B) = A
DeMorgan Theorem:
(A+B) = ̅A . ̅B (A.B) = = ̅A + ̅B
Redundant Literal Rule: A+ ̅ A. B=A+B A.(̅ A
A+B)=AB
Consensus Theorem: AB+ A’C + BC = AB + A’C (A+B). (A’+C).(B+C) =(A+B).( A’+C)
Boolean Function
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.
1. Truth Table
A table listing all possible input combinations and their corresponding output.
2. Boolean Algebra Expression
A formula consisting of AND (·), OR (+), NOT (‾) operations.
Example: F(A,B,C)=AB+A‾C
3. Logic Circuit
A graphical representation using logic gates.
4. Karnaugh Map (K-Map)
A simplification tool to minimize Boolean expressions.
x y z F1
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Algebraic Manipulation (Minimization of Boolean function)
Boolean algebra is a useful tool for simplifying digital circuits.
Why do it? Simpler can mean cheaper, smaller, faster.
Example: Simplify F = x’yz + x’yz’ + xz.
F= x’yz + x’yz’ + xz
= x’y(z+z’) + xz
= x’y•1 + xz
= x’y + xz
Example: Prove
Example
Find G(x,y,z)
The complement of F(x,y,z) = xy’z’ +x’yz
G = F’ = (xy’z’ + x’yz)’
= (xy’z’)’ • (x’yz)’ DeMorgan
= (x’+y+z) • (x+y’+z’) DeMorgan again
Canonical and standard forms are structured ways to represent Boolean functions.
These forms are essential for logic simplification, circuit design, and minimization techniques.
1. Canonical Forms
A Boolean function is in canonical form if each term includes all variables (either in complemented or uncomplemented
form). There are two types:
It expresses the function as a sum (OR operation) of minterms (AND terms where each variable appears in either normal
or complemented form).
Each minterm corresponds to a row in the truth table where the output is 1.
A B C F(A, B, C) F(A,B,C)=A′B′C+A′BC+AB′C+AB′C
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
It expresses the function as a product (AND operation) of maxterms (OR terms where each variable appears in either
normal or complemented form).
Each maxterm corresponds to a row in the truth table where the output is 0.
From the previous truth table, the rows where F=0F = 0F=0 are:
F(A,B,C)=(A+B+C)(A+B′+C′)(A′+B+C′)(A′+B′+C′)
F(A,B,C)=∏M(0,2,5,7)
Example: Assume 3 variables (A, B, C), and j=3. Then, bj = 011 and its corresponding maxterm is denoted
by Mj = A+B’+C’
Denoted by Mj, where j is the decimal equivalent of the maxterm’s corresponding binary combination (bj).
A variable in Mj is complemented if its value in bj is 1, otherwise is uncomplemented.
2. Standard Forms
Standard SOP and POS are simplified versions of canonical forms, where each term may not necessarily include all
variables.
Unlike canonical SOP, each term may not include all variables.
F(A,B,C)=AB+BC
F(A,B,C)=(A+B)(B+C)
Truth table representing minterm and maxterm
Sum of minterms Example – Express the Boolean function F = A + B’’C as standard sum of minterms.
Solution –
A = A(B + B‟) = AB + AB‟
This function is still missing one variable, so
A = AB(C + C‟) + AB’'(C + C‟) = ABC + ABC‟+ AB‟C + AB‟C‟
The given Boolean function is in canonical PoS, we have to simplify this Boolean function in order to get standard PoS form
x · x = x. That means. So, we can write the first term p+q+r two more times.
⇒f=(p+q+r)⋅(p+q+r)⋅(p+q+r)⋅(p+q+r′)⋅(p+q′+r)⋅(p′+q+r)
Step 2 − Use Distributive law, x + (y · z) = (x + y)·(x + z) for 1st and 4th parenthesis, 2nd and 5th parenthesis, 3rd and
6th parenthesis.
⇒f=(p+q+rr′)⋅(p+r+qq′)⋅(q+r+pp′)
Use Boolean postulate, x.x'=0 for simplifying the terms present in each parenthesis.
⇒f=(p+q+0)⋅(p+r+0)⋅(q+r+0)
Use Boolean postulate, x + 0 = x for simplifying the terms present in each parenthesis
⇒f=(p+q)⋅(p+r)⋅(q+r)⇒f=(p+q)⋅(p+r)⋅(q+r)
⇒f=(p+q)⋅(q+r)⋅(p+r)⇒f=(p+q)⋅(q+r)⋅(p+r)
This is the simplified Boolean function. Therefore, the standard PoS form corresponding to given canonical PoS form is
f = (p + q)·(q + r)·(p + r).
Combination logic circuit and design
Once the expression is determined, it is usually a to break down all large inverter signs using DeMorgan’s theorems and
then multiply out all terms.
The first and third terms above have AC in common, which can be
This result can be simplified no further. Its circuit implementation is shown in Figure (b). It is obvious that the circuit in
Figure (b) is a simpler than the original circuit in Figure (a).
Simplify the expression
Minimization techniques in logic design are used to simplify Boolean expressions and logic circuits, reducing the number
of gates.
1. Algebraic Simplification
Uses Boolean algebra rules (Idempotent Law, De Morgan's Theorems) to simplify expression.
A graphical method used for up to 6-variable expressions. Functions by grouping adjacent 1s.
To reduce the number of terms in a Boolean expression representing a circuit, it is necessary tofindterms
tocombine.
3. Quine-McCluskey Method
There are four possible minterms in the sum-of-products expansion of a Boolean function in the two variables x
and y.
A K-map for a Boolean function in these two variables consists of four cells,
Where a 1 is placed in the cell representing a minterm if this minterm is present in the expansion. Cells are said to
be adjacent if the minterms that they represent differ in exactly one literal.
For instance, the cell representing x’y is adjacent to the cells representing xy and x’ y’. The four cells and the terms
that they represent are shown in Figure
EXAMPLE-1 Find the K-maps for (a) xy + x’y, (b) xy’ + x’y, and (c) xy’ + x’y + x’y’.
We include a 1 in a cell when the minterm represented by this cell is present in the sum-of-products
expansion. The three K-maps are shown in Figure.
The grouping of minterms is shown in Figure using the K-maps for these expansions. Minimal expansions for
these sums-of-products are (a) y, (b) xy’ + x’y, and (c) x’ + y’.
A K-map in three variables is a rectangle divided into eight cells. The cells represent the eight possible minterms
in three variables. Two cells are said to be adjacent if the minterms that they represent differ in exactly one
literal. One of the ways to forma K-map in three variables is shown in Figure.
The K-maps for these sum-of-products expansions are shown in Figure, The grouping of blocks shows that
minimal expansions into Boolean sums of Boolean products are