Unit 5 Digital Elec
Unit 5 Digital Elec
Unit 5 Digital Elec
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.
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.
BOOLEAN ALGEBRA
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.
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
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.
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
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.
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.
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 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
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
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