0% found this document useful (0 votes)
13 views

Intro To Digital Electronics

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

Intro To Digital Electronics

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

Digital Electronics

 Digital electronics is a field of electronics that deals with the study and
manipulation of digital signals and circuits.
 It involves the design, analysis, and implementation of electronic circuits that
operate on discrete or binary signals, commonly represented as 0s and 1s.
 In digital electronics, information is processed, stored, and transmitted in the
form of digital signals, which are characterized by discrete voltage levels.
 These voltage levels represent binary digits or bits, where a high voltage level
typically represents a logical "1" and a low voltage level represents a logical
"0".
 The fundamental building blocks of digital electronics are logic gates, which
are electronic devices that perform logical operations on binary inputs to
produce a binary output.
 Digital electronics circuits can be designed using various logic gate
technologies, such as transistors, diodes, and integrated circuits (ICs).
 These circuits can perform a wide range of functions, including arithmetic
operations, data storage, data transmission, and control operations.
 Digital electronics has numerous applications in various fields, including
computer systems, telecommunications, consumer electronics, industrial
automation, and many more.
 It forms the foundation of modern computing and information processing
systems, enabling the development of advanced technologies and devices such
as microprocessors, memory chips, digital cameras, smartphones, and digital
televisions.

COMPARISON BETWEEN ANALOGUE AND DIGITAL ELECTRONICS

 Analog and digital electronics are two distinct branches of electronics that
differ in their representation, processing, and manipulation of signals.

1. Signal Representation:
 Analog Electronics: Analog signals are continuous and can take on any
value within a given range. They are represented by varying voltage or
current levels that correspond to the magnitude of the signal.
 Digital Electronics: Digital signals are discrete and can only take on
specific values, typically represented as binary digits (bits), such as 0s
and 1s. The signal is represented by distinct voltage levels that
correspond to these binary values.
2. Signal Processing:
 Analog Electronics: Analog signals are processed using linear
techniques. Operations like amplification, filtering, and modulation are
performed directly on the continuous signal values.
 Digital Electronics: Digital signals are processed using binary logic
operations. Information is processed in discrete steps, typically involving
logic gates and digital circuits that perform operations like logic
functions, arithmetic calculations, and data manipulation.
3. Noise Immunity:
 Analog Electronics: Analog signals are susceptible to noise and
interference, which can degrade the quality of the signal. Noise can
distort the signal and introduce errors.
 Digital Electronics: Digital signals are less susceptible to noise and
interference. They can tolerate a certain level of noise without
significantly affecting the integrity of the signal. This is due to the
discrete nature of the digital representation, which allows for error
detection and correction techniques.
4. Signal Accuracy:
 Analog Electronics: Analog signals can provide continuous and accurate
representation of real-world phenomena. They can capture and
reproduce the subtle nuances of a signal, such as sound or temperature,
with high precision.
 Digital Electronics: Digital signals provide discrete and precise
representation, but they may not capture the full range of analog signals.
Analog-to-digital conversion is required to convert analog signals into
digital form, introducing some level of quantization error.
5. Storage and Transmission:
 Analog Electronics: Analog signals can be transmitted and stored
directly using analog media, such as vinyl records or cassette tapes. They
can be easily amplified and transmitted over long distances without
significant loss of quality.
 Digital Electronics: Digital signals are compatible with digital storage
devices and can be easily transmitted over digital communication
channels. They can be encoded, compressed, and error-corrected for
efficient storage and transmission.
6. Design Complexity:
 Analog Electronics: Analog circuit design can be complex and requires
careful consideration of component characteristics, signal conditioning,
and noise management.
 Digital Electronics: Digital circuit design is based on well-defined binary
logic principles, allowing for standardized building blocks and modular
design. Digital circuits can be more easily designed, analyzed, and
simulated using digital design tools.

BINARY SYSTEM

Binary Number System is a number system that is used to represent various


numbers using only two symbols “0” and “1”. The word binary is derived from the
word “bi” which means two. Hence, this number system is called Binary Number
System. Thus, the binary number system is a system that has only two symbols.
There are generally various types of number systems and among them the four major
ones are,
 Binary Number System (Number system with Base 2)
 Octal Number System (Number system with Base 8)
 Decimal Number System (Number system with Base 10)
 Hexadecimal Number System (Number system with Base 16)
Binary Number System
Binary Number System is the number system in which we use two digits “0” and “1”
to perform all the necessary operations. In the Binary Number System, we have a
base of 2. The base of the Binary Number System is also called the radix of
the number system.
In a binary number system, we represent the number as,
 (11001)2
In the above example, a binary number is given in which the base is 2. In a binary
number system, each digit is called the “bit”. In the above example, there are 5
digits.
Binary Number Table
Decimal Number Binary Number Decimal Number Binary Number

1 001 11 1011

2 010 12 1100

3 011 13 1101

4 100 14 1110

5 101 15 1111

6 110 16 10000

7 111 17 10001

8 1000 18 10010

9 1001 19 10011

10 1010 20 10100

Binary to Decimal Conversion


A binary number is converted into a decimal number by multiplying each digit of the
binary number by the power of either 1 or 0 to the corresponding power of 2. Let us
consider that a binary number has n digits, B = a n-1…a3a2a1a0. Now, the
corresponding decimal number is given as
D = (an-1 × 2n-1) +…+(a3 × 23) + (a2 × 22) + (a1 × 21) + (a0 × 20)
Example: Convert (10011) 2 to a decimal number.
Solution:
The given binary number is (10011) 2.
(10011)2 = (1 × 24) + (0 × 23) + (0 × 22) + (1 × 21) + (1 × 20)
= 16 + 0 + 0 + 2 + 1 = (19) 10
Hence, the binary number (10011) 2 is expressed as (19) 10
.
Decimal to Binary Conversion

A decimsl number is converted into a binary number by dividing the given decimal
number by 2 continuously until we get the quotient as 1, and we write the numbers
from downwards to upwards.
Example: Convert (28)10 into a binary number.
Solution:

Hence, (28)10 is expressed as (11100) 2.

ARITHMETIC OPERATIONS ON BINARY NUMBERS


We can easily perform various operations on Binary Numbers. Various arithmetic
operations on the Binary number include,
 Binary Addition
 Binary Subtraction
 Binary Multiplication
 Binary Division

BINARY ADDITION

The result of the addition of two binary numbers is also a binary number. To obtain
the result of the addition of two binary numbers, we have to add the digit of the
binary numbers by digit. The table added below shows the rule of binary addition.
Binary Number (1) Binary Number (2) Addition Carry

0 0 0 0

0 1 1 0

1 0 1 0

1 1 0 1

BINARY SUBTRACTION

The result of the subtraction of two binary numbers is also a binary number. To
obtain the result of the subtraction of two binary numbers, we have to subtract the
digit of the binary numbers by digit. The table added below shows the rule of binary
subtraction.
Binary Number (1) Binary Number (2) Subtraction Borrow

0 0 0 0

0 1 1 1

1 0 1 0
Binary Number (1) Binary Number (2) Subtraction Borrow

1 1 0 0

BINARY MULTIPLICATION

The multiplication process of binary numbers is similar to the multiplication of


decimal numbers. The rules for multiplying any two binary numbers are given in the
table,
Binary Number (1) Binary Number (2) Multiplication

0 0 0

0 1 0

1 0 0

1 1 1

BINARY DIVISION

The division method for binary numbers is similar to that of the decimal number
division method. Example: Divide (101101) 2 by (110)2
Solution:
1’s and 2’s Complement of a Binary Number

 1’s Complement of a Binary Number is obtained by inverting the digits of


the binary number.

Example: Find the 1’s complement of (10011) 2.

Solution:
Given Binary Number is (10011) 2
Now, to find its 1’s complement, we have to invert the digits of the given number.
Thus, 1’s complement of (10011) 2 is (01100)2

 2’s Complement of a Binary Number is obtained by inverting the digits of the


binary number and then by adding 1 to the least significant bit.

Example: Find the 2’s complement of (1011) 2.

Solution:
Given Binary Number is (1011) 2
To find the 2’s complement, first find its 1’s complement, i.e., (0100) 2
Now, by adding 1 to the least significant bit, we get (0101) 2
Hence, the 2’s complement of (1011) 2 is (0101)2
USES OF BINARY NUMBER SYSTEM

Binary Number Systems are used for various purposes and the most important use of
the binary number system is,
 Binary Number System is used in all Digital Electronics for performing various
operations.
 Programming Languages uses Binary Number System for encoding and decoding
data.
 Binary Number System is used in Data Sciences for various purposes, etc.

Binary Number System Example

Example 1: Convert Decimal Number (98) 10 into Binary.


Solution:

Thus, Binary Number for (98) 10 is equal to (1100010) 2


Example 2: Convert Binary Number (1010101) 2 to Decimal Number.
Solution:
Given Binary Number, (1011101) 2
= (1 × 20) + (0 × 21) + (1 × 22) + (0 × 23) + (1 × 24) + (0 × 25) + (1 ×26)
= 1 + 0 + 4 + 0 + 16 + 0 + 64
= (85)10
Thus, Binary Number (1010101) 2 is equal to (85)10 in decimal system.

Example 3: Divide (11110) 2 by (101)2


Solution:

Example 4: Add (11011) 2 and (10100)2


Solution:

Hence, (11011)2 + (10100)2 = (101111)2

Example 5: Subtract (11010) 2 and (10110)2


Solution:

Hence, (11010)2 &#x2013 (10110)2 = (00100)2

Example 6: Multiply (1110) 2 and (1001)2.


Solution:
Thus, (1110)2 × (1001)2 = (1111110)2

NUMBER SYSTEMS
 Electronic and Digital systems may use a variety of different number systems,
(e.g. Decimal, Hexadecimal, Octal, Binary), or even Duodecimal or less well
known but better named Uncial.
 All the other bases other than Decimal result from computer usage. Uncial
(named from Latin for 1/12 “uncia” the base twelve analogue of Decimal
from the Latin word for 1/10 “decima”).
A number N in base or radix b can be written as:
(N)b = dn-1 dn-2 -- -- -- -- d1 d0 . d-1 d-2 -- -- -- -- d-m
In the above, dn-1 to d0 is the integer part, then follows a radix point, and then d -1 to d-
m is the fractional part.

dn-1 = Most significant bit (MSB)


d-m = Least significant bit (LSB)

HOW TO CONVERT A NUMBER FROM ONE BASE TO ANOTHER?

1. Decimal to Binary
(10.25)10
Note: Keep multiplying the fractional part with 2 until decimal part 0.00 is
obtained.
(0.25)10 = (0.01)2
Answer: (10.25)10 = (1010.01)2

2. Binary to Decimal
(1010.01)2
1x23 + 0x22 + 1x21+ 0x20 + 0x2 -1 + 1x2 -2 = 8+0+2+0+0+0.25 = 10.25
(1010.01)2 = (10.25)10

3. Decimal to Octal
(10.25)10
(10)10 = (12)8
Fractional part:
0.25 x 8 = 2.00
Note: Keep multiplying the fractional part with 8 until decimal part .00 is obtained.
(.25)10 = (.2)8
Answer: (10.25)10 = (12.2)8

4. Octal to Decimal
(12.2)8
1 x 81 + 2 x 80 +2 x 8-1 = 8+2+0.25 = 10.25
(12.2)8 = (10.25)10
5. Hexadecimal to Binary
To convert from Hexadecimal to Binary, write the 4-bit binary equivalent of
hexadecimal.

(3A)16 = (00111010)2

6. Binary to Hexadecimal
To convert from Binary to Hexadecimal, start grouping the bits in groups of 4 from
the right-end and write the equivalent hexadecimal for the 4-bit binary. Add extra
0’s on the left to adjust the groups.
1111011011
0011 1101 1011
(001111011011)2 = (3DB)16
7. Binary to Octal
To convert from binary to octal, start grouping the bits in groups of 3 from the right
end and write the equivalent octal for the 3-bit
binary. Add 0’s on the left to adjust the groups.
Example:
111101101
111 101 101
(111101101)2 = (755)8
BINARY CODED DECIMAL, OR BCD
Is another process for converting decimal numbers into their binary equivalents.

 It is a form of binary encoding where each digit in a decimal number is


represented in the form of bits.
 This encoding can be done in either 4-bit or 8-bit (usually 4-bit is preferred).
 It is a fast and efficient system that converts the decimal numbers into binary
numbers as compared to the existing binary system.
 These are generally used in digital displays where is the manipulation of data is
quite a task.
 Thus BCD plays an important role here because the manipulation is done treating
each digit as a separate single sub-circuit.
 The BCD equivalent of a decimal number is written by replacing each decimal
digit in the integer and fractional parts with its four bit binary equivalent.
 The BCD code is more precisely known as 8421 BCD code , with 8,4,2 and 1
representing the weights of different bits in the four-bit groups, Starting from
MSB and proceeding towards LSB.
 This feature makes it a weighted code, which means that each bit in the four bit
group representing a given decimal digit has an assigned weight.
 Many decimal values, have an infinite place-value representation in binary but
have a finite place-value in binary-coded decimal.
 For example, 0.2 in binary is .001100… and in BCD is 0.0010. It avoids
fractional errors and is also used in huge financial calculations.

Consider the following truth table and focus on how these are represented.
Truth Table for Binary Coded Decimal

DECIMAL NUMBER BCD

0 0000

1 0001

2 0010

3 0011

4 0100
DECIMAL NUMBER BCD

5 0101

6 0110

7 0111

8 1000

9 1001

In the BCD numbering system, the given decimal number is segregated into chunks
of four bits for each decimal digit within the number. Each decimal digit is
converted into its direct binary form (usually represented in 4-bits).
For example:

1. Convert (123)10 in BCD


From the truth table above,
1 -> 0001
2 -> 0010
3 -> 0011
thus, BCD becomes -> 0001 0010 0011

2. Convert (324)10 in BCD


(324)10 -> 0011 0010 0100 (BCD)
Again from the truth table above,
3 -> 0011
2 -> 0010
4 -> 0100
thus, BCD becomes -> 0011 0010 0100

This is how decimal numbers are converted to their equivalent BCDs.


 It is noticeable that the BCD is nothing more than a binary representation of
each digit of a decimal number.
 It cannot be ignored that the BCD representation of the given decimal number
uses extra bits, which makes it heavy-weighted.

EXCESS 3 CODE
 The Excess-3 code, also known as the Stibitz code, it is a binary coded
decimal (BCD) code that is utilized to address decimal digits that are arranged
in a particular double structure.
 In this coding plan, each decimal digit is tended to by its relating 4-bit double
portrayal with the extension of 3.
 The essential job of Excess-3 code is to enhance math undertakings in a
twofold environment, especially in early figuring systems and smaller than
normal PCs.
Understanding Concepts of Excess-3
 The XS-3 code is regarded as the Excess-3 code.
 To address decimal numbers, the excess-3 code is a self-correlative, non-
weighted BCD code. The portrayal of this code is biased.
 This code expects a huge part in calculating undertakings since it settle needs
experienced when we use the 8421 BCD code for adding two decimal digits
whose total is more unmistakable than 9.
 As opposed to the typical non-one-sided BCD or the twofold positional
number framework, the Overabundance 3 code utilizes an exceptional sort of
calculation.
 We can without a doubt get an excesss-3 code of a decimal number by
essentially adding 3 to each decimal digit. For each digit of the decimal
number, we then compose the 4-bit binary number.
The following steps can be used to locate the abundance 3 code for the given
two-digit number:
 We track down the decimal number of the given parallel number.
 Then, we add 3 in each digit of the decimal number.
 The parallel code for every digit of the recently produced decimal number can
now be found.
We can moreover add 0011 in each 4 bit BCD code of the decimal number for
getting Excess-3 code.
The Excess-3 code for the decimal number is as follows:
DECIMAL DIGIT BCD CODE EXCESS-3 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

In excess-3 code, the codes 1111 and 0000 are never used for any decimal digit.
Solved Examples of Excess 3 Code
Example – 1 : Decimal number of 9
Binary Representation of 9 is 1001
Now Add 3 to Each Bit: 1001 + 0011 = 1100
Therefore, 1100 is the Excess – 3 code for the decimal number 9

Example – 2 : Decimal number of 15


Binary Representation of 15 is 1111
Now Add 3 to Each Bit : 1111 + 0011 = 0010
Therefore, 0010 is the Excess – 3 code for the decimal number 15

Example – 3 : Decimal number of 6


Binary Representation of 6 is 0110
Now Add 3 to each Bit: 0110 + 0011 = 1101
Therefore, 1101 is the Excess – 3 code for the decimal number 6

WHAT IS GRAY CODE?

 The binary numeral system is ordered in the reflected binary code, also known
as the Gray code, so that two subsequent values only differ in one bit (binary
digit).
 In the typical sequence of binary numbers produced by the hardware that
could provide an error or ambiguity during the change from one number to the
next, gray codes are highly helpful.
Because the first (n/2) values compare with the last (n/2) values in reverse order,
gray code is also known as reflected binary code.

Characteristics and Properties of Gray Code


1. Single Bit Change: Gray code only allows for one bit to change when changing
from one value to another. Because there is less ambiguity when changing
values, this feature lessens the possibility of errors and glitches in digital
systems.
2. Reflection Property: A straightforward way for creating the Gray Code
sequence entails reflecting the current sequence before prefixing the new
sequence with a new bit. For instance, start with a 2-bit Gray Code sequence and
reflect it to make a 3-bit Gray Code sequence. The single-bit change property is
upheld by the reflection property, which also makes sure the sequence is cyclic.

Types of Gray Codes

 Binary Reflected Gray Code: The most typical kind of Gray code utilized in
digital systems is the binary reflected Gray code, also referred to as the reflected
Gray code. Each succeeding number in this code differs from the one before it by
a single bit. The binary code for each number is mirrored before being
transformed into the Gray code, which is how the code gets its name.
 Balanced Gray Code: Transition counts has equal in balanced Gray code. it is a
unique variety of gray code in which every potential value appears exactly once
in the sequence. A good example of where this kind of Gray coding is important
in analog-to-digital converters.
 N-ary Gray Code: This Gray code consist non-Boolean values like sequences of
1, 2, 3.
 Two dimensional Gray code: This kind of Gray code is helpful in error
correction.
 Sequential Gray Code: Every number in the sequence is either the predecessor
or the successor of the one before it. Certain applications, including robotics and
manufacturing procedures, use this kind of Gray code.

CONVERSION OF GRAY CODE

Gray code and binary conversion are essential for understanding and resolving
issues in digital systems. The most significant bit (MSB) of a binary integer is
converted to gray code by taking the XOR of the bit that is now in use and the bit
that is immediate to its left in the binary representation.

n Bit Gray Code

The below table represents the gray code of decimals from 0 to 10.
Decimal Binary Code Gray Code

0 0000 0000

1 0001 0001

2 0010 0011

3 0011 0010
Decimal Binary Code Gray Code

4 0100 0110

5 0101 0111

6 0110 0101

7 0111 0100

8 1000 1100

9 1001 1101

10 1010 1111

HOW TO GENERATE GRAY CODE?


Recursively, the prefix and reflect methods are used to create a number’s Gray code.
To create gray code:
 We determine how many bits are necessary to represent a number.
 The binary equivalent of 0 is found next, which is the code 0000.
 The most important portion of the preceding code, 0000, will now be changed.
 Until all of the codes cannot be uniquely identified, we carry out this process in
reclusively.
 If we change the most significant bit and still get the same code as before, we
change the second-most significant bit, and so on.
DIFFERENCES BETWEEN BCD, GRAY CODE AND
EXCESS-3 CODE
BCD(Binary
FEATURE Coded Decimal) Gray Code Excess-3

It represents It represents It represents


decimal digits from decimal digits decimal digits from
Decimal Range 0 to 9 from 0 to 9 -3 to 6

It is Not well-
It is well- suited for suited for It is well- suited for
Arithmetic arithmetic operation arithmetic arithmetic operation
Operation operation
BCD(Binary
FEATURE Coded Decimal) Gray Code Excess-3

Code Efficiency Less efficient More efficient Less efficient

Only one bit Multiple bits


Multiple bits change
Bit Changes changes changes

It provides good
BCD provides good error detection due It provides good
error detection to single bit error detection
Error Detection changes

Straightforward More complex Subtracting 3 from


Binary to Decimal conversion from 4 conversion due to each 4 bit binary
Conversion bit to decimal non linear nature representation

Commonly used in
it is used in rotary it is used in BCD
displays and
encoders adders
Applications calculators

You might also like