Unit 5 Digital Elec

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

UNIT 5

DIGITAL ELECTRONICS

Digital Electronics
Logic gates, concept of universal logic; implementation of Boolean expressions using logic gates,
application of digital circuits: e.g., adder, subtractor, multiplexer, de-multiplexer, Analog to
Digital Converter, Digital to Analog Converter.

What is Digital Electronics?


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. The branch of electronics that deals with digital data
in the form of codes. There are only two codes in digital electronics, and they are 0 and 1. 0 is
considered to be low logic while 1 is considered to be high logic. Digital electronics or the digital
circuit comprises various components that perform specific functions. These components are
divided into two categories:
 Active components
 Passive components
The active components are the transistors and diodes while the passive components are the
capacitors, resistors, inductors, etc.
LOGIC GATES:
Logic gates are the basic building blocks of any digital system. It is an electronic circuit having
one or more than one input and only one output. The relationship between the input and the output
is based on a certain logic. Based on this, logic gates are named as AND gate, OR gate, NOT gate
etc.

1. AND GATE:

A circuit which performs an AND operation is shown in figure. It has n input (n >= 2) and one
output.

Logic diagram

Truth Table

2. OR GATE:

A circuit which performs an OR operation is shown in figure. It has n input (n >= 2) and one
output.
Logic diagram

Truth Table

3. NOT GATE:

NOT gate is also known as Inverter. It has one input A and one output Y.

Logic diagram

Truth Table
4. NAND GATE

A NOT-AND operation is known as NAND operation. It has n input (n >= 2) and one output.

Logic diagram

Truth Table

5. NOR GATE

A NOT-OR operation is known as NOR operation. It has n input (n >= 2) and one output.

Logic diagram
Truth Table

6. XOR GATE

XOR or Ex-OR gate is a special type of gate. It can be used in the half adder, full adder and
subtractor. The exclusive-OR gate is abbreviated as EX-OR gate or sometime as X-OR gate. It
has n input (n >= 2) and one output.

Logic diagram

Truth Table

7. XNOR GATE
XNOR gate is a special type of gate. It can be used in the half adder, full adder and subtractor.
The exclusive-NOR gate is abbreviated as EX-NOR gate or sometime as X-NOR gate. It has n
input (n >= 2) and one output.

Logic diagram

Truth Table
Realization of Logic Gate Using Universal gates

In Boolean Algebra, the NAND and NOR gates are called universal gates because any
digital circuit can be implemented by using any one of these two i.e. any logic gate can
be created using NAND or NOR gates only.

1. Implementation of AND Gate using Universal gates.

a) Using NAND Gates


The AND gate can be implemented by using two NAND gates in the below fashion:

b) Using NOR Gates


Implementation of AND gate using only NOR gates as shown below:

2. Implementation of OR Gate using Universal gates.

a) Using NAND Gates


The OR gate can be implemented using the NAND gate as below:
b) Using NOR Gates
Implementation of OR gate using two NOR gates as shown in the picture below:

3. Implementation of NOT Gate using Universal gates.

a) Using NAND Gates


b) Using NOR Gates

BOOLEAN ALGEBRA

Boolean Algebra Simplification Table

Having established the switching operation of the AND, OR,


and NOT functions. We can now look at simplifying some basic Boolean
Algebra expressions to obtain a final expression that has the minimum
number of terms.
First let us start with something simple such as:
Example 1:
The Boolean Expression: A.(A + B)
Multiplying out the brackets gives us:

Then we can see that the Boolean expression of A.(A + B) can be reduced to
just “A” which follows Boole’s Absorption Law.

Example No 2
This time we will use three Boolean terms, A, B, and C and use the same
Boolean algebra simplification rules as before.
Boolean Expression: (A + B)(A + C)
Again, multiplying out the brackets gives us:
Then the Boolean expression of (A + B)(A + C) can be reduced to just “A +
B.C” using the various Boolean algebra laws.

Boolean Algebra Simplification Example No 3


This time we will again use the same three Boolean terms of A, B and C but
introduce a NOT function to one of the terms.
Boolean Expression: AB(BC + AC)

Then the Boolean expression of AB(BC+AC) is reduced to “ABC”.


Practice questions for Boolean Algebra:

BOOLEAN FUNCTION IMPLEMENTATION USING LOGIC GATES

The sum of product or SOP form is represented by using basic logic gates: AND gate and OR gate.
The SOP form implementation will have AND gates at its input side and as the output of the
function is the sum of all product terms, it has an OR gate at its output side. An important to
remember is that we use NOT gate to represent the inverse or complement of the variables.
Sum of Products (SOP)
Input AND
Output OR

 Implementation for 2 Input Variables

Let us understand how we can implement the following Boolean function using basic logic gates.
F = A B + A B’
In the given SOP function, we have one compliment term, B. So, to represent the compliment
input, we are using the NOT gates at the input side. And to represent the product term, we use
AND gates. See the below given logic diagram for representation of the Boolean function.
 Implementation for 3 Input Variables

Let us now see how to implement the following Boolean function by using basic logic gates. It is
a 3 input variable function.
F = A B C + A B C’ + A’ B C’
In the given function, we have two compliment terms, A and C. So, to represent the compliment
input, we are using the NOT gates at the input side. And to represent the product term, we use
AND gates. See the below given logic diagram for representation of the Boolean function.

POS Boolean Function Implementation using Logic Gates

The product of sums or POS form can be represented by using basic logic gates like AND gate
and OR gates. The POS form implementation will have the OR gate at its input side and as the
output of the function is product of all sum terms, it has AND gate at its output side. In POS form
implementation, we use NOT gate to represent the inverse or complement of the variables.
Product of Sums (POS)
Input OR
Output AND

 Implementation for 2 Input Variables

Let us now see how to implement the following Boolean function by using basic logic gates.
F = (A + B). (A + B’)
In the given function, we have a complement term, B. So, to represent the compliment input, we
are using the NOT gates at the input side. And to represent the sum term, we use OR gates. See
the below logic diagram for representation of the Boolean function.

 Implementation for 3 Input Variables:

F = (A + B + C). (A’ + B’ +C). (A + B’ + C)


In the given Boolean Function, we have two compliment terms, A and B. So, to represent the
compliment input, we are using the NOT gates at the input side. And to represent the sum term,
we use OR gates. See the below given logic diagram for representation of the Boolean function.
ADDERS AND SUBTRACTORS:

Addition and Subtraction are two basic Arithmetic Operations that must be performed by any
Digital Computer. If both these operations can be properly implemented, then Multiplication and
Division tasks become easy (as multiplication is repeated addition and division is repeated
subtraction). Consider the operation of adding two binary numbers, which is one of the
fundamental tasks performed by a digital computer. The four basic addition operations two single
bit binary numbers are:
 0+0=0
 1+0=1
 0+1=1
 1 + 1 = (Carry)1 0

In the first three operations, each binary addition gives sum as one bit, i.e., either 0 or 1. But for
the fourth addition operation (where the inputs are 1 and 1), the result consists of two binary digits.
Here, the lower significant bit is called as the ‘Sum Bit’, while the higher significant bit is called
as the ‘Carry Bit’. For single bit additions, there may not be an issue. The problem may arise when
we try to add binary numbers with more than one bit. The logic circuits which are designed to
perform the addition of two binary numbers are called as Binary Adder Circuits. Depending on
how they handle the output of the ‘1+1’ addition, they are divided into:
 Half Adder
 Full Adder
Let us take a look at the binary addition performed by various adder circuits.

HALF ADDER

A logic circuit used for adding two 1-bit numbers or simply two bits is called as a Half Adder
circuit. This circuit has two inputs and two outputs. The inputs are the two 1-bit binary numbers
(known as Augend and Addend) and the outputs are Sum and Carry.
The truth table of the Half Adder is shown in the following table.
INPUT OUTPUT
A B Sum Carry

0 0 0 0

0 1 1 0

1 0 1 0

1 1 0 1

If we observe the ‘Sum’ values in the above truth table, it resembles an Ex-OR Gate. Similarly,
the values for ‘Carry’ in the above truth table resembles an AND Gate. So, to properly implement
a Half Adder, you need two Logic Gates: an XOR gate for ‘Sum’ Output and an AND gate for
‘Carry’ output. The following image shows the Logic Diagram of a Half Adder.

In the above half adder circuit, inputs are labeled as A and B. The ‘Sum’ output is labeled
as summation symbol (∑) and the Carry output is labeled with CO. Half adder is mainly
used for addition of augend and addend of first order binary numbers i.e., 1-bit binary
numbers. We cannot add binary numbers with more than one bit as the Half Adder cannot
include the ‘Carry’ information from the previous sum. Due to this limitation, Half Adder
is practically not used in many applications, especially in multi-digit addition. In such
applications, carry of the previous digit addition must be added along with two bits; hence
it is a three bit addition.
FULL ADDER

A Full Adder is a combinational logic circuit which performs addition on three bits and produces
two outputs: a Sum and a Carry. As we have seen that the Half Adder cannot respond to three
inputs and hence the full adder is used to add three digits at a time. It consists of three inputs, of
which two are input variables representing the two significant bits to be added, whereas the third
input terminal is the carry from the previous addition. The two outputs are a Sum and Carry
outputs. The following image shows a block diagram of a Full Adder where the inputs are labelled
as A, B and CIN, while the outputs are labelled as ∑ and COUT.

Coming to the truth table, the following table shows the truth table of a Full Adder.

From the above truth table, we can obtain the Boolean Expressions for the logic circuits for Full
Adder. But by simplifying the equations further, we can derive at a point that a Full Adder can be
easily implemented using two Half Adders and an OR Gate. The following image shows a Full
Adder Circuit implemented using two Half Adders and an OR Gate. Here, A and B are the main
input bits, CIN is the carry input, ∑ and COUT are the Sum and Carry Outputs respectively.

BINARY SUBTRACTION CIRCUITS: SUBTRACTOR

Another basic arithmetic operation to be performed by Digital Computers is the


Subtraction. Subtraction is a mathematical operation in which one integer number is deducted from
another to obtain the equivalent quantity. The number from which other number is to be deducted
is called as ‘Minuend’ and the number subtracted from the minuend is called ‘Subtrahend’. Similar
to the binary addition, binary subtraction is also has four possible basic operations. They are:
 0–0=0
 0 – 1 = (Borrow)1 1
 1–0=1
 1–1=0
The above figure shows the four possible rules or elementary operations of the binary subtractions.
In all the operations, each subtrahend bit is deducted from the minuend bit. But in the second rule,
minuend bit is smaller than the subtrahend bit, hence 1 is borrowed to perform the subtraction.
Similar to the adder circuits, basic subtraction circuits are also of two types:
 Half Subtractor
 Full Subtractor

HALF SUBTRACTORS:

A Half Subtractor is a multiple output Combinational Logic Circuit that does the subtraction of
two 1-bit binary numbers. It has two inputs and two outputs. The two inputs correspond to the two
1-bit binary numbers and the two outputs corresponds to the Difference bit and Borrow bit (in
contrast to Sum and Carry in Half Adder). Following table shows the truth table of a Half
Subtractor.
INPUT OUTPUT
A B Difference Borrow
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
From the above truth table, we can say that the ‘Difference’ output of the Half Subtractor is similar
to an XOR output (which is also same as the Sum output of the Half Adder). Thus, the Half
Subtraction is also performed by the Ex-OR gate with an AND gate with one inverted input and
one normal input, requiring to perform the Borrow operation.
The following image shows the logic circuit of a Half Adder.

This circuit is similar to that of the Half Adder with only difference being the minuend input i.e.,
A is complemented before applied at the AND gate to implement the borrow output. In case of
multi-digit subtraction, subtraction between the two digits must be performed along with borrow
of the previous digit subtraction, and hence a subtractor needs to have three inputs, which is not
possible with a Half Subtractor.

FULL SUBTRACTOR:
A Full Subtractor is a combinational logic circuit which performs a subtraction between the two
1-bit binary numbers and it also considers the borrow of the previous bit i.e., whether 1 has been
borrowed by the previous minuend bit. So, a Full Subtractor has three inputs, in which two inputs
corresponding to the two bits to be subtracted (minuend A and subtrahend B), and a borrow bit,
usually represented as BIN, corresponding to the borrow operation. There are two outputs, one
corresponds to the difference D output and the other Borrow output B O.

The following table shows the truth table of a Full Subtractor.


INPUT OUTPUT
A B BIN D BOUT
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
By deriving the Boolean expression for the full subtractor from above truth table, we get the
expression that tells that a full subtractor can be implemented with half subtractors with OR gate
as shown in figure below.
By comparing the adder and subtractor circuits and truth tables, we can observe that the output D
in the full subtractor is exactly same as the output S of the full adder. And the only difference is
that input variable A is complemented in the full subtractor. Therefore, it is possible to convert the
full adder circuit into full subtractor by simply complementing the input A before it is applied to
the gates to produce the final borrow bit output Bo.
WHAT IS A MULTIPLEXER

The multiplexer is a device that has multiple inputs and single line output. The select lines
determine which input is connected to the output, and also increase the amount of data that can be
sent over a network within a certain time. It is also called a data selector. The single-pole multi-
position switch is a simple example of a non-electronic circuit of the multiplexer, and it is widely
used in many electronic circuits. The multiplexer is used to perform high-speed switching and is
constructed by electronic components.

Multiplexers are capable of handling both analog and digital applications. In analog applications,
multiplexers are made up of relays and transistor switches, whereas in digital applications, the
multiplexers are built from standard logic gates. When the multiplexer is used for digital
applications, it is called a digital multiplexer.
 Multiplexer Types

Multiplexers are classified into four types:


 2-1 multiplexer ( 1select line)
 4-1 multiplexer (2 select lines)
 8-1 multiplexer(3 select lines)
 16-1 multiplexer (4 select lines)

 Advantages and Disadvantages of Multiplexer:

The advantages of multiplexer include the following:


 In multiplexer, the usage of a number of wires can be decreased
 It reduces the cost as well as the complexity of the circuit
 The implementation of a number of combination circuits can be possible by using a multiplexer
 Mux doesn’t require K-maps & simplification
 The multiplexer can make the transmission circuit less complex & economical
 The dissipation of heat is less because of the analog switching current which ranges from 10mA
to 20mA.
The disadvantages of multiplexer include the following.
 Additional delays required within switching ports & I/O signals which propagate throughout
the multiplexer.
 The ports which can be utilized at the same time have limitations
 Switching ports can be handled by adding the complexity of firmware
 The controlling of multiplexer can be done by using additional I/O ports.

WHAT IS DEMULTIPLEXER

De-multiplexer is also a device with one input and multiple output lines. It is used to send a signal
to one of the many devices. The main difference between a multiplexer and a de-multiplexer is
that a multiplexer takes two or more signals and encodes them on a wire, whereas a de-multiplexer
does reverse to what the multiplexer does.

De-multiplexer
 Types of De-multiplexer

Demultiplexers are classified into four types


 1-2 demultiplexer (1 select line)
 1-4 demultiplexer (2 select lines)
 1-8 demultiplexer (3 select lines)
 1-16 demultiplexer (4 select lines)

 Advantages and Disadvantages of Demultiplexer

The advantages of demultiplexer include the following.


 A demultiplexer or Demux is used to divide the mutual signals back into separate streams.
 The function of Demux is quite opposite to MUX.
 The Audio or Video signals transmission needs a combination of Mux and Demux.
 Demux is used as a decoder within the security systems of banking sectors.
 The communication system efficiency can be enhanced through the combination of Mux &
Demux.
The disadvantages of demultiplexer include the following.
 Bandwidth wastage might happen
 Because of the synchronization of the signals, delays might take place
ANALOG TO DIGITAL CONVERTER

A converter that is used to change the analog signal to digital is known as an analog to digital
converter or ADC converter. This converter is one kind of integrated circuit or IC that converts
the signal directly from continuous form to discrete form. This converter can be expressed in A/D,
ADC, A to D. The inverse function of DAC is nothing but ADC. The analog to digital converter
symbol is shown below. The process of converting an analog signal to digital can be done in several
ways. There are different types of ADC chips available in the market from different manufacturers
like the ADC08xx series. So, a simple ADC can be designed with the help of discrete components.
The main features of ADC are sample rate and bit resolution.
 The sample rate of an ADC is nothing but how fast an ADC can convert the signal from analog
to digital.
 Bit resolution is nothing but how much accuracy can an analog to digital converter can convert
the signal from analog to digital.

One of the major benefits of ADC converter is the high data acquisition rate even at multiplexed
inputs. With the invention of a wide variety of ADC integrated circuits (IC’s), data acquisition
from various sensors becomes more accurate and faster. Dynamic characteristics of the high-
performance ADCs are improved measurement repeatability, low power consumption, precise
throughput, high linearity, excellent Signal-to-Noise Ratio (SNR), and so on. A variety of
applications of the ADCs are measurement and control systems, industrial instrumentation,
communication systems, and all other sensory-based systems. Classification of ADCs based on
factors like performance, bit rates, power, cost, etc.
DIGITAL TO ANALOG CONVERTER:
A Digital to Analog Converter (DAC) converts a digital input signal into an analog output signal.
The digital signal is represented with a binary code, which is a combination of bits 0 and 1.
The block diagram of DAC is shown in the following figure:

A Digital to Analog Converter (DAC) consists of a number of binary inputs and a single output.
In general, the number of binary inputs of a DAC will be a power of two. In order to understand
the data that we process in a digital domain, we need to convert it into analog domain. An example
of that would be the process of audio & video editing. We capture the data using our digital
camera & microphone to convert the analog data into digital. We process it using our computers
to edit it according to over needs. In order to view our edited work, we use DACs to convert it
back into the analog domain to view & listen it through our screen & speakers.
 Types of DACs
There are two types of DACs
 Weighted Resistor DAC
 R-2R Ladder DAC

You might also like