Digital Logic Design
My background
▪ B.E. from Rajiv Gandhi Proudyogiki Vishwavidyalaya (RGPV) Bhopal,
India
▪ [Link]. from Maulana Azad National Institute of Technology (NIT)
Bhopal, India
▪ Ph.D. from Indian Institute of Technology (IIT) Jodhpur, India
▪ Postdoc. from Hanyang University Seoul, South Korea
▪ Postdoc. From National Cheng Kung University (NCKU) Tainan, Taiwan
Digital Logic Design
Instructions 75% attendance is must
Digital Logic Design
Syllabus
Module-1: Number System and Codes
Number system & Boolean algebra, number systems: Binary, Arithmetic, Octal,
Hexadecimal & radix conversion. Binary codes:BCD, excess three, Gray, display
ASCII, EBCDIC, Parity check codes, Code conversion. Boolean algebra:
theorems, Introduction to logic gates, NAND, NOR realization, Boolean laws &
theorems. Simplification of Boolean expression, Sum of product & Product of
sum forms, concept of minterms &maxterms, minimization techniques,
Karnaugh's MAP method, Tabulation method.
Digital Logic Design
Syllabus
Module-2: Combinational logic circuits
Combinational circuits, Half adder, Full adder, Subtractor, BCD adder,
Multiplexer & demultiplexer, Encoder & Decoder circuits.
Module-3: Sequential logic circuits with their applications
Storage elements: latches & flip-flops, Characteristic Equations of flip-flops,
flip-flop conversion, Shift Registers, Ripple Counters, Synchronous Counters,
Other Counters: Johnson & Ring Counter.
Digital Logic Design
Syllabus
Module-4: Synchronous & Asynchronous Sequential Circuits
Analysis of clocked sequential circuits with state machine designing, State
reduction and assignments, Design procedure, Analysis procedure of
Asynchronous sequential circuits, Circuit with latches.
Module-5: Digital Logic Families with circuit implementation
Introduction to logic families, RTL, DTL, TTL, ECL, NMOS,NCMOS, logic, etc.
Digital Logic Design
Prerequisites
Fundamentals of Electrical and Electronics
(IT-1004/MTC-1004/PHY-1004)
Digital Logic Design
Course Learning Objectives
1. To discuss the basic knowledge of gates, number systems, and their
Arithmetic, Computer Codes.
2. To analyze the principles of combinational logic circuits, including their
design and operation.
3. To describe sequential logic circuits, encompassing flip-flops, state transitions,
and timing analysis.
4. To evaluate the performance and characteristics of various logic families in
practical circuit designs.
Digital Logic Design
Course Learning Outcomes
1. Apply concepts of the Digital Binary System and the implementation of Gates.
2. Describe principles of combinational logic circuits, including logic gates, truth
tables, and design techniques.
3. Explain sequential logic circuits, encompassing flip-flops, state machines, and
design techniques.
4. Discuss synchronous and asynchronous sequential circuits, including their
design, operation, and practical applications.
5. Demonstrate the ability to synthesize and evaluate digital logic components.
Digital Logic Design
Textbooks and Reference Books
Digital Logic Design
Evaluation Scheme
Assessments Internal External
Continuous assessments 10.00 0.00
Mini test 10.00 0.00
Mid term 20.00 0.00
End semester 0.00 60.00
Digital Logic Design
Motivation
In science, technology, business, and, in fact, most other fields of endeavor, we
are constantly dealing with quantities. Quantities are measured, monitored,
recorded, manipulated arithmetically, observed, or in some other way utilized in
most physical systems. It is important when dealing with various quantities that
we be able to represent their values efficiently and accurately. There are
basically two ways of representing the numerical value of quantities: analog and
digital.
Digital Logic Design
Analog Representation
In analog representation a quantity is represented by a voltage, current, or meter
movement that is proportional to the value of that quantity. Analog quantities
such as those cited above have an important characteristic: they can vary over a
continuous range of values. Below is a diagram of analog voltage vs time:
Digital Logic Design
Digital Representation
In digital representation, the quantities are represented not by proportional
quantities but by symbols called digits. As an example, consider the digital
watch, which provides the time of day in the form of decimal digits that represent
hours and minutes (and sometimes seconds). As we know, the time of day
changes continuously, but the digital watch reading does not change
continuously; rather, it changes in steps of one per minute (or per second). In
other words, this digital representation of the time of day changes in discrete
steps, as compared with the representation of time provided by an analog watch,
where the dial reading changes continuously. Below is a diagram of digital
voltage vs. time:
Digital Logic Design
Digital Logic Design
Analog and Digital System
Analog System Digital System
Signal Continuous, varying smoothly over time Discrete, defined at specific points in time
(e.g., sound waves, temperature). (sampled) and discrete values (binary 0s and
1s).
Representation Direct representation of physical Coded as binary numbers (pulses).
quantities (e.g., voltage proportional to
sound).
Components Resistors, capacitors, inductors, op-amps. Logic gates, microprocessors, memory chips.
Characteristics Simple, lower bandwidth, high resolution, High noise immunity, better accuracy, easy
less complex storage, but highly to process/store/transmit, flexible, but
susceptible to noise and distortion. requires ADCs/DACs for real-world
interaction and more bandwidth.
Examples Traditional radios, analog clocks, Computers, smartphones, CDs, digital
thermometers, older telephones. watches, modern communication.
Digital Logic Design
Advantages of Digital system over Analog system
1. Ease of programmability: The digital systems can be used for different
applications by simply changing the program without additional changes in
hardware.
2. Reduction in cost of hardware: The cost of hardware gets reduced by use
of digital components and this has been possible due to advances in IC
technology. With ICs the number of components that can be placed in a given
area of
Silicon are increased which helps in cost reduction.
3. High speed: Digital processing of data ensures high speed of operation
which is possible due to advances in Digital Signal Processing.
4. High Reliability: Digital systems are highly reliable one of the reasons for
that is use of error correction codes.
Digital Logic Design
Advantages of Digital system over Analog system
5. Design is easy: The design of digital systems which require use of Boolean
algebra and other digital techniques is easier compared to analog designing.
6. Result can be reproduced easily: Since the output of digital systems unlike
analog systems is independent of temperature, noise, humidity and other
characteristics of components the reproducibility of results is higher in digital
systems than in analog systems.
Digital Logic Design
Disadvantages of Digital Systems
• Use more energy than analog circuits to accomplish the same tasks, thus
producing more heat as well.
• Digital circuits are often fragile, in that if a single piece of digital data is lost
or misinterpreted the meaning of large blocks of related data can completely
change.
• Digital computer manipulates discrete elements of information by means of
a binary code.
• Quantization error during analog signal sampling.
Digital Logic Design
Key Perspective of Digital Electronics
Conversion: Digital electronics bridge the gap by using ADCs to sample analog
signals and DACs to convert digital back to analog, enabling the digital world to
interact with the analog real world.
Processing Power: Digital systems excel at complex tasks like data processing,
error correction, and encryption due to their algorithmic nature, making them the
foundation of modern technology.
Digital Logic Design
Digital Communication
Digital Logic Design
Number System
A number system relates quantities and symbols. In a digital system, how
information is represented is key, and there are different radices, i.e. number
bases, that a numbering system can use.
Any class of devices capable of solving problems by processing information in
discrete form. It operates on data, including letters and symbols, that are
expressed in binary form i.e using only two digits 0 and 1.
Digital Logic Design
Number System
The block diagram of digital computer is given below:
Digital Logic Design
Number System Representation
It can have different base values like: binary (base-2), octal (base-8), decimal
(base 10), and hexadecimal (base 16),here the base number represents the
number of digits used in that numbering system. As an example, in decimal
numbering system the digits used are: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. Therefore the
digits for binary are: 0 and 1, the digits for octal are: 0, 1, 2, 3, 4, 5, 6 and 7. For
the hexadecimal numbering system, base 16, the digits are: 0, 1, 2, 3, 4, 5, 6, 7,
8, 9, A, B, C, D, E, F.
Digital Logic Design
Number System Representation
Numbers that contain only two digit 0 and 1 are called Binary Numbers. Each 0 or 1 is
called a Bit, from binary digit. A binary number of 4 bits is called a Nibble. A binary
number of 8 bits is called a Byte. A binary number of 16 bits is called a Word on some
systems, on others a 32-bit number is called a Word while a 16-bit number is called a
Halfword.
▪ Using 2 bit 0 and 1 to form
▪ a binary number of 1 bit, numbers are 0 and 1
▪ a binary number of 2 bit, numbers are 00, 01, 10, 11
▪ a binary number of 3 bit, such numbers are 000, 001, 010, 011, 100, 101, 110, 111
▪ a binary number of 4 bit, such numbers are 0000, 0001, 0010, 0011, 0100, 0101,
0110, 0111, 1000, 1001, 1010, 1011, 1100,1101,1110,1111
Digital Logic Design
Number Base Conversions
Digital Logic Design
Base-r Numbers to Decimal
Digital Logic Design
Base-r Numbers to Decimal
Digital Logic Design
Special Power of 2
Digital Logic Design
Digital Logic Design
Summary of Number Base Conversions
Digital Logic Design
Decimal to Binary
Digital Logic Design
Decimal Fraction Number to Binary
Digital Logic Design
Decimal to Octal Conversion
Digital Logic Design
Decimal Fraction Number to Octal
Digital Logic Design
Numbers with Different Bases
Digital Logic Design
Binary to Octal Number
Digital Logic Design
Octal or Hexadecimal to Binary Number
Digital Logic Design
Binary Arithmetic Operations
Digital Logic Design
Binary Arithmetic Operations
Digital Logic Design
Complements of Numbers
Digital Logic Design
Complements of Numbers
Digital Logic Design
Subtraction with Complements
Digital Logic Design
10’s Complement Subtraction
Digital Logic Design
10’s Complement Subtraction
Digital Logic Design
2’s Complement Subtraction
Digital Logic Design
1’s Complement Subtraction
Digital Logic Design
Signed Binary Numbers
Digital Logic Design
Digital Logic Design
Arithmetic Addition with Signed Binary Numbers
Digital Logic Design
Arithmetic Addition with Signed Binary Numbers
Digital Logic Design
Arithmetic Subtraction
Digital Logic Design
Arithmetic Subtraction
Digital Logic Design
Classification of Codes
Weighted Codes
Non-Weighted Codes
Alphanumeric Codes
Error Detecting and Correcting Codes
Reflective codes
Digital Logic Design
Weighted Codes
Weighted binary codes are those binary codes which obey the positional weight
principle. Each position of the number represents a specific weight. Several
systems of the codes are used to express the decimal digits 0 through 9. In these
codes each decimal digit is represented by a group of four bits.
Digital Logic Design
Weighted Codes
Digital Logic Design
Non-Weighted Codes
In this type of binary codes, the positional weights are not assigned. The examples
of non-weighted codes are Excess-3 code and Gray code.
Digital Logic Design
Alphanumeric Codes
The alphanumeric codes are the codes that represent numbers and alphabetic
characters. The following three alphanumeric codes are very commonly used for
the data representation.
American Standard Code for Information Interchange (ASCII).
Extended Binary Coded Decimal Interchange Code (EBCDIC).
ASCII code is a 7-bit code whereas EBCDIC is an 8-bit code. ASCII code is more
commonly used worldwide while EBCDIC is used primarily in large IBM
computers.
Digital Logic Design
Error Detection and Correction Code
These codes are used to detect and correct the error bits in the received bit
stream. Parity bits, hamming code are examples of error detection and correction
codes.
Digital Logic Design
Reflective codes
A code is reflective when the code is self-complementing. In other words, when
the code for 9 is the complement the code for 0, 8 for 1, 7 for 2, 6 for 3 and 5 for
4. Ex. Excess-3 code and the 2421 code.
Digital Logic Design
Binary Coded Decimal
• Decimal 396 is represented in BCD with 12 bits
as 0011 1001 0110, with each group of 4 bits
representing one decimal digit.
• A decimal number in BCD is the same as its
equivalent binary number only when the
number is between 0 and 9.
• A BCD number greater than 10 looks different
from its equivalent binary number, even though
both contain 1's and 0’s.
• The binary combinations 1010 through 1111
are not used and have no meaning in BCD.
Digital Logic Design
BCD Conversion and Addition
Digital Logic Design
Digital Logic Design
Excess-3 Code
It is a non-weighted BCD code. Each binary codeword is the corresponding 8421
codeword plus 0011(3). It is a sequential code & therefore, can be used for
arithmetic operations. It is a self-complementing code. So the subtraction by the
method of compliment addition is more direct in the XS-3 code than that in 8421
code. The XS-3 code has six invalid states 0000, 0001, 0010,1101,1110,1111. It
has interesting properties when used in addition & subtraction. The XS-3 Code
are obtained as follows:
Digital Logic Design
Excess-3 Code
Digital Logic Design
Excess-3 Addition
Digital Logic Design
Gray Code
• Gray code changes only one bit in the code
group going from one number to the next.
• For example, going from 7 to 8, the Gray
code changes from 0100 to 1100. Only the
first bit changes, from 0 to 1; the other three
bits remain the same.
• If binary numbers are used, a change, for
example, from 0111 to 1000 may produce
an intermediate erroneous number 1001 if
the value of the rightmost bit takes longer to
change than do the values of the other three
bits.
Digital Logic Design
Gray Code
Digital Logic Design
ASCII Character Code
• Digital computers handle not only the numbers, but also other characters or symbols, such as
the letters of the alphabet.
• An alphanumeric character set is a set of elements that includes the 10 decimal digits, the 26
letters of the alphabet, and a number of special characters. Such a set contains between 36 and 64
elements if only capital letters are included, or between 64 and 128 elements if both uppercase
and lowercase letters are included.
• The American Standard Code for Information Interchange (ASCII) uses seven bits to code
128 characters.
• The 7 bits of the code are designated by b1 through b7, with b7 the most significant bit.
• The letter A, for example, is represented in ASCII as 1000001 (column 100, row 0001).
• The ASCII code also contains 94 graphic characters that can be printed and 34 nonprinting
characters used for various control functions.
• The graphic characters consist of the 26 uppercase letters (A through Z), the 26 lowercase
letters (a through z), the 10 numerals (0 through 9), and 32 special printable characters, such as
%, *, and $.
Digital Logic Design
ASCII
Character
Set
Digital Logic Design
ASCII
Control
Characters
Digital Logic Design
EBCDIC Code
EBCDIC stands for Extended Binary Coded Decimal Interchange Code which is a
legacy encoding system.
•It's an encoding system that is used to encode 8 bits, because of 8 bit we can assign
numeric values from 0 to 255 to different alphabetic, numeric, punctuation, control,
and other special characters that are used in computing, communications, and text.
•It was an improvement to the older.
•EBCDIC was used in IBM mainframe systems in 1964. This allows machines to store
and transmit textual information efficiently using the 8-bit format.
•Now ASCII and Unicode encodings are mostly used but in some mainframes still
utilize EBCDIC.
Digital Logic Design
Additional Information on Character Codes
Character encoding is fundamental to how computers handle text. Different encoding
standards exist because they were developed at different times for different purposes and
machines.
•ASCII: A widely used standard, originally 7-bit, now often seen in 8-bit extensions (like
Latin-1).
•EBCDIC: Historically significant for IBM systems, less common now in general-
purpose computing compared to ASCII or Unicode.
•Unicode: A modern standard designed to include characters from all writing systems. It
uses variable numbers of bits (like UTF-8, UTF-16, UTF-32) to represent characters,
supporting millions of possibilities.
Digital Logic Design
Parity Check Codes
The simplest techniques for detecting errors is that of adding an extra bit known as
parity bit to each word being transmitted. Two types of parity: Odd parity, even parity
for odd parity, the parity bit is set to a ‗0‘ or a ‗1‘ at the transmitter such that the total
no. of 1 bit in the word including the parity bit is an odd no. For even parity, the parity
bit is set to a ‗0‘ or a ‗1‘ at the transmitter such that the parity bit is an even no.
Digital Logic Design
Parity Check Codes
0101
Digital Logic Design
Parity Check Codes
When the digit data is received . a parity checking circuit generates an error signal if the
total no of 1‘s is even in an odd parity system or odd in an even parity system. This
parity check can always detect a single bit error but cannot detect 2 or more errors with
in the same word. Odd parity is used more often than even parity does not detect the
situation. Where all 0‘s are created by a short ckt or some other fault condition.
Digital Logic Design
Parity Check Codes
Digital Logic Design
Decimal to XS-3 conversion
Digital Logic Design
Gray to Binary conversion
• MSB of the gray code is same as binary number. So write the MSB as it is.
• Add the MSB of the output with bit immediately on right in input and record
the sum. If a carry is generated it is ignored.
• Continue adding the bits in the output to immediate input bit in right till the
LSB is reached.
• The binary equivalent has same number of bits as the gray code.
• This can be achieved by using X-OR gate.
Digital Logic Design
Gray to Binary conversion
Digital Logic Design
Binary to Gray conversion
• MSB of the binary is same as MSB of gray code.
• Add the MSB of binary with immediate bit to right in binary and that is the
next gray bit. If a carry is generated it is ignored.
• Repeat the procedure till the LSB is reached.
Digital Logic Design
Binary to Gray conversion
Digital Logic Design
Introduction to Logic Gates
A logic gate is an elementary building block of a digital circuit. Most logic gates
have two inputs and one output and at any given moment, every terminal is in one
of the two binary conditions either low (0) or high (1), represented by different
voltage levels. The logic state of a terminal change often, as the circuit processes
data. In most logic gates, the low state is approximately zero volts (0 V), while the
high state is approximately five volts positive (+5 V). There are seven basic logic
gates: AND, OR, XOR, NOT, NAND, NOR, and NOR.
Digital Logic Design
AND Gate
The AND gate is so named because, if 0 is called "false" and 1 is called "true," the
gate acts in the same way as the logical "and" operator. The following illustration
and table show the circuit symbol and logic combinations for an AND gate. (In
the symbol, the input terminals are at left and the output terminal is at right.) The
output is "true" when both inputs are "true." Otherwise, the output is "false."
Digital Logic Design
OR Gate
The OR gate gets its name from the fact that it behaves after the fashion of the
logical inclusive "or." The output is "true" if either or both of the inputs are "true."
If both inputs are "false," then the output is "false."
Digital Logic Design
NOT Gate
A logical inverter, sometimes called a NOT gate to differentiate it from other
types of electronic inverter devices, has only one input. It reverses the logic state.
Digital Logic Design
Digital Logic Design
Multiple-Input Gates
Digital Logic Design
XOR Gate
The XOR (Exclusive-OR) gate acts in the same way as the logical "either/or." The
output is "true" if either, but not both, of the inputs are "true." The output is
"false" if both inputs are "false" or if both inputs are "true." Another way of
looking at this circuit is to observe that the output is 1 if the inputs are different,
but 0 if the inputs are the same.
Digital Logic Design
NAND Gate
The NAND gate operates as an AND gate followed by a NOT gate. It acts in the
manner of the logical operation "and" followed by negation. The output is "false"
if both inputs are "true." Otherwise, the output is "true."
Digital Logic Design
NOR Gate
The NOR gate is a combination OR gate followed by an inverter. Its output is
"true" if both inputs are "false." Otherwise, the output is "false."
Digital Logic Design
XOR Gate
The XOR (Exclusive-OR) gate acts in the same way as the logical "either/or." The
output is "true" if either, but not both, of the inputs are "true." The output is
"false" if both inputs are "false" or if both inputs are "true." Another way of
looking at this circuit is to observe that the output is 1 if the inputs are different,
but 0 if the inputs are the same.
Digital Logic Design
XNOR Gate
The XNOR (exclusive-NOR) gate is a combination XOR gate followed by an
inverter. Its output is "true" if the inputs are the same and “false" if the inputs are
different.
Digital Logic Design
Universal Gate
A universal gate is a gate which can implement any Boolean function without
need to use any other gate type. The NAND and NOR gates are universal gates. In
practice, this is advantageous since NAND and NOR gates are economical and
easier to fabricate and are the basic gates used in all IC digital logic families. In
fact, an AND gate is typically implemented as a NAND gate followed by an
inverter not the other way around!! Likewise, an OR gate is typically
implemented as a NOR gate followed by an inverter not the other way around!!
Digital Logic Design
Digital Logic Design
Digital Logic Design
Boolean Algebra
Boolean Algebra
–Axioms of Boolean Algebra
–Single Variable Theorem
–Two and Three variable Properties
–Complements and Duals
Digital Logic Design
Boolean Algebra
Digital Logic Design
Boolean Algebra:Axioms
Digital Logic Design
Boolean Algebra: Single Variable Theorems
Digital Logic Design
Principle of Duality
Digital Logic Design
Boolean Algebra: Two & Three variable Properties
Digital Logic Design
Boolean Algebra: Two & Three variable Properties
Digital Logic Design
Boolean Algebra: DeMorgans Theorem
Digital Logic Design
Proof of DeMorgan’s Theorem using TruthTable
Digital Logic Design
Simplification of Boolean Functions
Digital Logic Design
Simplification of Boolean Functions
Digital Logic Design
Canonical Form
A Boolean function can be represented in one of the following methods:
Truth Table
Logic Circuit
SOP expression
POS expression
Digital Logic Design
SOP (Sum of product expression):
It is the sum of all product term of each input combination for which the output is
high (logic ‘1’). Each product term of SOP expression is known as a minterm.
Minterms are ORed to get the Boolean expression. For a given truth table, the
minterm and SOP expression can be written as
Digital Logic Design
SOP (Sum of product expression):
Digital Logic Design
SOP (Sum of product expression):
Represent the given truth table in SOP form
Digital Logic Design
SOP (Sum of product expression):
Represent the given truth table in SOP form
Digital Logic Design
Product of Sum expression(POS):
It is the product of all sum term of each input combination for which the output
is low (logic ‘0’). Each sum term of POS expression is known as maxterm (M).
Maxterms are ANDed to get the Boolean expression. For a given truth table,
maxterm and POS expression can be written as
Digital Logic Design
Product of Sum expression(POS):
3-variable Truth Table
Digital Logic Design
Product of Sum expression(POS):
Digital Logic Design
Product of Sum expression(POS):
Represent the given truth table in POS form
Digital Logic Design
Product of Sum expression(POS):
Represent the given truth table in POS form
Digital Logic Design
Summary of Minterms and Maxterms