Unit Iv Digital Electronics
Unit Iv Digital Electronics
DIGITAL
ELECTRONICS
1
Boolean Algebra
2
Boolean Algebra
3
3.2 Boolean Algebra
4
3.2 Boolean Algebra
5
3.2 Boolean Algebra
6
3.3 Logic Gates
7
3.3 Logic Gates
• The three simplest gates are the AND, OR, and NOT
gates.
9
3.3 Logic Gates
10
3.3 Logic Gates
11
3.3 Logic Gates
12
Combinational circuits are defined as the time independent circuits which do
not depends upon previous inputs to generate any output are termed as
combinational circuits.
Sequential circuits are those which are dependent on clock cycles and depends
on present as well as past inputs to generate any output.
13
14
Combinational Logic Circuits Sequential Logic Circuits
Output is a function of clock, present
Output is a function of the present inputs
inputs and the previous states of the
(Time Independent Logic).
system.
Have memory to store the present states
Do not have the ability to store data (state). that is sent as control input (enable) for the
next operation.
It does not require any feedback. It simply It involves feedback from output to input
outputs the input according to the logic that is stored in the memory for the next
designed. operation.
Used mainly for Arithmetic and Boolean Used for storing data (and hence used in
operations. RAM).
Logic gates are the elementary building Flip flops (binary storage device) are the
blocks. elementary building unit.
Independent of clock and hence does not Clocked (Triggered for operation with
require triggering to operate. electronic pulses).
Example: Counter [Previous O/P
Example: Adder [1+0=1; Dependency only
+1=Current O/P; Dependency on present
on present inputs i.e., 1 and 0].
input as well as previous state].
15
HALF ADDER
&
FULL ADDER
16
An adder is a digital logic circuit in electronics that implements addition of
numbers. In many computers and other types of processors, adders are used to
calculate addresses, similar operations and table indices in the ALU and also in other
parts of the processors. These can be built for many numerical representations like
excess-3 or binary coded decimal. Adders are classified into two types: half adder and
full adder. The half adder circuit has two inputs: A and B, which add two input digits
and generate a carry and sum. The full adder circuit has three inputs: A and C, which
add the three input numbers and generate a carry and sum. This article gives brief
information about half adder and full adder in tabular forms and circuit diagrams. 17
An adder is a digital circuit that performs addition of numbers. The half
adder adds two binary digits called as augend and addend and produces two outputs
as sum and carry; XOR is applied to both inputs to produce sum and AND gate is
applied to both inputs to produce carry. The full adder adds 3 one bit numbers, where
two can be referred to as operands and one can be referred to as bit carried in. And
Full Adder
produces 2-bit output, and these can be referred to as output carry and sum.
This adder is difficult to implement than a half-adder. The difference between a half-adder
and a full-adder is that the full-adder has three inputs and two outputs, whereas half
adder has only two inputs and two outputs. The first two inputs are A and B and the third
input is an input carry as C-IN. When a full-adder logic is designed, you string eight of them
18
19
3.5 Combinational Circuits
20
3.5 Combinational Circuits
21
3.5 Combinational Circuits
22
3.5 Combinational Circuits
23
3.5 Combinational Circuits
24
ENCODER
&
DECODER
25
An Encoder is a combinational circuit that performs the reverse operation of
Decoder. It has maximum of 2n input lines and ‘n’ output lines. It will produce a binary
code equivalent to the input, which is active High. Therefore, the encoder encodes
2n input lines with ‘n’ bits. It is optional to represent the enable signal in encoders.
26
4 : 2 Encoder
The 4 to 2 Encoder consists of four inputs Y3, Y2, Y1 & Y0 and two outputs A1
& A0. At any time, only one of these 4 inputs can be ‘1’ in order to get the respective
binary code at the output. The figure below shows the logic symbol of 4 to 2 encoder :
27
The Truth table of 4 to 2 encoder is as follows :
A1 = Y3 + Y2
A0 = Y3 + Y1
28
The above two Boolean functions A1 and A0 can be implemented using two
input OR gates :
29
8 : 3 Encoder (Octal to Binary) –
and 3 outputs : A2, A1 & A0. Each input line corresponds to each octal digit
and three outputs generate corresponding binary code.
The figure below shows the logic symbol of octal to binary encoder:
30
The truth table for 8 to 3 encoder is as follows :
31
Logical expression for A2, A1 and A0 :
A2 = Y7 + Y6 + Y5 + Y4
A1 = Y7 + Y6 + Y3 + Y2
A0 = Y7 + Y5 + Y3 + Y1
The above two Boolean functions A2, A1 and A0 can be implemented using four input
OR gates :
32
Decimal to BCD Encoder –
The decimal to binary encoder usually consists of 10 input lines and 4 output
lines. Each input line corresponds to the each decimal digit and 4 outputs
correspond to the BCD code. This encoder accepts the decoded decimal data as
an input and encodes it to the BCD output which is available on the output lines.
The figure below shows the logic symbol of decimal to BCD encoder :
33
34
35
36
37
A decoder does the opposite job of an encoder. It is a combinational circuit that
converts n lines of input into 2n lines of output.
Let’s take an example of 3-to-8 line decoder.
38
39
HENCE
40
3.5 Combinational Circuits
41
MULTIPLEXUR
&
DEMULTIPLEXUR
42
In the large-scale-digital systems, a single line is required to carry on two
or more digital signals – and, of course! At a time, one signal can be placed on the
one line. But, what is required is a device that will allow us to select; and, the signal
we wish to place on a common line, such a circuit is referred to as multiplexer.
The function of a multiplexer is to select the input of any ‘n’ input lines and
feed that to one output line. The function of a de-multiplexer is to inverse the
function of the multiplexer and the shortcut forms of the multiplexer. The de-
multiplexers are mux and demux. Some multiplexers perform both multiplexing and
43
44
A multiplexer is a circuit that accept many input but give only one
output. A demultiplexer function exactly in the reverse of a multiplexer, that is
a demultiplexer accepts only one input and gives many outputs. Generally
multiplexer and demultiplexer are used together, because of the communication
Mutliplexer:
systems are bi directional.
Multiplexer means many into one. A multiplexer is a circuit used to
select and route any one of the several input signals to a signal output. An
simple example of an non electronic circuit of a multiplexer is a single pole
45
multiposition switch.
Multiposition switches are widely used in many electronics circuits. However
circuits that operate at high speed require the multiplexer to be automatically
selected. A mechanical switch cannot perform this task satisfactorily.
Therefore, multiplexer used to perform high speed switching are constructed
Multiplexer handle two type of data that is analog and digital. For analog
of electronic components.
application, multiplexer are built of relays and transistor switches. For digital
application, they are built from standard logic gates.The multiplexer used for
digital applications, also called digital multiplexer, is a circuit with many input but
only one output. By applying control signals, we can steer any input to the output. 46
Following figure shows the general idea of a multiplexer with n input signal, m
control signals and one output signal.
47
four input bits are D0,D1,D2 and D3. only one of this is transmitted to the output y.
The output depends on the value of AB which is the control input. The control input
48
Applications of Multiplexer:
Multiplexer are used in various fields where multiple data need to be transmitted
using a single line.
communication like transmission system, relay and tributary station, and
communication network. The efficiency of communication system can be increased
considerably using multiplexer. Multiplexer allow the process of transmitting
different type of data such as audio, video at the same time using a single
transmission line. 49
Telephone network – In telephone network, multiple audio signals are integrated
on a single line for transmission with the help of multiplexers. In this way,
multiple audio signals can be isolated and eventually, the desire audio signals
reach the intended recipients.
memory into the computer, at the same time reduces the number of copper lines
required to connect the memory to other parts of the computer circuit.
Demultiplexer means one to many. A demultiplexer is a circuit with one input
and many output. By applying control signal, we can steer any input to the
output. Few types of demultiplexer are 1-to 2, 1-to-4, 1-to-8 and 1-to 16
demultiplexer.
Following figure illustrate the general idea of a demultiplexer with 1 input
signal, m control signals, and n output signals.
51
Understanding 1- to-4 Demultiplexer:
The 1-to-4 demultiplexer has 1 input bit, 2 control bit, and 4 output bits. An
example of 1-to-4 demultiplexer is IC 74155. The 1-to-4 demultiplexer is shown
in figure below
52
53
The input bit is labelled as Data D. This data bit is transmitted to the data bit of the
output lines. This depends on the value of AB, the control input.
When AB = 01, the upper second AND gate is enabled while other AND gates are
disabled. Therefore, only data bit D is transmitted to the output, giving Y1 = Data.
If D is low, Y1 is low. IF D is high,Y1 is high. The value of Y1 depends upon the
value of D. All other outputs are in low state.
If the control input is changed to AB = 10, all the gates are disabled except the third
AND gate from the top. Then, D is transmitted only to the Y2 output, and Y2 =
54
APPLICATIONS
Demultiplexer is used to connect a single source to multiple destinations. The
multiplexer are used. Most of the communication system are bidirectional i.e.
they function in both ways (transmitting and receiving signals). Hence, for most of
the applications, the multiplexer and demultiplexer work in sync. Demultiplexer
are also used for reconstruction of parallel data and ALU circuits.
Communication System
55
Multiplexur & Demultiplexur types
2-1 multiplexer ( 1select line)
4-1 multiplexer (2 select lines)
8-1 multiplexer(3 select lines)
16-1 multiplexer (4 select lines)
Vice versa for demultiplexur
56
8-1 multiplexer
(3 select lines)
57
58
59
FLIP FLOP
60
A flip flop is an electronic circuit with two stable states that can be
used to store binary data. The stored data can be changed by applying varying
inputs. Flip-flops and latches are fundamental building blocks of digital
electronics systems used in computers, communications, and many other types
of systems. Flip-flops and latches are used as data storage elements. It is the
mechanism
61
Clock
• It is usually derived from an oscillator or other circuitry
that alternates its output between 1 and 0
• It is used to synchronize the flow of data in a digital
system
62
S-R Flip Flop
S R Q Q’
0 0 0 1
0 1 0 1
1 0 1 0
1 1 ∞ ∞
In this circuit diagram, the output is changed (i.e. the stored data is
changed) only when you give an active clock signal. Otherwise, even if the
S or R is active the data will not change. Let’s look at the types of flip-flops 63
There are majorly 4 types of flip flops, with the most common one
being SR flip flop. This simple flip flop circuit has a set input (S) and a reset
input (R). In this circuit when you Set “S” as active the output “Q” would be
high and “Q‘‘” will be low. Once the outputs are established, the wiring of the
circuit is maintained until “S” or “R” go high, or power is turned off. As shown
above, it is the simplest and the easiest to understand. The two outputs, as
shown above, are the inverse of each other. The truth table of SR Flip Flop is
highlighted below. 64
JK Flip-flop
Due to the undefined state in the SR flip flop, another flip flop is
required in electronics. The JK flip flop is an improvement on the SR flip flop
J K Q Q’
0 0 0 0
where S=R=1 is not a problem.
0 1 0 0
1 0 0 1
1 1 0 1
0 0 1 1
0 1 1 0
1 0 1 1
1 1 1 0
65
The input condition of J=K=1, gives an output inverting the output state.
However, the outputs are the same when one tests the circuit practically.
In simple words, If J and K data input are different (i.e. high and low) then
the output Q takes the value of J at the next clock edge. If J and K are both low
then no change occurs. If J and K are both high at the clock edge then the output
will toggle from one state to the other. JK Flip Flop can function as Set or Reset
Flip flop
66
D Flip Flop
D flip flop is a better alternative that is very popular with digital
electronics. They are commonly used for counters and shift-registers and input
synchronisation.
Clock D Q Q’
↓»0 0 0 1
↑»1 0 0 1
↓»0 1 0 1
↑»1 1 1 0
67
In a D flip flop, the output can be only changed at the clock edge, and if
the input changes at other times, the output will be unaffected. The change of
state of the output is dependent on the rising edge of the clock. The output (Q) is
same as the input and can only change at the rising edge of the clock.
68
T Flip Flop
A T flip flop is like JK flip-flop. These are basically a single input
version of JK flip flop. This modified form of JK flip-flop is obtained by
connecting both inputs J and K together. This flip-flop has only one input along
with the clock input. These flip-flops are called T flip-flops because of their
ability to complement its state (i.e.) Toggle, hence the name Toggle flip-flop.
69
T Q Q (t+1)
0 0 0
1 0 1
0 1 1
1 1 0
70
Applications of Flip-Flops
These are the various types of flip-flops being used in digital electronic circuits
and the applications of Flip-flops are as specified below.
Counters
Frequency Dividers
Shift Registers
Storage Registers
71
COUNTER
72
Counter is a device which stores (and sometimes displays) the number
of times a particular event or process has occurred, often in relationship to a
clock signal. Counters are used in digital electronics for counting purpose, they
can count specific event happening in the circuit. For example, in UP counter a
counter increases count for every rising edge of clock. Not only counting, a
counter can follow the certain sequence based on our design like any random
sequence 0,1,3,2… .They can also be designed with the help of flip flops.
Counters are broadly divided into two categories
73
Asynchronous Counter
In asynchronous counter we don’t use universal clock, only first flip
flop is driven by main clock and the clock input of rest of the following counters
is driven by output of previous flip flops. We can understand it by following
diagram-
74
It is evident from timing diagram that Q0 is changing as soon as the rising edge of clock pulse is
encountered, Q1 is changing when rising edge of Q0 is encountered(because Q0 is like clock pulse for
75
second flip flop) and so on. In this way ripples are generated through Q0,Q1,Q2,Q3 hence it is also
Synchronous Counter
Unlike the asynchronous counter, synchronous counter has one global
clock which drives each flip flop so output changes in parallel. The one
advantage of synchronous counter over asynchronous counter is, it can operate
on higher frequency than asynchronous counter as it does not have cumulative
delay because of same clock is given to each flip flop.
76
From circuit diagram we see that Q0 bit gives response to each falling edge of clock while
Q1 is dependent on Q0, Q2 is dependent on Q1 and Q0 , Q3 is dependent on Q2,Q1 and Q0.77
Flip flops can be used to store a single bit of binary data (1or 0).
However, in order to store multiple bits of data, we need multiple flip flops. N flip
flops are to be connected in an order to store n bits of data. A Register is a device
which is used to store such information. It is a group of flip flops connected in
series used to store multiple bits of data.
The information stored within these registers can be transferred with the
help of shift registers. Shift Register is a group of flip flops used to store multiple
bits of data. The bits stored in such registers can be made to move within the
78
The registers which will shift the bits to left are called
“Shift left registers”.
The registers which will shift the bits to right are called
“Shift right registers”.
Shift registers are basically of 4 types. These are:
1.Serial In parallel Out shift register
2.Serial In Serial Out shift register
3.Parallel In Serial Out shift register 79
Serial-In Serial-Out Shift Register (SISO)
80
Parallel-In Serial-Out Shift Register (PISO)
81
Parallel-In Parallel-Out Shift Register (PIPO)
82