DigitalElectronics Unit2 02
DigitalElectronics Unit2 02
1 lecture
2 Code Converter
3 Comparators
4 Parity Generator
5 Decoder
6 Encoder
8 Next Lecture
This lecture
Code Converter
Code Converter
Code Converter
Design of a 4 bit Binary to Gray Code Converter
Figure
Figure
(SIT) Pritesh Shah August 2, 2017 10 / 61
Code Converter
Figure
Figure
(SIT) Pritesh Shah August 2, 2017 12 / 61
Code Converter
Comparators
1 Bit Comparators
Figure
1 Bit Comparators
Figure
2 Bit Comparators
Figure
2 Bit Comparators
Figure
(SIT) Pritesh Shah August 2, 2017 22 / 61
Comparators
4 Bit Comparators
Figure
4 Bit Comparators
Figure
4 Bit Comparators
(SIT) Figure
Pritesh Shah August 2, 2017 25 / 61
Parity Generator
Parity Generator
Parity Generator
To generate an even parity bit, the four data bits are added using 3
X-OR gates.
The sum bit will be the parity bit.
To generate an odd parity bit, the four data bits are added using 3
X-OR gates and the sum bit is inverted.
Decoder
A decoder is a logic circuit that converts an N-bit binary input code
into M output lines such that only one output line is activated for
each of the possible combinations of inputs.
A decoder identifies or recognizes or detects a particular code.
(SIT)
Figure
Pritesh Shah August 2, 2017 31 / 61
Decoder
Decoder
For each of these input combinations only one of the M outputs will
be active(HIGH), all the other outputs will remain inactive(LOW).
Some decoders have one or more ENABLE inputs that are used to
control the operation of the decoder.
A BCD to decimal encoder has a 4 bit input code and 10 output lines
that correspond to the 10 BCD code groups 0000 to 1001.
This type of decoder, don’t utilize all of 2N possible input codes.
3 to 8 Line Decoder
Decoder Application
Decoder Application
Decoder Application
Decoder Application
BCD to Seven Segment Decoders
Decoder Application
BCD to Seven Segment Decoders
Decoder Application
Encoder
Encoder
Figure: (SIT)
Block diagram of encoder Pritesh Shah August 2, 2017 43 / 61
Encoder
Keyboard Encoder
Priority Encoder
The decoder discussed so far will operate correctly, provided that one
and only one decimal input is HIGH at any given time.
In some cases, two or more decimal inputs may become HIGH at the
same time.
A priority encoder is a logic circuit that responds to just one input in
accordance with some priority system, among all those that may be
simultaneously HIGH.
The most common priority system is based on the relative magnitude
of the inputs, whichever decimal input is larger, is the one that is
encoded.
A priority encoder would decode 4 if both 3 and 4 are simultaneously
HIGH.
Multiplexers
Multiplexers
Figure: Multiplexers
Applications of MUX
Data Selection
Data Routing
Operation Sequencing
Parallel to serial conversion
Waveform Generation
Logic Function Generator
Demultiplexer
A MUX takes several inputs and transmit one of them to the output.
A demultiplexer performs the reverse operation, it takes a single input
and distributes it over several outputs.
A demultiplexer can be through of as a ’distributor’.
The demux takes one input data source and selectively distributes it
to 1 of N output channels just like a multi position switch.
Also called as 1 to N (2n ) device
Demultiplexer
1 to 4 Line Demultiplexer
Next Lecture
Thank You