DLD Notes
DLD Notes
Dr G.Ravi Kumar
February 13, 2025
Unit-I
1
Reliable Transmission: Digital data can be transmitted over long distances with
minimal loss. Signal regenerators or repeaters can restore the signal to its original
form.
Data Storage: Storage devices like SSDs, HDDs, and optical discs rely on binary
data representation.
Multimedia: Audio and video are encoded digitally for applications like streaming,
CDs, and DVDs.
Digital circuits are the backbone of modern electronics, enabling the design and
operation of systems that rely on discrete binary signals. These circuits process and store
data in binary form, where 0 and 1 correspond to specific voltage levels. Digital circuits
are integral to computing devices, communication systems, and embedded systems.
Flip-Flops: Used for storage and synchronization. They maintain a binary state
(0 or 1) until changed by an input signal. Commonly used in registers, counters,
and memory devices.
Sequential Circuits: Outputs depend on current inputs and the history of inputs
(stored state). Examples include counters, shift registers, and finite state machines.
2
Characteristics of Digital Circuits
Discrete Signals: Operate using binary logic (0 and 1) represented by distinct
voltage levels, reducing ambiguity.
3
Introduction
In digital logic, logical operations are fundamental for performing computational tasks.
The most commonly used logical operations are AND, OR, NOT, NAND, NOR, and
Exclusive-OR (XOR). These operations form the basis of many circuits and computa-
tional systems.
Logical Operations
AND Operation: The AND operation outputs 1 only when both inputs are 1, other-
wise, it outputs 0. This is a basic operation in digital electronics.
A·B =Y
A B A AND B
0 0 0
0 1 0
1 0 0
1 1 1
Figure 1: AND Gate Figure 2: Truth Table for AND
A B A OR B
0 0 0
0 1 1
1 0 1
1 1 1
Figure 3: OR Gate
Figure 4: Truth Table for OR
NOT Operation: The NOT operation inverts the value of the input. If the input
is 1, it becomes 0, and vice versa.
A=Y
A NOT A
0 1
1 0
NAND Operation: The NAND operation is the inverse of the AND operation. It
outputs 1 in all cases except when both inputs are 1.
A·B =Y
NOR Operation: The NOR operation is the inverse of the OR operation. It outputs
0 in all cases except when both inputs are 0.
A+B =Y
4
A B A NAND B
0 0 1
0 1 1
1 0 1
1 1 0
Figure 7: NAND Gate
Figure 8: Truth Table for NAND
A B A NOR B
0 0 1
0 1 0
1 0 0
1 1 0
Figure 9: NOR Gate
Figure 10: Truth Table for NOR
Universal Gates: These operations have become very popular and are widely used,
the reason being the only one type of gates, either NAND or NOR are suffi cient for the
realisation of any logical expression. Because of this reason, NAND and NOR gates are
known as universal gates.
Figure 11: Realisation of Basic Logic Operations Using NOR Gates (a) NOT (b) OR (c)
AND
5
Figure 12: Realisation of Basic Logic Operations Using NANDOR Gates (a) NOT (b)
OR (c) AND
Exclusive-OR (XOR) Operation: The XOR operation outputs 1 when the inputs
are different, and 0 when they are the same.
A⊕B =Y
A B A XOR B
0 0 0
0 1 1
1 0 1
1 1 0
Figure 13: XOR Gate Figure 14: Truth Table for XOR
Boolean Algebra
Boolean algebra is a branch of algebra that deals with binary variables and logical oper-
ations. It is fundamental to the design and operation of digital circuits, logic gates, and
computer systems.
Basic Operations
Boolean algebra includes three basic operations:
6
(
1 if A = 1 and B = 1
A·B =
0 otherwise
(
1 if A = 1 or B = 1
A+B =
0 if both A = 0 and B = 0
(
1 if A = 0
A=
0 if A = 1
Derived Operations
1. NAND Operation (A NAND B): The negation of the AND operation.
2. NOR Operation (A NOR B): The negation of the OR operation.
3. XOR Operation (A ⊕ B): The output is 1 if and only if A and B are different.
A NAND B = A · B
A NOR B = A + B
A⊕B =A·B+A·B
Null Law: A · 0 = 0, A + 1 = 1
Domination Law: A · A = A, A + A = A
Complement Law: A · A = 0, A + A = 1
Idempotent Law: A · A = A, A + A = A
Distributive Law: A · (B + C) = A · B + A · C, A + (B · C) = (A + B) · (A + C)
7
Problem 1: Simplifying Boolean Expressions
Simplify the following Boolean expression using Boolean algebra laws:
(A + B) · (A + B)
Solution:
(A + B) · (A + B) = A · A + A · B + B · A + B · B
=A+A·B+B·A+B·B
=A+A·B+B·A
= A · (1 + 1) = A · 1
F = (A + B) · (A + C)
1. A = 0, B = 1, C = 1
2. A = 1, B = 0, C = 0
Solution:
For the first case A = 0, B = 1, C = 1:
(A + B) = 0 + 1 = 1
A=0=1
8
(A + C) = 1 + 1 = 1
F = (A + B) · (A + C) = 1 · 1 = 1
For the second case A = 1, B = 0, C = 0:
(A + B) = 1 + 0 = 1
A=1=0
(A + C) = 0 + 0 = 0
F = (A + B) · (A + C) = 1 · 0 = 0
Thus, the output is: - For A = 0, B = 1, C = 1, the output is 1. - For A = 1, B =
0, C = 0, the output is 0.
A B C B + C A · (B + C)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 0 0 0 0
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1
9
Problem 5: Boolean Expression with Multiple Vari-
ables
Simplify the following Boolean expression:
F = A · (B + C) + A · (B + C)
Solution:
1. Factor out (B + C):
F = (A + A) · (B + C)
2. Apply the Complement Law :
A+A=1
3. Simplify the expression:
F = 1 · (B + C) = B + C
Thus, the simplified Boolean expression is F = B + C
Description: The binary number system uses only two digits, 0 and 1. It is the
foundation of all digital systems. In binary, each digit represents a power of 2.
Example:
Decimal: 9 Binary: 10012
Converting Decimal 9 to Binary:
910 = 1 × 23 + 0 × 22 + 0 × 21 + 1 × 20 = 10012
Description: Signed binary numbers are used to represent both positive and neg-
ative values. The most common method is to use two’s complement representa-
tion, where the leftmost bit (sign bit) indicates whether the number is positive (0)
or negative (1).
10
Example: Converting -9 to Signed Binary (in 8 bits)
1. Convert 9 to binary: 00001001
2. Invert all bits: 11110110
3. Add 1: 11110111
Thus, −9 in signed binary (8 bits) is 111101112 .
Digits Used: 0 to 7
Description: The octal number system uses eight digits, ranging from 0 to 7. It is
commonly used in computing as a more compact representation of binary numbers.
Every group of 3 binary digits (bits) can be represented by one octal digit.
Example:
Decimal: 65 Octal: 1018
Converting Decimal 65 to Octal:
1. 65 ÷ 8 = 8 remainder 1
2. 8 ÷ 8 = 1 remainder 0
3. 1 ÷ 8 = 0 remainder 1
Thus, 6510 = 1018 .
Digits Used: 0-9 and A-F (where A=10, B=11, C=12, D=13, E=14, F=15)
Description: The hexadecimal number system uses sixteen digits, 0-9 and A-F.
It is widely used in computing as a more compact representation of binary data.
Every group of 4 binary digits (bits) can be represented by one hexadecimal digit.
11
Example:
Decimal: 254 Hexadecimal: F E16
Converting Decimal 254 to Hexadecimal:
Summary of Conversions
Decimal Binary Octal Hexadecimal
9 10012 118 916
65 10000012 1018 4116
254 111111102 3768 F E16
Binary Arithmetic
1. Binary Addition
Rules:
0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, 1 + 1 = 10 (carry 1).
Example:
10112 + 11012 = 110002
2. Binary Subtraction
Rules:
0 − 0 = 0, 1 − 0 = 1, 1 − 1 = 0, 0 − 1 = 1 (borrow 1).
Example:
11012 − 10112 = 102
12
Two’s Complement
Two’s complement is obtained by adding 1 to the one’s complement:
Codes
1. Excess-3 Code
Excess-3 code is obtained by adding 3 to the binary representation:
2. Gray Code
Gray code is obtained where two successive values differ by only one bit:
Odd Parity: Ensures the total number of 1’s (including the parity bit) is odd.
Example:
13
Checksum
The checksum is calculated by summing binary data values and appending the result to
the transmitted data. The receiver recalculates the checksum to verify integrity.
Reed-Solomon Code
Reed-Solomon codes are block-based error correction codes capable of correcting burst
errors. They are used in CDs, DVDs, and QR codes.
BCH Code
BCH codes can detect and correct multiple errors, making them suitable for advanced
communication systems.
Convolutional Code
Convolutional codes encode data streams in real-time by convolving the input data with
a fixed code.
—
Comparison of Codes
Code Type Error Detection Error Correction
P arityCheck Yes No
Checksum Yes No
HammingCode Yes Single-Bit
Reed − Solomon Yes Burst Errors
BCHCode Yes Multiple Errors
ConvolutionalCode Yes Real-Time
14
Digital IC Characteristics, Logic Families, and Re-
lated Topics
1. Characteristics of Digital ICs
Speed: Measured by propagation delay (tpd ), typically in nanoseconds (ns).
4. Schottky TTL
Features: Enhanced speed with Schottky diodes, lower propagation delay.
5. CMOS Logic
Features: Low power consumption, wide operating voltage, high noise immunity.
15
6. Interfacing CMOS and TTL
Challenges: Different voltage levels for logic ”1” and ”0.”
7. Tri-State Logic
Features: Three states: logic ”1,” logic ”0,” and high-impedance (Z).
2 Question Bank
Q1: What is a digital signal?
Answer: A digital signal is a signal that represents data as discrete levels, typically in
binary form (0s and 1s), rather than a continuous range of values.
Q2: Compare digital signals and analog signals.
Answer:
Digital Signals: Discrete, less affected by noise, easier to process and store, sup-
ports encryption.
1. A + B = A · B.
2. A · B = A + B.
16
Binary: 1011012
Octal: 558
Hexadecimal: 2D16
Q8: Perform binary addition: 10112 + 11012 .
Answer: 10112 + 11012 = 110002 .
Q9: What is the 2’s complement of 11012 ?
Answer: The 2’s complement is found by inverting the bits (0010) and adding 1: 00112 .
Q10: Convert (25)10 to Excess-3 code.
Answer: Convert 2510 to binary: 110012 , then add 3 in binary (011): 11001 + 0011 =
11010. Final Excess-3 code: 11010.
Q11: Explain Gray Code with an example.
Answer: Gray code is a binary numbering system where two successive values differ in
only one bit. Example: Binary 100 → Gray Code: 110.
Q12: What are the main characteristics of digital ICs?
Answer:
Speed (propagation delay)
Power consumption
Noise margin
Fan-in and fan-out
Operating temperature range
Q13: Compare TTL and CMOS logic families.
Answer:
TTL (Transistor-Transistor Logic): High speed, high power consumption, lim-
ited fan-out.
CMOS (Complementary Metal-Oxide-Semiconductor): Low power con-
sumption, high noise immunity, slower speed than TTL.
Q14: What is Schottky TTL?
Answer: Schottky TTL uses Schottky diodes to reduce propagation delay by preventing
transistors from saturating.
Q15: How can CMOS and TTL be interfaced?
Answer: Use a pull-up resistor or a level-shifting circuit to match voltage levels since
CMOS typically operates at higher voltage levels than TTL.
Q16: What is tri-state logic?
Answer: Tri-state logic has three states: HIGH (1), LOW (0), and High Impedance (Z).
The High Impedance state effectively disconnects the circuit from the bus.
Q17: What is the application of tri-state logic?
Answer: Used in bus systems where multiple devices share the same data lines but need
to operate without interfering with each other.
17
Essay Questions
Q1: Explain the concept of digital signals and discuss the advantages of digital circuits
over analog circuits in modern electronics. Provide examples to illustrate your points.
Q2: Describe the operation of basic logic gates (AND, OR, NOT, NAND, NOR, XOR)
with their truth tables and symbolic representations. Explain their importance in digital
circuit design.
Q3: Simplify the Boolean expression A + AB + AB using the laws of Boolean algebra
and describe the real-world application of such simplifications.
Q4: Discuss the significance of different number systems (binary, octal, decimal, and hex-
adecimal) in digital electronics. Provide examples of conversions between these systems
and their applications in computer systems.
Q5: Explain the concept of one’s and two’s complement in binary arithmetic and their
role in signed number representation and operations.
Q6: Write an essay on the importance of error-detecting and correcting codes in digital
communication. Include explanations of parity bits, Hamming codes, and checksum
techniques.
Q7: Compare and contrast Excess-3 and Gray Code, explaining their use cases in digital
systems. Include examples of conversions and explain why certain applications prefer
these codes.
Q8: Discuss the characteristics of digital integrated circuits (ICs) such as speed, power
consumption, noise margin, and fan-out. Compare the performance of TTL and CMOS
logic families with examples.
Q9: Explain the advancements in Schottky TTL and its impact on the performance of
digital circuits.
Q10: Explain the challenges in interfacing CMOS and TTL logic families. Discuss the
methods used to overcome these challenges and ensure compatibility.
Q11: Write an essay on tri-state logic, its operation, and its applications in bus systems
and shared data lines in digital electronics.
18
Unit-II
3. Canonical Forms
Logic functions can also be expressed in their canonical form:
Canonical SOP: Every product term includes all variables, either in true or com-
plemented form.
Canonical POS: Every sum term includes all variables, either in true or comple-
mented form.
Example for Canonical SOP:
F (A, B) = AB + AB + AB.
Example for Canonical POS:
F (A, B) = (A + B)(A + B)(A + B).
19
4. Truth Table Representation
A tabular form that lists all possible input combinations and their corresponding outputs.
Example:
A B F
0 0 0
0 1 1
1 0 1
1 1 1
A\B 0 1
0 0 1
1 0 1
Circuit Diagram: (Not shown in this document, could be drawn with software like TikZ for LaTeX.)
K-map Representation
A Karnaugh Map (K-map) is a graphical representation used to simplify Boolean func-
tions by grouping adjacent cells containing ones (1s) in the truth table.
A B F (A, B)
0 0 0
0 1 1
1 0 0
1 1 1
The corresponding K-map is:
A\B 0 1
0 0 1
1 0 1
20
Example: 3-Variable K-map
For a 3-variable function F (A, B, C), the K-map layout is organized as follows:
AB\C 00 01 11 10
00 F (0, 0, 0) F (0, 0, 1) F (0, 0, 11) F (0, 0, 10)
01 F (0, 1, 0) F (0, 1, 1) F (0, 1, 11) F (0, 1, 10)
11 F (1, 1, 0) F (1, 1, 1) F (1, 1, 11) F (1, 1, 10)
10 F (1, 0, 0) F (1, 0, 1) F (1, 0, 11) F (1, 0, 10)
Example of Simplification
Given F (A, B, C) = Σ(1, 3, 5, 7), the K-map representation is:
AB\C 00 01 11 10
00 0 1 0 0
01 0 1 0 0
11 0 1 1 1
10 0 0 0 1
Simplify by grouping adjacent 1s:
F (A, B, C) = B · C + A · B.
21
Unit-III
22
Unit-IV
6 Semi-conductor memories
Summarize your work.
23