0% found this document useful (0 votes)
2 views

DLD-Notes--

The document outlines a course on Digital Logic Design, focusing on the principles of switching theory and logic design techniques for digital circuits. It covers topics such as number systems, Boolean algebra, logic gates, and the implementation of combinational and sequential logic circuits. The course aims to equip students with the skills to design and analyze digital systems, including the use of complements and error detection codes.

Uploaded by

Humama Usmani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

DLD-Notes--

The document outlines a course on Digital Logic Design, focusing on the principles of switching theory and logic design techniques for digital circuits. It covers topics such as number systems, Boolean algebra, logic gates, and the implementation of combinational and sequential logic circuits. The course aims to equip students with the skills to design and analyze digital systems, including the use of complements and error detection codes.

Uploaded by

Humama Usmani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

DIGITAL LOGIC DESIGN

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.

DLD-Digital Logic Design


A system in electrical and computer engineering that uses simple numerical values to produce input and output
operations.
Digital Logic Design involves the study of digital circuits that operate using logic gates to process binary information (0s
and 1s).

Digital systems and Binary Numbers


 Digital:
Concerned with the interconnection among digital components and modules.

Logic Gates, Flip-Flops, Multiplexers (MUX), Encoders, Counters.

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.

NUMBER SYSTEMS & BOOLEAN ALGEBRA

 Introduction about digital system


 Philosophy of number systems
 Complement representation of negative numbers
 Binary arithmetic
 Binary codes
 Error detecting & error correcting codes
 Hamming codes
INTRODUCTION ABOUT DIGITAL SYSTEM
A Digital system is an interconnection of digital modules
A system that manipulates discrete elements of information that is represented internally in the binary form.
 Used in industrial and consumer products such as automated industrial machinery, pocket calculators,
microprocessors, digital computers, digital watches, TV games and signal processing and so on.

Characteristics of Digital systems


 Digital systems manipulate discrete elements of information.
 Discrete elements are nothing but the digits such as 10 decimal digits or 26 letters of alphabets and so on.
 Digital systems use physical quantities called signals to represent discrete elements.
 In digital systems, the signals have two discrete values and are therefore said to be binary.
 A signal in digital system represents one binary digit called a bit. The bit has a value either 0 or 1.

Analog systems vs Digital systems


 Analog system process information that varies continuously
 Process time varying signals that can take on any values across a continuous range of voltage, current or any
physical parameter.

 Digital systems use digital circuits that can process digital signals which can take either 0 or 1 for binary
system.

Figure 1
NUMBER SYSTEM:

 Number system is a basis for counting varies items.


 Modern computers communicate and operate with binary numbers which use only the digits 0 &1.
 Basic number system used by humans is Decimal 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

Octal number systems


Hexa Decimal number system
Binary Coded Decimal number (BCD) system
To define any number system we have to specify

 Base of the number system such as 2,8,10 or 16.


 The base decides the total number of digits available in that number system.
 First digit in the number system is always zero and last digit in the number system is always base-1.
Binary number system:
The binary number has a radix of 2. As r = 2, only two digits are needed, and these are 0 and 1. In binary
system weight is expressed as power of 2.

Decimal Number system


The decimal system has ten symbols: 0,1,2,3,4,5,6,7,8,9. In other words, it has a base of 10.

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:

r' s= complement= (rn )10-N


(r-1)' s complement={(rn)10-1}-N
In the above formulas,
The n is the number of digits in the number.
The N is the given number.
The r is the radix or base of the number.
Let's take some examples to understand how we can calculate the r's and (r-1)'s
complement of binary, decimal, octal, and hexadecimal numbers.
Example 1: (1011000)2

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.

1's complement of the number 1011000 is calculated as:


={(27 )10-1}-(1011000)2
={(128)10-1}-(1011000)2
={(127)10}-(1011000)2
=11111112-10110002
=0100111

2's complement of the number 1011000 is calculated as:


=(27 )10-(1011000)2
=(128)10-(1011000)2
=100000002-10110002
=01010002

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

8's complement of the number 172 is calculated as:


=(83 )10-(172)8
=(512)10-1728
=51210-12210
=39010
=6068
Example 4: (F9)16

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

16's complement of the number F9 is calculated as:


{(162 )10 }-(F9)16
25610-24910
(7)10
(7)16
r's complement
The r's complement of a non-zero number in any number system with base r
can be calculated by adding 1 to the LSB of its (r-1)'s complement.
For Example: In binary number system, 2's complement of 001 can be
calculated by adding 1 to the LSB of its 1'complement (i.e., 110 + 1)

= (111)2.

Similarly, in octal number system, 8's complement of 347 can be calculated by


adding 1 to the LSB of its 7'complement (i.e., 430 + 1) = (431)8 .

(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

Subtracting 001 from 111 which will be (111-001) = (110)2.

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.

9's and 10's complement in Decimal Number System


We already know that the decimal number system has its base as 10, As we
have already discussed above, 9's complement of decimal number can be found
out by subtracting its each by 9.
Example 1: Calculate 9's complement of (2457)10
Solution: 9999 – 2457 = (7542)10
Now, 10's complement of a decimal number can be calculated by adding 1 to the
LSB of the 9's complement.
Example 2: Calculate 10's complement of (2457)10

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

Binary system complements


As the binary system has base r = 2. So the two types of complements for the
binary system are 2's complement and 1's complement.
1's complement

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.

2's complement = 1's complement + 1

Example of 2's Complement is as follows.


Digital Logic Gates:
Boolean functions are expressed in terms of AND, OR, and NOT operations.
it is easier to implement a Boolean function with these type of gates.

Universal Logic Gates


NAND and NOR gates are called Universal gates.
All fundamental gates (NOT, AND, OR) can be realized by using either only NAND or only NOR gate.
A universal gate provides flexibility and offers enormous advantage to logic designers .

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.

AND Operation OR Operation NOT Operation


Axiom1 : 0.0=0 0+0=0 0=1
Axiom2: 0.1=0 0+1=1 1=0
Axiom3: 1.0=0 1+0=1
Axiom4: 1.1=1 1+1=1
OR Law
AND Law
Law1: A.0=0 (Null law) Law1: A+0=A
Law2: A.1=A (Identity law) Law2: A+1=1
Law3: A.A=A (Impotence law) Law3: A+A=A (Impotence law)

ASSOCIATIVE LAW:

A binary operator * on a set S is said to be associative whenever (x * y) * z = x * (y * z)

COMMUTATIVE LAW:

A binary operator * on a set S is said to be commutative whenever x * y = y * x


BASIC IDENTITIES OF BOOLEAN ALGEBRA
Postulate 1(Definition): A Boolean algebra is a closed algebraic system containing a set K of two or more elements
and the two operators · and + which refer to logical AND and logical OR
• x + 0 =x
• x ·0=0
• x+1=1
• x·1=1
• x+x=x
• x·x=x
• x + x’ = x
• x · x’ = 0
• x+y=y+x

• 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

• x + x’=1 and x. x’=0

DeMorgan's Theorem

(a) (a + b)' = a'b'


(b) (ab)' = a' + b'
Generalized DeMorgan's Theorem

(a) (a + b + … z)' = a'b' … z'


(b) (a.b … z)' = a' + b' + … z‘

Basic Theorems and Properties of Boolean algebra Commutative law

Law1: A+B=B+A Law2: A.B=B.A

Associative law

Law1: A + (B +C) = (A +B) +C Law2: A(B.C) = (A.B)C

Distributive law

Law1: A.(B + C) = AB+ AC Law2: A + BC = (A + B).(A +C)

Absorption law

Law1: A +AB =A Law2: A(A +B) = A

Solution: A(1+B) Solution: A.A+A.B


A A+A.B
A(1+B)
A
Consensus Theorem
The Consensus Theorem is a simplification rule used in Boolean algebra that helps reduce redundant terms in logic
expressions. It states that:

AB+ A’C + BC = AB + A’C


The term BC is redundant because it is already covered by AB and ĀC.
Removing BC does not change the logic function.

Proof using Boolean Algebra:


AB+A’C+BC = AB+A’C+(A+A’)BC
=AB+A’C+ABC+A’BC
=AB(1+C)+A’C(1+B)
= AB+ A’C
This theorem is useful in simplifying digital logic circuits, minimizing the number of gates required for implementation.
Table for Theorems of Boolean algebra

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.

Representation of Boolean Functions


A Boolean function can be represented in multiple ways:

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.

Truth Table for F1=x+ y’z

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

x’y’z’ + x’yz’ + xyz’ = x’z’ + yz’

Complement of a Boolean Function


The complement of a Boolean function F(A,B,C,...) denoted as F′ or F‾, is obtained by swapping 0s and 1s in its truth
table or applying De Morgan’s Theorem to its Boolean expression.

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

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:

(a) Canonical Sum of Products (SOP) – Minterm Expansion

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.

Notation: F= ∑ m(i), where I represents the minterm indices.


Example: Assume 3 variables (A, B, C), and j=3. Then, bj = 011 and its corresponding minterm is denoted
by mj = A’BC
where j is the decimal equivalent of the minterm’s corresponding binary combination (bj).
A variable in mj is complemented if its value in bj is 0, otherwise is uncomplemented
Given the truth table:

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

(b) Canonical Product of Sums (POS) – Maxterm Expansion

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.

Notation: F=∏ M(i), where i represents the maxterm indices.

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.

(a) Standard Sum of Products (SOP)

Contains ANDed terms (products) ORed together.

Unlike canonical SOP, each term may not include all variables.

F(A,B,C)=AB+BC

(b) Standard Product of Sums (POS)

Contains ORed terms (sums) ANDed together

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 second term B‟C is missing one variable; hence,


B‟C = B‟C(A + A‟) = AB‟C + A‟B‟C

Combining all terms, we have

F = A + B‟C = ABC + ABC‟ + AB‟C + AB‟C‟ + AB‟C + A‟B‟C

But AB‟C appears twice, and


according to theorem 1 (x + x = x), it is possible to remove one of those occurrences.
Rearranging the minterms in ascending order, we finally obtain

F = A‟B‟C + AB‟C‟ + AB‟C + ABC‟ + ABC


= m1 + m4 + m5 + m6 + m7
SOP is represented as Sigma(1, 4, 5, 6, 7)
Example
Convert the following Boolean function into Standard PoS form.
f=(p+q+r)⋅(p+q+r′)⋅(p+q′+r)⋅(p′+q+r)

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

Simplify the logic circuit shown in Figure

The first step is to determine the expression for the output

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

Simplify the circuit of Figure

Simplification Methods (K-Map, Quine-McCluskey Method)

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.

2. Karnaugh Map (K-Map)

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

A tabular method for systematic simplification

Suitable for more than 6 variables

The Quine–McCluskey method has exponential complexity.

Karnaugh Map (K-Map)

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.

K-maps for the Sum-of-Products Expansions

EXAMPLE 2 Simplify the sum-of-products expansions given in Example-1.

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.

K-maps in Three Variables

Example-3 illustrate show K-maps in three variables are used.


Use K-maps to minimize these sum-of-products expansions.

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

You might also like