07 Function of CL 1
07 Function of CL 1
Logika
Slide - 7 1
Comparators
The basic function of a comparator is to compare the
magnitude of two binary quantities to determine the
relationship of those quantities
1-Bit Comparator
2-Bit Comparator
4-Bit Comparator
Slide - 7 2
1-Bit Comparator
2-Bit Comparator
Slide - 7 3
4-Bit Comparator
One of three outputs will be HIGH:
A greater than B (A > B)
A equal to B (A = B)
A less than B (A < B)
Slide - 7 6
Binary decoder The output is
The output is 1 only when: only what we
want!
A0 = 1
A2 = 0
A3 = 0
A4 = 1
Slide - 7 7
Determine the logic required to decode the binary number 1011 by
producing a HIGH level on the output
Try This:
Develop the logic
required for 10010
and produce an
X A3 A2 A1 A0 1011 active LOW output
Slide - 7 8
The 4-Bit Decoder
In order to decode all possible combinations of 4-bits, sixteen
gates are required (24 = 16). This type of decoder is commonly
called either 4-line-to-16-line decoder or 1-of-16 decoder.
Truth
Table
Output
is
Active
Low
Slide - 7 9
The 74HC154 1-of-16 Decoder
The IC will active if
gate output (EN) is
HIGH
Slide - 7 10
Example:
A certain application requires that a 5-bit number be decoded. Use 74HC154
decoders to implement the logic. The binary number is represented by the
format A4A3A2A1A0.
Determine the
output in
Figure that is
activated for
the binary
input 1 0 1 1 0
?
Answer:
Enable Disable 22
Disable Enable
0 1
1
0
Slide - 7 11
The BCD-to-Decimal Decoder
The BCD-to-decimal converts each BCD code into one of ten
possible decimal digit indications. It is frequently referred as
4-line-to-10- line decoder or a 1-of-10 decoder. The method
of implementation is the same as for the 1-of-16 decoder.
Slide - 7 12
Example:
The 74HC42 is an integrated circuit BCD-to-decimal decoder. The logic symbol is
shown in Figure 1 below. If the input waveforms in Figure 2 are applied to the
inputs of the 74HC42, show the output waveforms.
0 1 0 1 0 1 0 1
00 1
0 1 1 0 0 1 1
0 0
0 0 0 0 1 1 1 1
0 0
0 0 0 0 0 0 0 0
1 1
Slide - 7 13
Exercise:
Construct a timing diagram showing input and output waveforms for
the case where the BCD inputs sequence thru’ the decimal numbers as
follows: 0, 2, 4, 6, 8, 1, 3, 5 and 9
Slide - 7 14
The BCD-to-7 Segment Decoder
The BCD-to-7-segment decoder accepts the BCD code on
its inputs and drive 7-segment display devices to
produce a decimal readout.
Slide - 7 15
Truth Table for BCD-to-7 Segment
Decoder
Slide - 7 16
Slide - 7 17
Encoders
Decimal-to-BCD encoder
8-line-to-3-line encoder
Slide - 7 18
The Decimal-to-BCD Encoder
Slide - 7 19
The Decimal-to-BCD Encoder
A3 8 9
A2 4 5 6 7
A1 2 3 6 7
A0 1 3 5 7 9
Slide - 7 20
8-Line-to-3-Line Encoder
Slide - 7 21
Multiplexer (Data Selectors)
A multiplexer (MUX) is a device that allows digital
information from several sources to be routed onto a
single line for transmission over that line to a
common destination.
The basic multiplexer has several data-input lines
and a single output line.
It also has data-select inputs, which permit digital
data on any one of the inputs to be switched to the
output line.
Slide - 7 22
1-of-4 data MUX
Slide - 7 23
Y D0 S1 S 0
Y D1 S1S 0
Y D2 S1 S 0
Y D3 S1S 0
Slide - 7 24
Example:
Determine the output waveform in relation to the inputs
Slide - 7
Exercise: Determine the output waveform in relation
to the inputs
Slide - 7 26
Multiplexer
Larger multiplexers can be constructed from smaller ones.
An 8-to-1 multiplexer can be constructed from smaller
multiplexers as shown:
Slide - 7 27
Multiplexer
Application Example:
Slide - 7 28
Demultiplexers
A demultiplexer (DEMUX) basically reverses
the multiplexing function.
It takes digital information from one line and
Slide - 7 29
1-to-4 DEMUX
D0 I S1 S 0
D1 I S1S 0
D2 I S1 S 0
D3 I S1S 0
=1
Exercise:
Determine the data-output waveforms
Slide - 7 31
1-to-8 DEMUX
1-line-to-8-line multiplexer
Slide - 7 32
Mux-Demux Application Example
Slide - 7 34