0% found this document useful (0 votes)
32 views23 pages

Unit 1 DLD

The document provides an overview of digital systems, including their definitions, significance, and applications in modern technology. It covers key concepts such as digital signals, logic gates, Boolean algebra, and their roles in computing, communication, and control systems. Additionally, it explains the importance of digital electronics and the manipulation of logical operations through Boolean algebra and De Morgan's theorem.

Uploaded by

sushant249303
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views23 pages

Unit 1 DLD

The document provides an overview of digital systems, including their definitions, significance, and applications in modern technology. It covers key concepts such as digital signals, logic gates, Boolean algebra, and their roles in computing, communication, and control systems. Additionally, it explains the importance of digital electronics and the manipulation of logical operations through Boolean algebra and De Morgan's theorem.

Uploaded by

sushant249303
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

NotesNeo

Unit 1: Fundamentals of Digital Systems and Logic Families


Syllabus:
FUNDAMENTALS OF DIGITAL SYSTEMS AND LOGIC FAMILIES
Digital Signals, digital circuits, AND, OR, NOT, NAND, NOR and Exclusive-OR operations,
Boolean Algebra, examples of IC gates, number systems- binary, signed binary, octal hexadecimal
number, binary arithmetic, one's and two's complements arithmetic, codes, error detecting and
correcting codes.
Contributed By Deepak Modi [B.Tech CSE SAITM]

1. Introduction to Digital Systems

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.

Need of Digital Signals:


The adoption of digital signals over analog signals has become prevalent for several reasons:
1. Noise Resistance: Digital signals are more robust against noise and interference, making
them suitable for long-distance communication and data transmission.
2. Error Detection and Correction: Digital signals allow for the implementation of error-
checking and error-correction techniques, ensuring data integrity.
3. Signal Replication: Digital signals can be easily copied and transmitted without degradation,
which is essential in data storage and transmission.
4. Data Compression: Digital signals enable efficient data compression techniques, reducing
storage and bandwidth requirements.
5. Flexibility and Versatility: Digital signals can represent a wide range of data types, from text
and images to audio and video, making them versatile for various applications.
6. Ease of Processing: Digital signals can be processed, manipulated, and analysed using
digital circuits and software, facilitating complex operations like data processing and
encryption.

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.

Importance of Digital Electronics:


Digital electronics, which is based on the manipulation of digital signals, holds immense
importance in modern technology and society for the following reasons:
1. Computing: Digital electronics forms the foundation of modern computers and
microprocessors, enabling them to process vast amounts of data quickly and accurately.
2. Communication: Digital electronics is at the core of all modern communication systems,
including the internet, mobile phones, and satellite communication, ensuring reliable data
transmission.
3. Data Storage: Digital electronics facilitates efficient and high-capacity data storage
systems, such as hard drives and solid-state drives.
4. Signal Processing: Digital signal processing (DSP) techniques are widely used in fields like
audio processing, image processing, and data analysis, leading to advances in fields such
as medical imaging and telecommunications.
5. Automation and Control: Digital electronics plays a crucial role in automation and control
systems in industries, robotics, and home automation.
6. Security: Digital electronics is essential for encryption and secure communication, ensuring
the privacy and security of data and transactions.
7. Entertainment: Digital electronics is the backbone of the entertainment industry, including
digital audio and video systems, gaming consoles, and streaming platforms.
8. Scientific Research: Digital electronics supports scientific research by providing tools for
data collection, analysis, and simulation.

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

a. NOT Gate (Inverter):


● The NOT gate takes a single input and produces the opposite output.
● It inverts its input so it is also known as inverter.
● Truth Table:
A Q=

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

2. AND gate using NAND gate

3. OR gate using NAND gate

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

2. AND gate using NOR gate

3. OR gate using NOR gate

f. Exclusive-OR (XOR) 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

g. Exclusive-NOR (XNOR) Gate


● The XNOR gate performs the exclusive NOR operation. It produces a '1' output if the
number of '1' inputs or number of '0' inputs is even. (Even Input Detection)
● Truth Table:
A B Q=A B

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.'

2. Logical Operations: Boolean algebra defines several fundamental logical operations:


a. AND (Conjunction): Denoted by . or , it represents the logical "AND" operation.
The result is '1' only when both inputs are '1.'

9
NotesNeo

b. OR (Disjunction): Denoted by + or , it represents the logical "OR" operation. The


result is '1' if at least one input is '1.'
c. NOT (Negation): Denoted by or ' or ¬ , it represents the logical "NOT" operation. It
negates the input, changing '1' to '0' and '0' to '1.'
d. XOR (Exclusive OR): Denoted by , it represents the logical "exclusive OR"
operation. The result is '1' if the number of '1' inputs is odd.
e. NAND (NOT AND): The opposite of the AND operation. It produces '0' only when
both inputs are '1.'
f. NOR (NOT OR): The opposite of the OR operation. It produces '0' if at least one
input is '1.'

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).

De-Morgan's First Theorem


This rule states that the complement of the product (AND) of two variables (A and B) is equal to the
sum (OR) of their individual complements.
= +
The truth table illustrates the logic behind De Morgan's first theorem.

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

De-Morgan's Second Theorem


This rule states that the complement of the sum (OR) of two variables (A and B) is equal to the
product (AND) of their individual complements.
= .
The truth table illustrates the logic behind De Morgan's second theorem.

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.

5. Integrated Circuit (IC) Gates


Integrated Circuit (IC) Gates are electronic components that perform basic logical operations in
digital circuits. These gates are implemented as compact and highly integrated semiconductor
devices within a single chip or integrated circuit. IC gates are the fundamental building blocks of
digital electronics and play a pivotal role in various applications, from computers and smartphones
to embedded systems and electronic control circuits.

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

Binary Number System


● The binary number system uses '0' and '1' to represent numerical values.
● Computers represent all kinds of data and information in binary numbers . It includes audio,
graphics, video, text and numbers.
● It is fundamental in digital data storage, processing, and arithmetic.
● Binary digits (0 and 1) are called bits which represent the smallest unit of data.
○ 1 nibble = 4 bits
○ 1 byte = 8 bits
○ 1 word = 16 bits = 2 bytes
● Base/Radix (r=2): Binary is a base-2 number system, which means it uses two digits, '0'
and '1'.
● Representation: In the binary system, each digit represents a power of 2, with the rightmost
digit representing 2^0, the next representing 2^1, and so on.
● Examples:
○ Decimal 9 is represented as '1001' in binary (2^3 + 0 + 0 + 2^0 = 8 + 0 + 0 + 1 = 9).
○ Decimal 15 is '1111' in binary (2^3 + 2^2 + 2^1 + 2^0 = 8 + 4 + 2 + 1 = 15).
● Applications: Binary is fundamental in digital electronics because it corresponds directly to
the on/off states of electronic switches. It is used in digital data representation, computer
memory, and binary arithmetic.
In a digital camera, each pixel's color is represented in binary. For instance, the color blue
might be encoded as '00101010' in binary, allowing for precise image storage.

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.

Octal Number System


● The octal number system is base-8 and uses digits from '0' to '7.'
● Base: Octal is a base-8 number system, which means it uses eight digits: '0' to '7.'
● Representation: Each digit in octal represents three bits in binary. It is often used as a more
compact representation of binary numbers.
● Examples:
○ Binary '11010110' is '326' in octal (11 010 110).
○ Binary '100111' is '47' in octal (100 111).
● Applications: Octal is less common today but was historically used in early computer
systems for its convenience in representing binary data groups.

Hexadecimal Number System


● The hexadecimal number system is base-16 and uses digits '0' through '9' and letters 'A'
through 'F.'
● Base: Hexadecimal is a base-16 number system, which means it uses sixteen digits: '0' to
'9' for values 0 to 9 and 'A' to 'F' for values 10 to 15.
● Representation: Each digit in hexadecimal represents four bits in binary, making it a
compact representation of binary data. It is commonly used in programming and digital
systems.
● Examples:
○ Binary '1101101011' is '36B' in hexadecimal (0011 0110 1011).
○ Binary '100101' is '29' in hexadecimal (0010 1001).
● Applications: Hexadecimal is widely used in programming, debugging, and representing
memory addresses. A CPU might use a hexadecimal address like '0x7FFF' to access a
specific memory location efficiently. It is also used in the specification of colors in HTML
and CSS (e.g., #FF0000 for red).

Conversion of Number System

Decimal to other base systems:


Steps to convert decimal to other systems:
1. Divide the decimal number by the base of the target system
2. Note the remainder at each step
13
NotesNeo

3. Repeat the division process until the quotient becomes 0


4. The equivalent number in the target base system is the remainders read from
bottom to top
5. If the decimal number is a fraction, multiply the fraction by the base of the system
and repeat the process until the fraction becomes 0

Other base systems to decimal:


Steps to convert other base systems to decimal:
1. Multiply each digit of the number by the base raised to the power of the position of
the digit
2. Add the results of the multiplication
3. The result is the decimal number
4. If the number is a fraction, multiply each digit by the base raised to the power of the
negative position of the digit

One base system to another base system


Steps to convert one base system to another base system:
1. Convert the original number to decimal system
2. Convert the decimal number to the desired base system

Decimal Binary Octal Hexadecimal

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)

1. r's complement (Radix Complement):


The r's complement of a number is obtained by subtracting the number from the base
raised to the power of the number of digits in the number .
For example, the 10's complement of 123 is 10^3 - 123 = 1000 - 123 = 877.

15
NotesNeo

2. r-1's complement (Diminished Radix Complement):


The r-1's complement of a number is obtained by subtracting 1 from the r's complement .
r-1's complement + 1 = r's complement
For example, the 9's complement of 123 is 1000 - 123 + 1 = 876.

One's and Two's Complement for Binary


1. 1's complement: The 1's complement of a binary number is obtained by inverting all the
bits that means changing all 1s to 0s and all 0s to 1s. For example, the 1's complement of
101 is 010.

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

One's complement arithmetic is a method of performing arithmetic operations on binary numbers


using one's complement. Two's complement arithmetic is a method of performing arithmetic
operations on binary numbers using two's complement.

1. One's Complement Arithmetic:


● Representation: In one's complement, to represent a negative number, you invert
(flip) all the bits of the positive number.
● Example: To represent '-6' in one's complement, start with '+6' (which is '0110' in
binary) and invert all the bits, resulting in '-6' as '1001' in one's complement.
● Arithmetic: In one's complement arithmetic, you perform addition and subtraction as
usual, but you may need to adjust for end-around carry (add any carryout back to
the least significant bit).
2. Two's Complement Arithmetic:
● Representation: In two's complement, to represent a negative number, you invert
(flip) all the bits of the positive number and then add 1 to the result.
● Example: To represent '-6' in two's complement, start with '+6' (which is '0110' in
binary), invert all the bits ('1001'), and then add 1, resulting in '-6' as '1010' in two's
complement.
● Arithmetic: Two's complement arithmetic is the most common method for handling
signed binary numbers because it simplifies addition and subtraction. It eliminates
the need for end-around carry adjustments.

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.

BCD code has a number of characteristics, including:

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.

Some of the advantages of BCD code include:


● It is easy to convert to and from decimal numbers, which makes it convenient for use in
applications such as calculators and displays.
● It is easy to implement in digital circuits, which makes it efficient for use in applications such
as microprocessors and other digital devices.

Some of the disadvantages of BCD code include:


● It is not the most efficient use of space, since each decimal digit is represented by four bits.
● It can be more difficult to perform arithmetic operations on BCD numbers than on binary
numbers.

Excess-3 (XS-3) Code


Excess-3 code is another form of BCD code. It is a self-complementing code. It is obtained by
adding 3 (0011) to each decimal digit of the BCD code. For example, the excess-3 code for 5 is
0101 + 0011 = 1000.
XS-3 Code = BCD Code + 0011
XS-3 code is the only weighted code which is self-complementing.

Gray (Reflective) Code


Gray code is a type of non-weighted binary code in which two successive values differ in only one
bit. This makes it useful for applications where it is important to minimize the number of bits that
change when moving from one number to the next, such as in encoders and decoders.
Binary number is converted to gray code to reduce switching operation. It is also known as
reflected binary code (RBC), cyclic code, unit distance code or minimum error code.
We call it Gray Code after Frank Gray.

Decimal Digit BCD Code Excess-3 Code Gray Code

0 0000 0011 0000

1 0001 0100 0001

2 0010 0101 0011

3 0011 0110 0010

4 0100 0111 0110

5 0101 1000 0111

6 0110 1001 0101

7 0111 1010 0100

8 1000 1011 1100

9 1001 1100 1101

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

● Sequential codes represent numbers in a sequence or consecutive order.


● They have a specific order, and the representation of each number is based on the
preceding number.
● Examples:
○ Binary Numbers: Standard binary representation where each number is one more or
one less than the preceding number.
■ Example: 1101 (13 in decimal) follows 1100 (12 in decimal).

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.'

7. Error Detecting and Correcting Codes:


● Error detecting and correcting codes are specialized codes designed to identify and correct
errors in data transmission or storage.
● They are crucial for ensuring data integrity.
● Examples:
○ CRC (Cyclic Redundancy Check): A code that uses polynomial division to detect
errors in data transmission.
■ Example: A CRC-32 code is used in Ethernet to check for data corruption.
○ Hamming Code: A binary error-correcting code that can correct single-bit errors and
detect multiple-bit errors.
■ Example: In a (7, 4) Hamming code, 0101 represents the data '010,' and the
parity bits help correct errors.

Error Detecting and Correcting Codes


Error Detecting and Correcting Codes are specialized codes used to identify and correct errors that
can occur during data transmission or storage. These codes are crucial in ensuring the integrity
and reliability of data in various applications, such as telecommunications, computer memory, and
data storage devices. There are two main categories of error detecting and correcting codes:

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.

Examples of Error Detecting Code:


1. Parity Bit: A simple error-detecting code, the parity bit is added to a binary word to make the
total number of '1's either even (even parity) or odd (odd parity). If an error occurs in transmission,
the parity bit will not match the expected parity, indicating an error. It can detect single-bit errors in
data
● Method: An extra bit (parity bit) is added to the data.
● Parity bit is a bit added to a string of binary code that indicates whether the number of bits
in the string with the value one is even or odd.
● Parity bits are used as the simplest form of error detecting code.
● There are two types of parity bits: even parity bit and odd parity bit.
● Even Parity: The total number of 1s in the data, including the parity bit, is even.
● Odd Parity: The total number of 1s in the data, including the parity bit, is odd.
● In even parity bit, the parity bit is set to 1 if the number of 1s in the string is odd. In odd
parity bit, the parity bit is set to 1 if the number of 1s in the string is even.
● Detection: Can detect single-bit 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.

Examples of Error Detecting and Correcting Codes:


1. Hamming Code: Hamming code is a linear error-correcting code named after its inventor,
Richard Hamming. It can detect and as well as correct single-bit errors in data. It is used in
computer memory and storage systems to detect and correct errors in data transmission. It
is also used in satellite communication systems.
● Method: Adds redundant bits to the data to create a code word with specific properties.
● Correction: Can correct single-bit errors and detect double-bit errors.
● Usage: Memory systems, ECC RAM, data transmission in computer networks.

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

5. BCH (Bose-Chaudhuri-Hocquenghem) Codes: BCH codes are a family of error


correcting codes that can correct multiple errors. They are used in various applications,
including ECC (Error-Correcting Code) memory.
● Method: A family of cyclic error-correcting codes that generalize Reed-Solomon codes.
● Correction: Can correct multiple errors.
● Usage: QR codes, barcodes, data storage.

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.

MDU Previous Year Questions


1. State the De-Morgan's theorem.
2. What do you mean by digital signal ?
3. Define Quantization.
4. Represent 32 decimal in excess-3 code.

22
NotesNeo

5. Realise AND gate using NAND gate.


6. Prove that A+ BC = (A+B) (A+C).
7. Find the decimal equivalent of the following binary numbers assuming sign magnitude
representation of binary numbers :
a. 101100
b. 1111
8. Represent the following numbers in one’s complement form :
a. 11010100
b. 10010100
9. Find two's complement of the numbers :
a. 01100100
b. 11011000
10. Convert the following :
a. (ABC43) into ( )
b. (4634) into ( )
c. (264) into ( )
11. How do you convert a decimal number to an equivalent number in another base system?
Discuss.
12. State and explain property of gates. (Explain boolean algebra properties.)
13. Realize AND, OR and NOT gate with the help of universal gates NAND and NOR
separately.
14. Design XOR gate and XNOR gate using NAND gate only.
15. Design XOR and XNOR gates using universal gates.
16. Implement Boolean expressions for XOR gate using NAND Gate.
17. Draw and give the truth table of the following gates XOR, AND, OR, NOR, NAND.
18. Realize using 2 input NOR gates only.
19. Using Boolean algebra reduce the following functions:

20. Write short notes on :


a. Error Detecting and Correcting Code
b. Excess and Gray Code
21. Write in detail about various error detection and correction codes.
22. Give comparison between various logic families.
23. Explain the operation of Schottky TTL.

23

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy