Unit 1 DLD
Unit 1 DLD
Definition
Digital systems are electronic systems that process and manipulate information using discrete or
digital signals, typically represented as '0' and '1'.
Digital systems have become pervasive in our daily lives and include devices like computers,
smartphones, digital cameras, and more. Here's a breakdown of the key aspects:
● Precision: Digital systems offer high precision in data processing and storage. Data is
represented with distinct values ('0' and '1'), making it accurate and reliable.
● Reliability: Digital systems are resistant to noise and signal degradation. This is crucial in
ensuring data integrity, especially in data transmission over long distances.
● Versatility: Digital systems find applications in various fields, including computers,
communication systems, control systems, entertainment, and more. Their versatility arises
from the ability to process and store diverse types of data digitally.
Significance
Understanding digital systems is essential because they form the foundation of modern technology
and computing. Here are some key implications:
● Computing: Digital systems are at the heart of all modern computers, enabling them to
process vast amounts of data quickly and accurately.
● Communication: Digital signals are the basis for all modern communication systems,
including the internet, cell phones, and satellite communications.
● Control Systems: In robotics, automation, and industrial processes, digital systems are
used for precise control and monitoring.
Example
A digital thermometer measures temperature and displays the result in digital format (e.g., 23.5°C).
The thermometer's internal circuitry processes analog temperature data and converts it into a
digital representation for accurate measurement.
2. Signals
A signal is a function that represents the variation of a physical quantity with respect to any
parameter (time or distance).
2
NotesNeo
Signals are representations of information that can take various forms, such as electrical voltage,
sound waves, or light waves. They are used to convey data or communicate information. Signals
can be broadly categorised into two main types: analog signals and digital signals.
1. Analog Signals:
Definition: Analog signals are continuous and vary smoothly over time. They can
take any value within a certain range and can represent a wide range of data,
including audio, video, and physical measurements like temperature or pressure.
Characteristics:
● Continuous variation: An analog signal can take on an infinite number of
values within its range.
● Represented as a continuous waveform: Analog signals are typically
represented as smooth, continuous waveforms.
● Susceptible to noise: Analog signals are more susceptible to interference
and noise, which can degrade signal quality.
2. Digital Signals:
Definition: Digital signals are discrete and take on only a limited number of values,
typically '0' and '1.' They are used to represent information in a binary format. Digital
has been derived from the word digit.
Characteristics:
● Discrete values: Digital signals can take on only a finite number of discrete
values.
● Binary representation: They are represented using binary code, where '0'
represents a low voltage level, and '1' represents a high voltage level.
● Robust against noise: Digital signals are less susceptible to noise and
interference because they have distinct and well-defined voltage levels.
Signal Integrity
Digital signals are robust against noise and distortion, making them ideal for data transmission
over long distances.
Example
3
NotesNeo
In a digital audio cable, the audio signal is converted into a digital format consisting of '0's and '1's.
Despite interference and noise during transmission, the receiving end can accurately reconstruct
the original audio signal because digital signals maintain their integrity.
3. Digital Circuits
Logic Gates
Logic gates are fundamental building blocks of digital circuits in electronics and computer science.
They are devices or circuits that perform logical operations on one or more logical/binary inputs (0
and 1) to produce a single logical/binary output.
Logic gates are essential for processing and manipulating information digitally.
Here are some common types of logic gates:
1. Basic Gates: NOT, AND, OR
2. Universal Gates: NAND & NOR
3. Arithmetic Gates: X-OR & X-NOR
0 1
1 0
4
NotesNeo
b. AND Gate
● The AND gate performs the logical AND operation on its inputs.
● It produces a '1' output only when all of its inputs are '1.'
● Outputs high when all inputs are high.
● Truth Table:
A B Q = A.B
0 0 0
0 1 0
1 0 0
1 1 1
c. OR Gate
● The OR gate performs the logical OR operation on its inputs.
● It produces a '1' output if at least one of its inputs is '1.'
● Outputs high when any input is high.
● Truth Table:
A B Q = A+B
0 0 0
0 1 1
1 0 1
1 1 1
d. NAND Gate
● The NAND gate is a gate that performs the logical AND operation on its inputs and then
negates the result (performs a NOT operation). It is the opposite of the AND gate. It
produces a '0' output only when all of its inputs are '1.'
● Outputs low when all inputs are high.
● Truth Table:
A B Q=
0 0 1
0 1 1
1 0 1
1 1 0
● NAND as Universal Gate: The NAND gate is a universal gate because it can be used to
implement any other logic gate by appropriately connecting its inputs and outputs.
1. NOT gate using NAND gate
5
NotesNeo
e. NOR Gate
● The NOR gate is a gate that performs the logical OR operation on its inputs and then
negates the result (performs a NOT operation). It is the opposite of the OR gate. It
produces a '0' output if at least one of its inputs is '1.'
● Outputs low when any input is high.
● Truth Table:
A B Q=
0 0 1
0 1 0
6
NotesNeo
1 0 0
1 1 0
● NOR as Universal Gate: The NOR gate is a universal gate because it can be used to
implement any other logic gate by appropriately connecting its inputs and outputs.
1. NOT gate using NOR gate
7
NotesNeo
● The XOR gate performs the exclusive OR operation. It produces a '1' output if the number
of '1' inputs is odd. (Odd 1's Detection)
● Output high when inputs are different.
● Truth Table:
A B Q=A B
0 0 0
0 1 1
1 0 1
1 1 0
0 0 1
0 1 0
1 0 0
1 1 1
8
NotesNeo
4. Boolean Algebra
● Boolean Algebra is a mathematical system that deals with binary variables and logical
operations.
● It's named after George Boole, who developed it in the mid-19th century. Boolean algebra
is fundamental in digital electronics, computer science, and logic design. It's used for
expressing and simplifying logical conditions and for analyzing and designing digital
circuits.
● Here are key concepts related to Boolean algebra:
1. Binary Variables: In Boolean algebra, variables can take on one of two values: '0' or '1.'
These values typically represent two logical states, like 'true' and 'false' or 'on' and 'off.'
9
NotesNeo
3. Logical Manipulation: In Boolean algebra, you can manipulate and simplify logical
expressions using rules and laws. This manipulation involves simplifying complex
expressions into more concise forms while preserving their logical equivalence.
4. Boolean Identities: These are important rules and laws in Boolean algebra that help
simplify logical expressions. Here are some common Boolean identities:
1. Double Negation: = A
2. Commutative Laws:
AND Commutative: A.B = B.A
OR Commutative: A+B = B+A
3. Associative Laws:
AND Associative: (A · B) · C = A · (B · C)
OR Associative: (A + B) + C = A + (B + C)
4. Distributive Laws:
AND Distributive over OR: A · (B + C) = (A · B) + (A · C)
OR Distributive over AND: A + (B · C) = (A + B) · (A + C)
5. Identity Laws:
AND Identity: A · 1 = A
OR Identity: A + 0 = A
6. Domination Laws:
AND Domination: A · 0 = 0
OR Domination: A + 1 = 1
7. Idempotent Law:
AND Idempotent : A · A = A
OR Idempotent : A + A = A
8. Complement Laws:
AND Complement: A · = 0
OR Complement: A + = 1
9. Absorption Law:
AND Absorption : A + (A · X) = A
AND Absorption : A · (A + X) = A
10. De Morgan's Laws:
AND: = +
OR: = .
11. Redundancy (Consensus) Law:
AB + A'C + BC = AB + A'C
A+ĀB = A+B
A.(Ā+B) = AB
10
NotesNeo
De-Morgan's Theorem
De Morgan's theorem is a fundamental principle in Boolean algebra that describes the relationship
between the logical operation of AND and OR with their complements.
It involves two rules, one for the complement of the product (AND) and the other for the
complement of the sum (OR).
A B A·B +
0 0 0 1 1 1 1
0 1 0 1 1 0 1
1 0 0 1 0 1 1
1 1 1 0 0 0 0
A B A+B ·
0 0 0 1 1 1 1
0 1 1 0 1 0 0
1 0 1 0 0 1 0
1 1 1 0 0 0 0
These theorems are useful for simplifying Boolean expressions, allowing for the transformation of
complex logic equations into simpler forms. De Morgan's theorem is applicable in digital logic
design, where it aids in optimizing circuits and reducing the complexity of logical expressions.
Role of IC Gates
11
NotesNeo
Integrated circuit (IC) gates provide compact and reliable solutions for digital circuits.
1. Logical Operations: IC gates perform logical operations on binary signals, typically
represented as '0' (false) and '1' (true). These operations include AND, OR, NOT, NAND,
NOR, and XOR, as discussed earlier.
2. Data Processing: IC gates are used to process and manipulate binary data within digital
circuits. They enable data storage, arithmetic operations, decision making, and control
functions.
3. Signal Routing: IC gates are used to route signals within a digital circuit, directing data to
various components and subsystems based on specified logical conditions.
4. Control Logic: IC gates are essential for creating control logic that governs the behaviour of
digital systems. They enable the execution of specific tasks and responses to various input
conditions.
Examples of IC Gates
Example: A digital thermometer employs IC gates like the 7400 Quad 2-Input NAND Gate to
process temperature data and display it in digital format, ensuring accurate measurement and
readability.
6. Number Systems
The Number System is used to represent information in quantitative form. We use positional
number system where the position of a digit defines the weightage given to a digit.
Some important type of Number System :-
● Decimal Number System
● Binary Number System
● Octal Number System
● Hexadecimal Number System
12
NotesNeo
Signed Binary
● Signed binary representation includes a sign bit ('0' for positive and '1' for negative) in
addition to the magnitude of the number.
● In computer programming, the signed binary representation of -5 is '11111011,' where the
leftmost '1' indicates a negative value.
● Representation: In the signed binary system, a bit is reserved for representing the sign of
the number: '0' for positive and '1' for negative. The remaining bits represent the magnitude
of the number.
● Examples:
○ Positive decimal 12 is '001100' in signed binary (positive sign bit '0' and magnitude
12 in binary).
○ Negative decimal 7 is '10111' in signed binary (negative sign bit '1' and magnitude 7
in binary).
● Applications: Signed binary is used when both positive and negative numbers need to be
represented, such as in computer arithmetic and data storage.
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
16 10000 20 10
14
NotesNeo
7. Binary Arithmetic
Binary Arithmetic is a system of performing mathematical operations using the binary number
system, which is based on two digits: '0' and '1.' In binary arithmetic, you can perform addition,
subtraction, multiplication, and division just like in decimal (base-10) arithmetic, but using the
binary digits '0' and '1.' Here are the fundamental operations in binary arithmetic:
1. Binary Addition:
● Rule: Binary addition is similar to decimal addition. You add corresponding digits from right
to left, carrying over to the next column if the sum is greater than 1.
● Example: Adding '1101' and '1011' in binary:
2. Binary Subtraction:
● Rule: Binary subtraction is similar to decimal subtraction. You subtract corresponding digits
from right to left, borrowing 2 from the next column if necessary.
● Example: Subtracting '1101' from '10110' in binary:
3. Binary Multiplication:
● Rule: Binary multiplication is similar to decimal multiplication, but you only need to multiply
by '0' or '1' in each column.
Sum Carry Product
0 0 0 0 0
1 0 1 0 0
0 1 1 0 0
1 1 0 1 1
4. Binary Division:
● Rule: Binary division is similar to decimal division. You perform long division, dividing by '1'
or '0' in each step and bringing down digits as necessary.
● Example: Dividing '11010' by '101' in binary:
8. Complement
● The complement of a number is the number that, when added to the original number, yields
the result that is equal to the base of the number system.
● For example, the complement of 5 in decimal is 5 because 5 + 5 = 10. The complement of
5 in binary is 101 because 101 + 101 = 1010.
● Types of complements:
1. r's complement (Radix Complement)
2. r-1's complement (Diminished Radix Complement)
15
NotesNeo
2. 2's complement: The 2's complement of a binary number is obtained by adding 1 to the 1's
complement of the number. For example, the 2's complement of 101 is 010 + 1 = 011.
1's complement + 1 = 2's complement
9. Codes
Codes in the context of digital communication and data storage refer to methods of representing
information using a specific set of symbols or digits. These codes are used to encode data for
transmission, storage, and processing in a reliable and efficient manner.
BCD Code
Binary-coded decimal (BCD) code is a way of representing decimal numbers using a sequence of
binary bits. Each decimal digit is represented by four bits.
16
NotesNeo
● It is a weighted code, meaning that each decimal digit is represented by a fixed number of
bits, with each bit having a different weight.
● It is not a self-complementing code because the 1's complement of a BCD code does not
necessarily represent the 9's complement of the corresponding decimal number.
17
NotesNeo
Classification of codes:
1. Weighted codes
2. Non-weighted codes
3. Self-complementing codes
4. Sequential codes
5. Numeric codes
6. Alphanumeric codes
7. Error detecting and correcting codes
1. Weighted codes
● Weighted codes use the positional value of each bit to represent a number.
● The weights are assigned to each bit position, and the code represents a weighted sum of
these positions.
● Weighted codes are binary codes in which the positions (or bits) have different weights,
typically based on powers of 2.
● Examples:
○ Binary Coded Decimal (BCD): Each decimal digit is represented by a 4-bit binary
code, and the weights are 8, 4, 2, and 1.
■ Example: The BCD code for the decimal number 7 is 0111.
○ Excess-3 Code: Each decimal digit is represented by adding 3 (0011) to its binary
equivalent.
■ Example: The excess-3 code for the decimal number 5 is 1000 (binary 0101
+ 0011).
2. Non-weighted codes
● Non-weighted codes do not use the positional value of each bit to represent a number.
Instead, each bit has a unique meaning.
● Non-weighted codes assign equal weight to all bit positions.
● All positions are treated equally, and the code may not have a specific order of significance.
● Examples:
○ Gray Code: In Gray code, adjacent values differ by only one bit change, but there is
no specific weight assigned to the bits.
■ Example: The Gray code for the decimal numbers 2 and 3 is 001 and 011,
respectively.
3. Self-Complementing Codes
● Self-complementing codes have the unique property that their complement (bitwise
inversion) is equivalent to a simple transformation.
● The complement of a number in a self-complementing code is related to the original
number.
● Examples:
○ 9's Complement: In decimal, the 9's complement of a number is obtained by
subtracting each digit from 9. It's used in subtraction operations.
■ Example: The 9's complement of 742 is 257.
○ Excess-3 Code: In binary, the 1's complement of a number is obtained by XORing it
with a fixed pattern (0011).
■ Example: The 1's complement of 1101 is 0010 (1101 XOR 0011).
4. Sequential Codes:
18
NotesNeo
5. Numeric Codes:
● Numeric codes are codes that represent numerical values or quantities.
● They are designed for arithmetic operations and mathematical calculations.
● Examples:
○ Binary Numbers: The standard binary representation of numbers.
■ Example: The binary number 1010 represents the decimal number 10.
○ Decimal Numbers: The familiar base-10 system used for everyday arithmetic.
■ Example: The decimal number 42.
6. Alphanumeric Codes:
● Alphanumeric codes represent both letters (alphabets) and numbers using a combination of
symbols.
● They are used for character encoding and text representation.
● Examples:
○ ASCII (American Standard Code for Information Interchange): It represents
characters, numbers, and special symbols using 7 or 8 bits.
■ Example: The ASCII code 65 represents the uppercase letter 'A.'
○ Unicode: A standardized system representing characters from various languages,
including letters, numbers, and special symbols.
■ Example: The Unicode code point U+0041 represents the letter 'A.'
1. Error-Detecting Codes
19
NotesNeo
Error-detecting codes are used to detect errors that may occur during the transmission or
storage of data. Error-detecting codes work by adding additional bits to the data, which can
then be used to check for errors when the data is received or read.
● Purpose: Error-detecting codes are designed to identify the presence of errors in
transmitted or stored data.
● Techniques: These codes typically involve adding redundancy to the original data,
such as parity bits or checksums. The added bits contain information about the
data, allowing the recipient to check for errors.
● Detection: If an error occurs during transmission or storage, the recipient can use
the error-detecting code to detect that an error has occurred but cannot correct the
error itself.
● Applications: Error-detecting codes are commonly used in network communication,
including Ethernet, where checksums are used to detect data transmission errors.
2. Checksums: Checksums are used in various data transmission protocols and involve summing
the binary values of data blocks. The sum is sent along with the data. The receiver recalculates the
checksum and checks if it matches the transmitted value. A mismatch indicates an error.
● Method: A sum or hash value is calculated from the data and transmitted along with the
data.
● Detection: Can detect errors but not correct them.
● Usage: Commonly used in network protocols like TCP and UDP.
3. Cyclic Redundancy Check (CRC): CRC codes use polynomial division to generate a
remainder (check value) from the data bits. The sender appends this remainder to the data. The
receiver divides the received data by the same polynomial and checks if the remainder is zero. If
not, an error is detected.
● Method: Polynomial division is performed on the data, and the remainder becomes the
CRC code.
● Detection: Can detect burst errors and some random errors.
● Usage: Widely used in network communications, digital storage, and error-checking
protocols.
2. Error-Correcting Codes
20
NotesNeo
Error-correcting codes are used to detect and correct errors that may occur during the
transmission or storage of data. Error-correcting codes work by adding additional bits to the
data, which can then be used to both detect and correct errors when the data is received or
read.
● Purpose: Error-correcting codes go a step further by not only identifying errors but
also correcting them.
● Techniques: These codes use more redundancy than error-detecting codes,
allowing them to not only detect errors but also determine which bits are in error and
correct them automatically.
● Correction: Error-correcting codes are designed to correct common types of errors,
such as single-bit errors or bursts of errors. More sophisticated error-correcting
codes can correct multiple errors.
● Applications: Error-correcting codes are critical in storage systems, including hard
drives and flash memory, where data integrity is crucial. They are also used in
deep-space communication, where the transmission is subject to significant
interference.
2. Reed-Solomon Code: Reed-Solo code is a block code that can detect and correct
multiple-bit errors in data. This error-correcting code is widely used in data storage and
transmission applications, such as CDs, DVDs, QR codes, and digital communication
systems. It can correct multiple errors and detect errors even in the presence of missing
data.
● Method: Adds redundancy using polynomial codes, capable of correcting multiple errors.
● Correction: Efficiently corrects burst errors.
● Usage: CD, DVD, QR codes, satellite communication.
3. Turbo Codes: Turbo codes are a class of error-correcting codes known for their
exceptional performance. They are used in satellite communication, wireless networks, and
more. Turbo codes use multiple parallel codes and an iterative decoding process.
● Method: Convolutional codes with an iterative decoding process.
● Correction: Provide excellent error correction capabilities.
● Usage: Wireless communication, satellite communication.
4. LDPC (Low-Density Parity-Check) Codes: LDPC codes are linear block codes that have
gained prominence in modern communication systems. They offer near-Shannon limit
performance and are used in Wi-Fi, 4G, and 5G networks.
● Method: Sparse parity-check matrix is used for encoding and decoding.
● Correction: Offers near Shannon limit performance.
● Usage: Digital broadcasting, wireless communication, storage systems.
21
NotesNeo
Assignment 1
1. What is digital signal?
2. What is quantization?
3. Describe analog and digital signals.
4. What is Gray code? Explain.
5. Explain BCD and Excess-3 codes.
6. Add decimal numbers 187+389 using BCD
7. State De-Morgan’s theorem.
8. Realize all gates using NAND and NOR gates.
22
NotesNeo
23