0% found this document useful (0 votes)
22 views11 pages

Digital Electronics Notes

Uploaded by

akashuttam24
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)
22 views11 pages

Digital Electronics Notes

Uploaded by

akashuttam24
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/ 11

Unit-1

Digital electronics is a field of electronics involving the study of digital signals and the
engineering of devices that use or produce them. This is in contrast to analog
electronics and analog signals.
Digital electronic circuits are usually made from large assemblies of logic gates, often
packaged in integrated circuits. Complex devices may have simple electronic
representations of Boolean logic functions.
An integrated circuit or monolithic integrated circuit (also referred to as an IC, a chip, or
a microchip) is a set of electronic circuits on one small flat piece (or "chip")
of semiconductor material, usually silicon. Large numbers of miniaturized transistors and
other electronic components are integrated together on the chip.

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.
In simple terms, for representing the information, we use the number system in the digital
system.

The digit value in the number system is calculated using:


 The digit
 The index, where the digit is present in the number.
 Finally, the base numbers, the total number of digits available in the number system.
For example: - When the number system represents a digit from 0 - 9, the base of the
number will be 10.

Types of Number System


In the digital computer, there are various types of number systems used for representing
information.
 Binary Number System
 Decimal Number System
 Hexadecimal Number System
 Octal Number System

Number Base Conversion


In our previous section, we learned different types of number systems such as
binary, decimal, octal, and hexadecimal. In this part, 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
 Binary to other Number Systems.
 Decimal to other Number Systems.
 Octal to other Number Systems.
 Hexadecimal to other Number Systems.
Binary to Decimal Conversion

Example (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

Binary to Octal Conversion

Example 1: (111110101011.0011)2
1. Firstly, we make pairs of three bits on both sides of the binary point.
111 110 101 011.001 1
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.
111 110 101 011.001 100
2. Then, we wrote the octal digits, which correspond to each pair.
(111110101011.0011)2= (7653.14)8

Binary to Hexadecimal Conversion

Example 1: (10110101011.0011)2 = (5AB.3)16


1. Firstly, we make pairs of four bits on both sides of the binary point.
0101 1010 1011. 0011
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.
0101 1010 1011.0011
2. Then, we write the hexadecimal digits, which correspond to each pair.
(011110101011.0011)2= (7AB.3)16

Decimal to Binary Conversion

Example 1: (152.25)10

Operation Quotient Remainder

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

(152)10= (10011000)2
Step 2:
Now, perform the multiplication of 0.25 and successive fraction with base 2.
(0.25)10= (.01)2

Decimal to Octal Conversion

Example 1: (152.25)10
Step 1:
Divide the number 152 and its successive quotients with base 8.
Operation Quotient Remainder

152/8 19 0

19/8 2 3

2/8 0 2

(152)10= (230)8

Operation Result carry

0.25×8 0 2

(0.25)10= (2)

So, the octal number of the decimal number 152.25 is 230.2

Decimal to hexadecimal conversion

Example 1: (152.25)10

Operation Quotient Remainder

152/16 9 8

9/16 0 9

Operation Result carry

0.25×16 0 4

(0.25)10= (4)16

So, the hexadecimal number of the decimal number 152.25 is 230.4.


Octal to Decimal Conversion

Example 1: (152.25)8

(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

So, the decimal number of the octal number 152.25 is 106.328125

Octal to Binary Conversion

Example 1: (152.25)8
We write the three-bit binary digit for 1, 5, 2, and 5.
(152.25)8= (001101010.010101)2
So, the binary number of the octal number 152.25 is (001101010.010101)2

Octal to hexadecimal conversion

For converting octal to hexadecimal, there are two steps required to perform, which are as
follows:
In the first step, we will find the binary equivalent of number 25.
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:
We write the three-bit binary digit for 1, 5, 2, and 5.
(152.25)8= (001101010.010101)2
So, the binary number of the octal number 152.25 is (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.
0000 0110 1010.0101 0100
2. Now, we write the hexadecimal digits, which correspond to each pair.
(0000 0110 1010.0101 0100)2= (6A.54)16

Hexa-decimal to Decimal Conversion

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

So, the decimal number of the hexadecimal number 152A.25 is 5418.14453125

Hexadecimal to Binary Conversion

The process of converting hexadecimal to binary is the reverse process of binary to


hexadecimal. We write the four bits binary code of each hexadecimal number digit.

Example 1: (152A.25)16
We write the four-bit binary digit for 1, 5, A, 2, and 5.
(152A.25)16= (0001 0101 0010 1010.0010 0101)2
So, the binary number of the hexadecimal number 152.25 is (1010100101010.00100101)2

Hexadecimal to Octal Conversion

Example 1: (152A.25)16
Step 1:
We write the four-bit binary digit for 1, 5, 2, A, and 5.
(152A.25)16= (0001 0101 0010 1010.0010 0101)2
So, the binary number of hexadecimal number 152A.25 is (0011010101010.010101)2
Step 2:
3. Then, we make pairs of three bits on both sides of the binary point.
001 010 100 101 010.001 001 010
4. Then, we write the octal digit, which corresponds to each pair.
(001010100101010.001001010)2= (12452.112)8
So, the octal number of the hexadecimal number 152A.25 is 12452.112

Gray Code
Book Definition (M. Morris Mano)

Gray Code Table

Ex:- Binary 100101=(1 then 1+0 then 0+0 then 0+1 then 1+0 then 0+1) = Gray
Code(110111)
Decimal Binary Gray
Number Number Code

0 0000 0000

1 0001 0001

2 0010 0011

3 0011 0010

4 0100 0110

5 0101 0111

6 0110 0101

7 0111 0100

8 1000 1100

9 1001 1101

10 1010 1111

11 1011 1110

12 1100 1010

13 1101 1011

14 1110 1001

15 1111 1000

Excess-3 Code

The excess-3 code is also treated as XS-3 code. The excess-3 code is a non-weighted and
self-complementary BCD code used to represent the decimal numbers.
We can find the excess-3 code of the given binary number by using the following steps:
 We find the decimal number of the given binary number.
 Then we add 3 in each digit of the decimal number.
 Now, we find the binary code of each digit of the newly generated decimal number.
We can also add 0011 in each 4-bit BCD code of the decimal number for getting excess-3
code.
Decimal BCD Code Excess-3
Digit Code

0 0000 0011

1 0001 0100

2 0010 0101

3 0011 0110

4 0100 0111

5 0101 1000

6 0110 1001

7 0111 1010

8 1000 1011

9 1001 1100

Example 2: Decimal number 81.61


1. We find the BCD code of each digit of the decimal number.

Digit BCD

8 1000

1 0001

6 0110

1 0001

2) Then, we add 0011 in both of the BCD code.

Decimal BCD Excess-3

8 1000+0011 1011

1 0001+0011 0100

6 0110+0011 1001

(3) So, the excess-3 code of the decimal number 81.61 is 1011 0100.1001 0100
Signed Numbers
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.
 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
by inverting each bit of a number, we can obtain the 1's complement of a number.
The negative numbers can be represented in the form of 1's complement. In this
form, the binary number also has an extra bit for sign representation as a sign-
magnitude form.
 2's Complement
by inverting each bit of a number and adding plus 1 to its least significant bit, we can
obtain the 2's complement of a number. The negative numbers can also be
represented in the form of 2's complement. In this form, the binary number also has
an extra bit for sign representation as a sign-magnitude form.
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.
Example 1: 11010.1101=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.
9's Complement
The 9's complement is used to find the subtraction of the decimal numbers. The 9's
complement of a number is calculated by subtracting each digit of the number by 9. For
example, suppose we have a number 1423, and we want to find the 9's complement of the
number. For this, we subtract each digit of the number 1423 by 9. So, the 9's complement of
the number 1423 is 9999-1423= 8576.
10's Complement
The 10's complement is also used to find the subtraction of the decimal numbers. The 10's
complement of a number is calculated by subtracting each digit by 9 and then adding 1 to
the result. Simply, by adding 1 to its 9's complement we can get its 10's complement value.
For example, suppose we have a number 1423, and we want to find the 10's complement of
the number. For this, we find the 9's complement of the number 1423 that is 9999-1423=
8576, and now we will add 1 to the result. So the 10's complement of the number 1423 is
8576+1=8577.
Addition and Subtraction using 1's complement

Example: 1101 and -1001


First, find the 1's complement of the negative number 1001. So, for finding 1's complement,
change all 0 to 1 and all 1 to 0. The 1's complement of the number 1001 is 0110.
Now, add both the numbers, i.e., 1101 and 0110;
1101+0110=1 0011
By adding both numbers, we get the end-around carry 1. We add this end around carry to
the LSB of 0011.
0011+1=0100

Addition and Subtraction using 2's complement

Example: 1101 and -1001


First, find the 2's complement of the negative number 1001. So, for finding 2's complement,
change all 0 to 1 and all 1 to 0 or find the 1's complement of the number 1001. The 1's
complement of the number 1001 is 0110, and add 1 to the LSB of the result 0110. So the 2's
complement of number 1001 is 0110+1=0111
Add both the numbers, i.e., 1101 and 0111;
1101+0111=1 0100
By adding both numbers, we get the end-around carry 1. We discard the end-around carry.
So, the addition of both numbers is 0100.

Logic Gates
Logic gates play an important role in circuit design and digital systems. It is a building block
of a digital system and an electronic circuit that always have only one output. These gates
can have one input or more than one input, but most of the gates have two inputs. On the
basis of the relationship between the input and the output, these gates are named as AND
gate, OR gate, NOT gate, etc.

AND Gate

This gate works in the same way as the logical operator "and". The AND gate is a circuit
that performs the AND operation of the inputs. This gate has a minimum of 2 input values
and an output value.
Example:- Y=A AND B AND C AND D……N
Y=A.B.C.D……N
Y=ABCD……N

You might also like