Digital Electronics
UNIT-I
Dr G.Ravi kumar
Professor
Electrical and Electronics Engineering
Bapatla Engineering college
Bapatla
February 13, 2025
Page 1
Digital Signal & Characteristics
Digital signal is a representation of data using discrete values, typically
binary (0 and 1), to encode information. Digital signals switch between
distinct levels of modern computing and communication technologies.
Discrete Levels: Digital signals have specific, predefined levels. The
most common is binary encoding, where 0 represents a LOW state,
and 1 represents a HIGH state. Each state corresponds to a voltage
level in hardware systems.
Square Wave Representation: A digital signal is often visualized as
a square wave, alternating between its two levels over time. The
transitions represent changes in the data being transmitted or
processed.
Time Synchronization: Digital systems rely on clock signals to
synchronize transitions, ensuring accurate interpretation of the data.
Noise Immunity: Digital signals are robust against noise. Even if the
signal is slightly distorted, the discrete nature of the levels helps the
system correctly identify 0 or 1.
Page 2
Advantages of Digital Signals
Precision: Digital signals are highly accurate because they use
discrete levels, minimizing errors caused by small distortions or noise.
Ease of Manipulation: Digital signals are easy to process, store, and
transmit. Techniques such as error correction and data compression
are straightforward in digital systems.
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.
Compatibility: Digital signals integrate seamlessly with computers,
microprocessors, and other digital systems, making them ideal for
modern technology.
Page 3
Applications of Digital Signals
Communication Systems: Digital signals are used in mobile phones,
Wi-Fi, and satellite communication to transmit voice, video, and data.
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.
Embedded Systems: Microcontrollers and embedded devices rely
heavily on digital signals for operations and interfacing.
Page 4
Key Components of Digital Circuits
Logic Gates: Basic building blocks of digital circuits that perform
logical operations like AND, OR, NOT, NAND, NOR, XOR, and
XNOR. They combine to implement complex logic functions.
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.
Combinational Circuits: Outputs depend only on the current inputs.
Examples include adders, multiplexers, and encoders.
Sequential Circuits: Outputs depend on current inputs and the
history of inputs (stored state). Examples include counters, shift
registers, and finite state machines.
Microprocessors and Microcontrollers: Combine multiple digital
components to process data and control systems.
Page 5
Digital circuits
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.
Characteristics of Digital Circuits
Discrete Signals: Operate using binary logic (0 and 1) represented
by distinct voltage levels, reducing ambiguity.
Noise Immunity: Less susceptible to noise compared to analog
circuits.
Scalability: Easy to scale for complex operations by combining basic
components.
High Reliability: Provide consistent and error-free performance.
Page 6
Advantages of Digital Circuits
Precision and Accuracy: Binary representation reduces errors and
ensures consistent output.
Ease of Design: Modular design simplifies implementation and
troubleshooting.
Integration: Millions of components can be integrated into a single
chip (VLSI technology).
Reprogrammability: Digital circuits can support software-based
reconfigurations.
Applications of Digital Circuits
Computing: Found in CPUs, GPUs, and other computational
devices.
Communication Systems: Used in modems, routers, and wireless
communication systems.
Data Storage: Integral to SSDs, RAM, and hard drives.
Consumer Electronics: Power smartphones, TVs, and gaming
consoles.
Control Systems: Used in robotics, automation, and embedded
systems. Page 7
Logical Operations
AND Operation: The AND operation outputs 1 only when both inputs
are 1, otherwise, 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: AND Gate
Figure: Truth Table for AND
Page 8
OR Operation: The OR operation outputs 1 if at least one input is 1. It
only outputs 0 if both inputs are 0. A + B = Y
A B A OR B
0 0 0
0 1 1
1 0 1
Figure: OR Gate 1 1 1
Figure: Truth Table for OR
Page 9
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
Figure: NOT Gate Figure: Truth Table for NOT
Page 10
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
A B A NAND B
0 0 1
0 1 1
1 0 1
Figure: NAND Gate
1 1 0
Figure: Truth Table for NAND
Page 11
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
A B A NOR B
0 0 1
0 1 0
1 0 0
Figure: NOR Gate 1 1 0
Figure: Truth Table for NOR
Page 12
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.
Page 13
Figure: Realisation of Basic Logic Operations Using NAND and NOR Gates (a)
NOT (b) OR (c) AND
Page 14
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: XOR Gate
Figure: Truth Table for XOR
Page 15
Applications of Logic Gates
AND Gate: Decision-making (e.g., security systems).
OR Gate: Any true condition (e.g., fire alarm).
NOT Gate: Signal inversion.
NAND/NOR Gates: Universal gates used to simplify circuits.
XOR Gate: Error detection and correction (e.g., parity check).
Page 16
Boolean Algebra
Boolean algebra is a branch of algebra that deals with binary variables and
logical operations. It is fundamental to the design and operation of digital
circuits, logic gates, and computer systems.
Basic Operations
Boolean algebra includes three basic operations:
1 AND Operation (A · B): The result is 1 only if both A and B are 1.
2 OR Operation (A + B): The result is 1 if either A or B is 1.
3 NOT Operation (A): The result is the negation of A.
(
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
Page 17
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
Page 18
Laws of Boolean Algebra
The following laws help simplify Boolean expressions:
Identity Law: A · 1 = A, A + 0 = A
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
Double Negation Law: A = A
Distributive Law: A · (B + C ) = A · B + A · C ,
A + (B · C ) = (A + B) · (A + C )
Page 19
Applications of Boolean Algebra
Boolean algebra is widely used in:
Digital Circuit Design: For designing logic gates like AND, OR,
NOT, and complex systems like adders, multiplexers, etc.
Computer Science: In algorithms, decision-making, data structures,
and search engines.
Error Detection and Correction: Used in communication systems
to detect and correct errors in data transmission.
Page 20
Problem 1: Simplifying Boolean Expression
(A + B) · (A + B)
Solution:
Step 1: Apply the Distributive Law :
(A + B) · (A + B) = A · A + A · B + B · A + B · B
Step 2: Apply the Idempotent Law : = A + A · B + B · A + B · B
Step 3: Apply the Complement Law : = A + A · B + B · A
Step 4: Factor out A: = A · (1 + B + B)
Step 5: Apply the Complement Law : = A · (1 + 1) = A · 1
Step 6: Apply the Identity Law := A
Thus, the simplified Boolean expression is A
Page 21
Problem 2: Finding the Output of a Boolean Expression
Given the Boolean expression:
F = (A + B) · (A + C )
Find the output for the following inputs:
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
(A + C ) = 1 + 1 = 1
F = (A + B) · (A + C ) = 1 · 1 = 1
Page 22
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.
Page 23
Problem 3: Constructing a Truth Table
Construct the truth table for the Boolean expression:
F = A · (B + C )
Solution:
The truth table for the Boolean expression F = A · (B + C ) is as follows:
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
Page 24
Problem 4: Solving a Boolean Equation
Solve the Boolean equation for X :
X =A·B +A·C
Given A = 1, B = 0, C = 1.
Solution:
1. Evaluate A · B:
A·B =1·0=0
2. Evaluate A:
A=1=0
3. Evaluate A · C :
A·C =0·1=0
4. Now, evaluate the final result:
X =A·B +A·C =0+0=0
Thus, the value of X is 0 when A = 1, B = 0, C = 1.
Page 25
Problem 5: Boolean Expression with Multiple Variables
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
Page 26
Number Systems in Digital Electronics
Number systems are essential in digital electronics, as computers and other
digital systems primarily operate on binary. The main number systems
used are binary, signed binary, octal, and hexadecimal. Below is a
breakdown of each number system.
1. Binary Number System
Base: 2
Digits Used: 0 and 1
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
Page 27
2. Signed Binary Numbers
Base: 2
Digits Used: 0 and 1 (with a sign bit)
Description: Signed binary numbers are used to represent both
positive and negative values. The most common method is to use
two’s complement representation, where the leftmost bit (sign bit)
indicates whether the number is positive (0) or negative (1).
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 .
Decimal Binary (Two’s Complement)
+9 00001001
−9 11110111
+5 00000101
−5 11111011
Page 28
3. Octal Number System
Base: 8
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: 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 .
Power of 8 Octal Representation
80 1
8 1 10
82 100
83 1000
8 4 10000
Page 29
4. Hexadecimal Number System
Base: 16
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.
Example:Converting Decimal 254 to Hexadecimal:
1 254 ÷ 16 = 15 remainder 14 (14 is represented as F)
2 15 ÷ 16 = 0 remainder 15 (15 is represented as F)
Thus, 25410 = FE16 .
Power of 16 Hexadecimal Representation
160 1
16 1 10
162 100
163 1000
16 4 10000
Page 30
Summary of Conversions
Decimal Binary Octal Hexadecimal
9 10012 118 916
65 10000012 1018 4116
254 111111102 3768 FE16
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
Page 31
One’s and Two’s Complement Arithmetic
One’s Complement One’s complement is obtained by flipping all bits:
Binary: 10102 One’s Complement: 01012
Two’s Complement Two’s complement is obtained by adding 1 to the
one’s complement:
Binary: 10102 One’s Complement: 01012 Two’s Complement: 01102
Codes
1. Excess-3 Code Excess-3 code is obtained by adding 3 to the binary
representation: Decimal: 5 Binary: 01012 Excess-3: 10002
Decimal Binary Excess-3 Code
0 0000 0011
1 0001 0100
2 0010 0101
3 0011 0110
4 0100 0111
5 0101 1000
Page 32
2. Gray Code: Gray code is obtained where two successive values differ
by only one bit: Binary: 10102 Gray Code: 11112
Binary Gray Code
0000 0000
0001 0001
0010 0011
0011 0010
0100 0110
0101 0111
Error Detecting and Correcting Codes
1. Error Detecting Codes
Parity Check Parity bits are added to data to detect errors:
Even Parity: Ensures the total number of 1’s (including the parity
bit) is even.
Odd Parity: Ensures the total number of 1’s (including the parity
bit) is odd.
Example: Data: 1010 Parity Bit (Even): 1 Transmitted Code: 10101
Page 33
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.
Cyclic Redundancy Check (CRC): CRC uses polynomial division to
detect errors. A checksum is generated by dividing the data polynomial by
a generator polynomial.
2. Error Correcting Codes
Hamming Code: Hamming codes detect and correct single-bit errors.
The number of parity bits p is determined using:
2p ≥ m + p + 1
Where m is the number of data bits.
Example: For 4 data bits (m = 4):
Data: 1011 Parity Bits: P1, P2, P4
Encoded as:
P1, P2, D1, P4, D2, D3, D4
Page 34
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
ParityCheck Yes No
Checksum Yes No
HammingCode Yes Single-Bit
Reed − Solomon Yes Burst Errors
BCHCode Yes Multiple Errors
ConvolutionalCode Yes Real-Time
Page 35
Digital IC Characteristics & Logic Families
1. Characteristics of Digital ICs
Speed: Measured by propagation delay (tpd ), typically in
nanoseconds (ns).
Power Dissipation: Power consumed in milliwatts (mW).
Noise Margin: The maximum noise voltage a circuit can tolerate.
Fan-In: Number of inputs a gate can handle.
Fan-Out: Number of output connections a gate can drive.
Logic Levels: Voltage ranges for logic ”0” and ”1.”
Integration Level: SSI, MSI, LSI, VLSI.
2. Digital Logic Families
Transistor-Transistor Logic (TTL): Fast, reliable.
CMOS Logic: Low power, high noise immunity, used in 4000 series.
Schottky TTL: Improved speed with Schottky diodes.
Emitter-Coupled Logic (ECL): High speed, high power
consumption.
BiCMOS: Combines benefits of BJTs and CMOS.
Page 36
3. TTL (Transistor-Transistor Logic)
Voltage Levels: Logic ”1” (2.4 − 5V ), Logic ”0” (0 − 0.8V ).
Advantages: Robust, widely available.
Limitations: Higher power consumption compared to CMOS.
4. Schottky TTL
Features: Enhanced speed with Schottky diodes, lower propagation
delay.
Applications: High-speed digital circuits.
5. CMOS Logic
Features: Low power consumption, wide operating voltage, high
noise immunity.
Advantages: Suitable for battery-powered devices.
Limitations: Slower than TTL at high frequencies.
6. Interfacing CMOS and TTL
Challenges: Different voltage levels for logic ”1” and ”0.”
Solutions: Use pull-up resistors or level-shifting circuits.
Page 37
7. Tri-State Logic
Features: Three states: logic ”1,” logic ”0,” and high-impedance
(Z ).
Applications: Used in bus systems for microprocessors and memory.
Page 38