Unit I
Unit I
A signal is an electrical or electromagnetic quantity that transports data or information from one system
to another. For data transmission, two types of signals are used: Analog signals and digital signals.
Analog and digital signals are very different in many ways. An analog signal is a continuous function,
whereas a digital signal is a discontinuous function.
Analog and digital signals are two signal kinds that carry data or information. As far as analog signal vs.
digital signal is concerned, analog signals feature continuous electrical signals, whereas digital signals
are otherwise without continuity in signals
Types of Signals
Signals are classified into two types:
Continuous-time signals/ Analog signals: A continuous-time signal is any continuous function of time.
Discrete-time signals/ Digital Signals: A discrete-time signal is any series of real numbers separated by
equal time increments (or samples).
Analog signals
Analog signals are used to create information-carrying signals in a variety of systems. Both in terms of
quantities and time, these signals are continuous. As technology evolved, digital transmissions repealed the
use of analog signals. Signals that are natural or occur naturally are analog signals. Since it denotes a
quantity that is analogous to another measure, it is called so. Analog signals are known for use of medium to
channelize the flow of information. Analog signals can be easily distorted, thereby losing clarity and quality.
Any natural sound, human voice, and data read by analog devices are examples of analog signals.
Characteristics of Analog Signal:
The accuracy of the analog signal isn’t high in comparison to the digital signal.
Analog signal output form is like Curve, Line, or Graph, so it’s going to not be meaningful to all or any.
It is Easier in processing.
Binary digits 0 and 1 represent the optical pulse for storing, processing and transmitting information.
Digital sound’s can cut an analog acoustic wave which suggests that you simply can’t get an ideal
reproduction of a sound.
Digital Signal
A digital signal is one that is a discrete function of time rather than a continuous signal. Digital signals are
binary in nature and consist of discrete voltage values at discrete times. A digital signal, in essence,
represents data and information as a sequence of discrete values at any given time. The digital signal has a
limited number of values.
Characteristics’ of Digital signals as follows.
Digital signal are discrete signals.
This type of electronic l signals are often processed and transmitted better compared to analog signal.
Digital signals are versatile, so it’s widely used.
The accuracy of the digital signal is best than that of the analog signal.
Equipment that uses digital signals is more common and fewer expensive.
You can edit the sound without altering the first copy.
Digital signals can convey information with less noise, distortion, and interference.
Digital signals can be reproduced easily in mass quantities at comparatively low costs.
Digital signal processing is safer because digital information is often easily encrypted and compressed.
Digital systems are more accurate, and therefore the probability of error occurrence is often reduced by
employing error detection and correction codes.
Digital signals are often easily stored on any magnetic media or optical media using semiconductor chips.
Digital electronics is a branch that studies digital signals and the setup of different
devices that use them. This concept only translates and communicates information in
binary format, i.e. one and zero. It is noise-immune, flexible, and best suited for digital
devices. This concept is entirely different from analogue, which has an extra dimension,
is exposed to noise, is less flexible, and is mostly used for audio and video.
It is much easier and more convenient to store information in the digital system than in
the analogue system.
As the digital system has a noise-immunity feature, the data can be stored and later
retrieved without destruction or degradation.
Even though multiple circuits are required to manage the signals in a digital
system, every digit is handled by the corresponding hardware components.
Digital signals are more secure because encryption and compression of signals are
easier in digital systems than in analogue systems.
Digital electronics consist of numerous components that are used for performing
specific functions. These components are divided into two categories, namely:
Active Components
Passive Components
Active Components
An electrical circuit element that may provide the circuit with power or increase the
circuit's power is referred to as an active element or active component.
The circuit component, known as the active elements, is entirely in charge of the
circuit's electric current flow.
Passive Components
A passive circuit component, or simply passive component, is a circuit part that can
only receive electrical energy and dissipate it as heat or store it in either a magnetic
field or an electric field.
Digital electronic circuits are quite reliable. When a digital circuit is designed, it
will always produce the same output at any given point in time.
It is highly flexible. One can easily change the working of the digital circuit
without even changing the program.
The electronic systems are brittle. In other words, the final results will radically
change if one digital data is misinterpreted.
As analogue components are included in the design of the digital system, dealing
with analogue concerns in digital systems may be challenging.
Number System
In a digital system, the system can understand only the optional number system. In
these systems, digits symbols are used to represent different values, depending on the
index from which it settled in the number system.
1. The digit
2. The index, where the digit is present in the number.
3. Finally, the base numbers, the total number of digits available in the number
system.
There are four common types of number systems based on the radix or base of the
number:
The Decimal Number System is the most familiar number system, as it is the one we use
in our everyday life. It has a base of 10, meaning it uses ten digits (0-9) to represent
numbers. Each digit's positional value is a power of 10.
Characteristics:
Base: 10
Digits Used: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Positional Value: Each digit in a decimal number is multiplied by 10 raised to the power
of its position.
Example:
345=3×102+4×101+5×100
The Binary Number System is the foundation of all digital electronics. It has a base of 2,
meaning it uses only two digits: 0 and 1. Every digital device, from simple calculators to
complex computers, relies on the binary system to perform operations and store data.
Characteristics:
Base: 2
Digits Used: 0, 1
Positional Value: Each digit in a binary number is multiplied by 2 raised to the power of
its position.
Example:
(1101)2=1×23+1×22+0×21+1×20
The binary number system is very important in digital electronics because it directly
correlates with the ON and OFF states of transistors, which are the building blocks of
digital circuits.
A number system with a base of 8 is known as the octal number system. This system
utilizes 8 symbols—0, 1, 2, 3, 4, 5, 6, and 7—to represent numbers.
To convert an octal number into its equivalent decimal form, follow these steps:
Characteristics:
Base: 8
Digits Used: 0, 1, 2, 3, 4, 5, 6, 7
Positional Value: Each digit in an octal number is multiplied by 8 raised to the power of
its position.
Example:
(345)8=3×82+4×81+5×80
Usage:
Octal numbers are often used as a shorthand representation for binary numbers because
each octal digit corresponds to exactly three binary digits.
The Hexadecimal Number System is widely used in digital electronics and computing. It
has a base of 16, meaning it uses sixteen digits, including 0-9 and A-F, where A
represents 10, B represents 11, up to F represents 15.
Characteristics:
Base: 16
Digits Used: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Example:
Number systems are integral to digital electronics and are used in various applications:
Data Representation: Binary numbers are used to represent and store data in digital
systems.
Programming: Hexadecimal numbers are commonly used in programming and
debugging.
Digital Circuit Design: Binary, octal, and hexadecimal numbers are used in the
design and analysis of digital circuits.
Communication Protocols: Number systems are used in protocols for data
transmission and encoding
Number Base Conversion
In our previous section, we learned different types of number systems such as binary,
decimal, octal, and hexadecimal. In this part of the tutorial, we will learn how we can
change a number from one number system to another number system.
As, we have four types of number systems so each one can be converted into the
remaining three systems. There are the following conversions possible in Number
System
There are three conversions possible for binary number, i.e., binary to decimal, binary
to octal, and binary to hexadecimal. The conversion process of a binary number to
decimal differs from the remaining others. Let's take a detailed discussion on Binary
Number System conversion.
Let's take an example to understand how the conversion is done from binary to decimal.
Example 1: (10110.001)2
We multiplied each bit of (10110.001)2 with its respective positional weight, and last we add the
products of all the bits with its weight.
(10110.001)2=(1×24)+(0×23)+(1×22)+(1×21)+(0×20)+(0×2-1)+(0×2-2)+(1×2-3)
(10110.001)2=(1×16)+(0×8)+(1×4)+(1×2)+(0×1)+(0×1⁄2)+(0×1⁄4)+(1×1⁄8)
(10110.001)2=16+0+4+2+0+0+0+0.125
(10110.001)2=(22.125 )10
1. In the first step, we have to make the pairs of three bits on both sides of the
binary point. If there will be one or two bits left in a pair of three bits pair, we
add the required number of zeros on extreme sides.
2. In the second step, we write the octal digits corresponding to each pair.
Example 1: (111110101011.0011)2
1. Firstly, we make pairs of three bits on both sides of the binary point.
On the right side of the binary point, the last pair has only one bit. To make it a complete pair of three
bits, we added two zeros on the extreme side.
(111110101011.0011)2=(7653.14)8
1. Firstly, we make pairs of four bits on both sides of the binary point.
On the left side of the binary point, the first pair has three bits. To make it a complete pair of four bits,
add one zero on the extreme side.
(011110101011.0011)2=(7AB.3)16
1. In the first step, we perform the division operation on integer and successive part
with base 'r'. We will list down all the remainders till the quotient is zero. Then
we find out the remainders in reverse order for getting the integer part of the
equivalent number of base 'r'. In this, the least and most significant digits are
denoted by the first and the last remainders.
2. In the next step, the multiplication operation is done with base 'r' of the fractional
and successive fraction. The carries are noted until the result is zero or when the
required number of the equivalent digit is obtained. For getting the fractional part
of the equivalent number of base 'r', the normal sequence of carrying is
considered.
1. In the first step, we perform the division operation on the integer and the
successive quotient with the base of binary(2).
2. Next, we perform the multiplication on the integer and the successive quotient
with the base of binary(2).
Example 1: (152.25)10
Step 1:
Divide the number 152 and its successive quotients with base 2.
152/2 76 0 (LSB)
76/2 38 0
38/2 19 0
19/2 9 1
9/2 4 1
4/2 2 0
2/2 1 0
1/2 0 1(MSB)
(152)10=(10011000)2
Step 2:
Now, perform the multiplication of 0.27 and successive fraction with base 2.
0.25×2 0.50 0
0.50×2 0 1
(0.25)10=(.01)2
1. In the first step, we perform the division operation on the integer and the successive
quotient with the base of octal(8).
2. Next, we perform the multiplication on the integer and the successive quotient with the
base of octal(8).
Example 1: (152.25)10
Step 1:
Divide the number 152 and its successive quotients with base 8.
152/8 19 0
19/8 2 3
2/8 0 2
(152)10=(230)8
Step 2:
Now perform the multiplication of 0.25 and successive fraction with base 8.
(0.25)10=(2)8
1. In the first step, we perform the division operation on the integer and the successive quotient with
the base of hexadecimal (16).
2. Next, we perform the multiplication on the integer and the successive quotient with the base of
hexadecimal (16).
Example 1: (152.25)10
Step 1:
Divide the number 152 and its successive quotients with base 8.
152/16 9 8
9/16 0 9
(152)10=(98)16
Step 2:
Now perform the multiplication of 0.25 and successive fraction with base 16.
0.25×16 0 4
(0.25)10=(4)16
Let's take an example to understand how the conversion is done from octal to decimal.
Example 1: (152.25)8
Step 1:
We multiply each digit of 152.25 with its respective positional weight, and last we add the products of
all the bits with its weight.
(152.25)8=(1×82)+(5×81)+(2×80)+(2×8-1)+(5×8-2)
(152.25)8=64+40+2+(2×1⁄8)+(5×1⁄64)
(152.25)8=64+40+2+0.25+0.078125
(152.25)8=106.328125
Example 1: (152.25)8
(152.25)8=(001101010.010101)2
1. In the first step, we will find the binary equivalent of number 25.
2. Next, we have to make the pairs of four bits on both sides of the binary point. If there will be one,
two, or three bits left in a pair of four bits pair, we add the required number of zeros on extreme sides
and write the hexadecimal digits corresponding to each pair.
Example 1: (152.25)8
Step 1:
(152.25)8=(001101010.010101)2
Step 2:
1. Now, we make pairs of four bits on both sides of the binary point.
0 0110 1010.0101 01
On the left side of the binary point, the first pair has only one digit, and on the right side, the last pair
has only two-digit. To make them complete pairs of four bits, add zeros on extreme sides.
Let's take an example to understand how the conversion is done from hexadecimal to decimal.
Example 1: (152A.25)16
Step 1:
We multiply each digit of 152A.25 with its respective positional weight, and last we add the products of
all the bits with its weight.
(152A.25)16=(1×163)+(5×162)+(2×161)+(A×160)+(2×16-1)+(5×16-2)
(152A.25)16=(1×4096)+(5×256)+(2×16)+(10×1)+(2×16-1)+(5×16-2)
(152A.25)16=4096+1280+32+10+(2×1⁄16)+(5×1⁄256)
(152A.25)16=5418+0.125+0.125
(152A.25)16=5418.14453125
Example 1: (152A.25)16
1. In the first step, we will find the binary equivalent of the hexadecimal number.
2. Next, we have to make the pairs of three bits on both sides of the binary point. If there will be one or
two bits left in a pair of three bits pair, we add the required number of zeros on extreme sides and
write the octal digits corresponding to each pair.
Example 1: (152A.25)16
Step 1:
Step 2:
3. Then, we make pairs of three bits on both sides of the binary point.
(001010100101010.001001010)2=(12452.112)8
It is very easy to represent positive and negative numbers in our day to day life. We represent
the positive numbers without adding any sign before them and the negative number with -
(minus) sign before them. But in the digital system, it is not possible to use negative sign before
them because the data is in binary form in digital computers. For representing the sign in binary
numbers, we require a special notation.
Unsigned Numbers
As we already know, the unsigned numbers don't have any sign for representing negative
numbers. So the unsigned numbers are always positive. By default, the decimal number
representation is positive. We always assume a positive sign in front of each decimal digit.
There is no sign bit in unsigned binary numbers so it can only represent its magnitude. In zero
and one, zero is an unsigned binary number. There is only one zero (0) in this representation,
which is always positive. Because of one unique binary equivalent form of a number in
unsigned number representation, it is known as unambiguous representation technique. The
range of the unsigned binary numbers starts from 0 to (2n-1).
We will change this decimal number into binary, which has the only magnitude of the given
name.
102 102/2 51 0
51 51/2 25 1
25 25/2 12 1
12 12/2 6 0
6 6/2 3 0
3 3/2 1 1
1 1/2 0 1
So the binary number of (102)10 is (1100110)2, a 7-bit magnitude of the decimal number 102.
Signed Numbers
The signed numbers have a sign bit so that it can differentiate positive and negative integer
numbers. The signed binary number technique has both the sign bit and the magnitude of the
number. For representing the negative decimal number, the corresponding symbol in front of the
binary number will be added.
The signed numbers are represented in three ways. The signed bit makes two possible
representations of zero (positive (0) and negative (1)), which is an ambiguous representation.
The third representation is 2's complement representation in which no double representation of
zero is possible, which makes it unambiguous representation. There are the following types of
representation of signed binary numbers:
Sign-Magnitude form
In this form, a binary number has a bit for a sign symbol. If this bit is set to 1, the number
will be negative else the number will be positive if it is set to 0. Apart from this sign-bit,
the n-1 bits represent the magnitude of the number.
1's Complement
In number representation techniques, the binary number system is the most used
representation technique in digital electronics. The complement is used for representing
the negative decimal number in binary form. Different types of complement are possible
of the binary number, but 1's and 2's complements are mostly used for binary numbers.
We can find the 1's complement of the binary number by simply inverting the given
number.
For finding 1's complement of the binary number, we can implement the logic circuit
also by using NOT gate. We use NOT gate for each bit of the binary number. So, if we
want to implement the logic circuit for 5-bit 1's complement, five NOT gates will be
used.
Example 1: 11010.1101
For finding 1's complement of the given number, change all 0's to 1 and all 1's to 0. So
the 1's complement of the number 11010.1101 comes out 00101.0010.
2's Complement
Just like 1's complement, 2's complement is also used to represent the signed binary
numbers. For finding 2's complement of the binary number, we will first find the 1's
complement of the binary number and then add 1 to the least significant bit of it.
For example, if we want to calculate the 2's complement of the number 1011001, then
firstly, we find the 1's complement of the number that is 0100110 and add 1 to the LSB.
So, by adding 1 to the LSB, the number will be (0100110)+1=0100111.
Example:
Subtract (100) from (11) using 1's and 2's complement.
Ans. Given question is (11) - (100), making same digits we have (011) - (100)
A) Using 1's Complement,
First calculating 1's complement of (100) is (011)
Adding (011) with (011) we get
(011) + (011) = (110)
Since, there is no extra bit i.e. 3 digits added with 3 digits and gives 3 digits
result
Calculating 1's complement of (110) we get (001) and putting (-)ve sign
Hence, result is -(001)
Process of To generate a 1’s complement for any given To generate a 2’s complement for any given
Generation binary number, you only need to invert that binary number, you need to invert it. Then you
number. need to add 1 to the LSB (Least Significant Bit)
of the generated result.
Example For a binary number like 110010, the 1’s For a binary number like 110010, the 2’s
complement would be 001101. complement would be 001110.
Logic Gates It is a very simple type of implementation that It makes use of the BOT gate for every bit of
Used makes use of the NOT gate for every bit of input. input, along with a full adder.
Number You can use the 1’s in case of a signed binary You can use the 2’s in case of a signed binary
Representation representation. Still, you cannot use it as an representation. It is also the most suitable in the
ambiguous representation in the case of the form of an unambiguous representation of all the
number 0. available numbers.
K-bits Register In the case of a k-bits register, it can store the In the case of a k-bits register, it can store the
lowest negative number as -(2(k-1)-1) and the lowest negative number as -(2(k-1)) and the
largest positive number as (2(k-1)-1). largest positive number as (2(k-1)-1).
Representation The number 0 has two major representations- one The number -0 has a single representation for
of 0 is +0 (for instance, 0 0000 in a five-bit register), both +0 and -0 (for instance, 0 0000 in a five-bit
and the second one is -0 (for instance, 1 1111 in a register). Here, we always consider the zero to
five-bit register). be positive.
Sign Extension We need to use the sign extension for the In this case, too, we need to use the sign
conversion of any signed integer from a given extension. It converts any signed integer from a
sign to another one. given sign to another one.
End-Around- In the case of a 1’s complement arithmetic In the case of a 2’s complement arithmetic
Carry-Bit operation, there occurs an addition of the end- operation, no addition of end-around-carry-
around-carry-bit. We add it to the result’s LSB. bit occurs. It ignores this addition.
Ease of The complement arithmetic operations of 1’s The complement arithmetic operations of the 2’s
Operation type are not easier than the 2’s type because they type are much easier to operate than the 1’s type
always need to add end-around-carry-bit. because they lack the addition of end-around-
carry-bit.